BenLangmead / bowtie

An ultrafast memory-efficient short read aligner
Other
263 stars 77 forks source link

Compilation of Bowtie 1.2.2 with Intel 17.0.4 #77

Open marcc-hpc opened 6 years ago

marcc-hpc commented 6 years ago

Hi @BenLangmead and rest of Bowtie team, Kevin here from MARCC.

We are trying to more closely follow releases. Issue #38 covered issues with compilation.

I was comparing the two commits, and it appears the primary issues are

  1. SeqAn-1.1/seqan/platform.h: Intel compiler guards (or not) were used for branch v1.2.1
// default 64bit type
#if (!defined(__INTEL_COMPILER))
#ifndef __int64
typedef int64_t __int64;
#endif
#endif
  1. void vs. int (in processor_support.h):

Currently:

        __cpuid((void *) &regs,0); // test if __cpuid() works, if not catch the exception
        __cpuid((void *) &regs,0x1); // POPCNT bit is bit 23 in ECX

Previously:

        __cpuid((int *) &regs,0); // test if __cpuid() works, if not catch the exception
        __cpuid((int *) &regs,0x1); // POPCNT bit is bit 23 in ECX

I went back to what worked for v1.2.1 (re-inserting guard)

Compilation command:

make CC=icc CXX=icpc EXTRA_FLAGS="-I${TBBROOT}/include -L${TBBROOT}/lib/intel64/gcc4.4 -xHOST" -j 8

If you want to test on MARCC with Intel 17:

source /cm/shared/lmod/scripts/new_lmod.sh
module list # just use the defaults

# bowtie compile
BenLangmead commented 6 years ago

Thank you Kevin! Extremely helpful, @ch4rr0 and I will take a look. Hopefully we can close that older issue you referenced (#38) as well.

boegel commented 6 years ago

We've been able to build Bowtie 1.2.1.1 with the Intel compilers (2017 update 4), see https://github.com/easybuilders/easybuild-easyconfigs/blob/master/easybuild/easyconfigs/b/Bowtie/Bowtie-1.2.1.1-intel-2017b.eb .

This required two patches:

With Bowtie 1.2.2 however, I'm now running into a new problem when compiling hit.cpp:

/xxx/software/GCCcore/6.4.0/bin/../include/c++/6.4.0/bits/stl_algobase.h(343): error: no operator "=" matches these operands
            operand types are: HitSink::batch = HitSink::batch
          *__result = std::move(*__first);

(+ other very similar errors)

The full error log is available at https://gist.github.com/boegel/d5449745047fa9180ece95f4adf3337d .

Any ideas on this?

boegel commented 6 years ago

With some help from @wpoely86, I've been able to compile Bowtie 1.2.2, the required additional patch to fix the compilation errors mentioned above is available at https://github.com/easybuilders/easybuild-easyconfigs/pull/5717/files#diff-1e411412b51a5818cc46e8432ae0ef73 .

mmokrejs commented 5 years ago

@BenLangmead Would you please make a new bowtie1 release with the above patches?

ch4rr0 commented 5 years ago

Ill look into the patch today and will try to have a beta build up by this evening. In the coming weeks I will be working towards an official release for bowtie which will include fixes for this issue.

ch4rr0 commented 5 years ago

I have committed the necessary changes to support the Intel Compiler Collection. The changes were committed to the bug_fixes branch and will get merged to master as we approach a release.

Here's a build I created using ICC and the changes mentioned (can't guarantee it's portability). bowtie-1.2.2.1-INTEL-linux-x86_64.zip

mmokrejs commented 5 years ago

Hi @ch4rr0 , thank you for your efforts. I see https://github.com/gentoo/sci/blob/master/sci-biology/bowtie/files/bowtie-1.2.2-fix-Intel-compilation.patch is now obsoleted by https://github.com/BenLangmead/bowtie/commit/d8b661fb36c129cb9899fcd3689b3618036f8c7b on the bug_fixes branch but unfortunately I cannot compile with even gcc-8.2.0 -std=c++03. But I will better open a new issue.

ch4rr0 commented 5 years ago

I was able to without issue. What compilation errors are you getting?

ch4rr0 commented 5 years ago

Disregard -- I see you opened an issue.