# Error in rule align

**URL:** <https://nextstrain.discourse.group/t/error-in-rule-align/287>\
**Category:** Help and Getting Started\
**Created:** [January 20, 2021, 10:57am UTC](https://nextstrain.discourse.group/t/error-in-rule-align/287 "2021-01-20T10:57:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GoncheD](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/gonched/32/67_2.png) [@GoncheD](https://nextstrain.discourse.group/u/GoncheD)\
**Post date:** [January 20, 2021, 10:57am UTC](https://nextstrain.discourse.group/t/error-in-rule-align/287/1 "2021-01-20T10:57:11Z")

</div>

Hi !  
I’m trying to build nextstrain on the latest data, using a build I tested before (and it worked great). However, now I’m getting an error in the alignment rule. This doesn’t occur using the example build however.  
Here is the output of the logs/align.txt file :  
`/home/danesh/miniconda2/envs/nextstrain/bin/mafft: line 2719: 14699 Killed "$prefix/addsingle" -Q 100 $legacygapopt -W $tuplesize -O $outnum $addsinglearg $addarg $add2ndhalfarg -C $numthreads $memopt $weightopt $treeinopt $treeoutopt $distoutopt $seqtype $model -f "-"$gop -h $aof $param_fft $localparam $algopt $treealg $scoreoutarg < infile > /dev/null 2>> "$progressfile"`

Is it because this dataset is larger than in the example or than the dataset I used before using the same build ? Although I get the same error on the cluster.

Thanks in advance !

---

<div class="post-metadata">

**Author:** ![trs](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/trs/32/5_2.png) [@trs](https://nextstrain.discourse.group/u/trs)\
**Post date:** [January 21, 2021, 7:38pm UTC](https://nextstrain.discourse.group/t/error-in-rule-align/287/2 "2021-01-21T19:38:11Z")

</div>

Hi @GoncheD, welcome!

This has the signs of an out-of-memory condition during alignment with MAFFT. The clue here from the log file is:

```nohighlight
mafft: line 2719: 14699 Killed "$prefix/addsingle"

```

which indicates that subprocess 14699 (`addsingle`) of `mafft` was killed unexpectedly.

When the computer runs out of memory, it will start terminating processes with the most aggressive memory usage until the memory pressure is relieved. During a Nextstrain build, that process is often MAFFT. It likely ran fine for you in the past because fewer sequences were being used.

I’d suggest checking what resources are available on your cluster and if you can increase the memory available to your job.

---

<div class="post-metadata">

**Author:** ![GoncheD](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/gonched/32/67_2.png) [@GoncheD](https://nextstrain.discourse.group/u/GoncheD)\
**Post date:** [January 22, 2021, 11:35am UTC](https://nextstrain.discourse.group/t/error-in-rule-align/287/3 "2021-01-22T11:35:17Z")

</div>

Thanks @trs ! It worked when running it on the high memory partition of the cluster. 👍

---

<div class="post-metadata">

**Author:** ![trs](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/trs/32/5_2.png) [@trs](https://nextstrain.discourse.group/u/trs)\
**Post date:** [January 22, 2021, 8:11pm UTC](https://nextstrain.discourse.group/t/error-in-rule-align/287/4 "2021-01-22T20:11:14Z")

</div>

Awesome, glad to hear it! Thanks for reporting back to close the loop. 🙂
