ComparativeGenomicsToolkit / cactus

Official home of genome aligner based upon notion of Cactus graphs
Other
528 stars 111 forks source link

AVX2 support #1348

Closed weiranmmm closed 7 months ago

weiranmmm commented 7 months ago

Hi

i am using this amazing soft since 2.7. it worked very well, excepted some random error on fa build. However, when i try to use the newest version 2.8.1, i have a new error. this is a part of error log, indicating that my cpu do not support axv2

======================================================================== Traceback (most recent call last): File "/home/weiranmm-pg/mambaforge/envs/cactus/lib/python3.12/site-packages/toil/worker.py", line 407, in workerScript job._runner(jobGraph=None, jobStore=jobStore, fileStore=fileStore, defer=defer) File "/home/weiranmm-pg/mambaforge/envs/cactus/lib/python3.12/site-packages/toil/job.py", line 2829, in _runner returnValues = self._run(jobGraph=None, fileStore=fileStore) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/weiranmm-pg/mambaforge/envs/cactus/lib/python3.12/site-packages/toil/job.py", line 2746, in _run return self.run(fileStore) ^^^^^^^^^^^^^^^^^^^ File "/home/weiranmm-pg/mambaforge/envs/cactus/lib/python3.12/site-packages/toil/job.py", line 2974, in run rValue = userFunction(*((self,) + tuple(self._args)), **self._kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/weiranmm-pg/mambaforge/envs/cactus/lib/python3.12/site-packages/cactus/refmap/cactus_graphmap_split.py", line 508, in split_fa_into_contigs cactus_call(parameters=cmd, outfile=contig_fasta_path) File "/home/weiranmm-pg/mambaforge/envs/cactus/lib/python3.12/site-packages/cactus/shared/common.py", line 906, in cactus_call raise RuntimeError("{}Command {} exited {}: {}".format(sigill_msg, call, process.returncode, out)) RuntimeError:



ERROR: Your CPU is incompatible with the Cactus binaries. This is often due to it being too old to support AVX2 instructions. Please see the release notes for more details: https://github.com/ComparativeGenomicsToolkit/cactus/releases



Command ['singularity', '--silent', 'exec', '-B', '/tmp/027e8a1999e253d09add7ccffd33013b/8c7d/d27e:/mnt', '--pwd', '/mnt', '/lustre8/home/weiranmm-pg/for_cactus/jobStore/cactus.img', 'bash', '-c', 'set -eo pipefail && samtools faidx tmp2ccgtwz6/NA18970.fa --region-file tmp2ccgtwz6/chr3.fa_contigs.clean | sed -e \'s/\([^:]\):\([0-9]\)-\([0-9]*\)/echo "\1sub$((\2-1))_\3"/e\''] exited 4: stderr=sed: couldn't write 60 items to stdout: Cannot allocate memory

I used singularity binaries, and slurm support on a server cluster. the CPU is epyc 7501, which should support avx2. And if cpu do not support the avx2, should it give me an error message like illegal instruction? not can not allocate memory?? Best regards, WEI

glennhickey commented 7 months ago

Yeah, cactus is a little simplistic about that error. Any time a process exits with code 4 (which often corresponds to illegal instruction), it prints that avx2 message. But in your case, it's coming out of samtools | sed, and the real message is

exited 4: stderr=sed: couldn't write 60 items to stdout: Cannot allocate memory

I've never seen this particular one before, but it looks like you're out of memory somehow.

weiranmmm commented 7 months ago

Yeah, cactus is a little simplistic about that error. Any time a process exits with code 4 (which often corresponds to illegal instruction), it prints that avx2 message. But in your case, it's coming out of samtools | sed, and the real message is

exited 4: stderr=sed: couldn't write 60 items to stdout: Cannot allocate memory

I've never seen this particular one before, but it looks like you're out of memory somehow.

thank you for the reply.

yes that is the point. i mean, it seems that i had a memory error, but cactus report an avx2 support error. so it had me confused, whether it was a bug. i think this might be an improvement point in future version. the program would only pick up exits code 4 with illegal instruction error message as avx2 support trouble, not only exits code 4.

anyway, my doubts have been resolved. thank you very much.