pachterlab / kallisto

Near-optimal RNA-Seq quantification
https://pachterlab.github.io/kallisto
BSD 2-Clause "Simplified" License
647 stars 170 forks source link

Facing issues while building on PPC64LE architecture. #431

Open vinodk99 opened 5 months ago

vinodk99 commented 5 months ago

Below is the build issue ouput:

cmake .. -DBUILD_FUNCTESTING=ON -- The C compiler identification is GNU 11.4.1 -- The CXX compiler identification is GNU 11.4.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test COMPILER_SUPPORTS_CXX17 -- Performing Test COMPILER_SUPPORTS_CXX17 - Success shared build -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11") Functional testing enabled. -- Configuring done -- Generating done -- Build files have been written to: /kallisto/build [root@7d5d38510f8c build]# ls CMakeCache.txt CMakeFiles Makefile cmake_install.cmake func_tests src [root@7d5d38510f8c build]# make install [ 3%] Creating directories for 'bifrost' [ 7%] No download step for 'bifrost' [ 11%] No update step for 'bifrost' [ 15%] No patch step for 'bifrost' [ 19%] Performing configure step for 'bifrost' -- The C compiler identification is GNU 11.4.1 -- The CXX compiler identification is GNU 11.4.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE Compilation architecture: native Build type: Release Maximum k-mer size: 31 Maximum g-mer size: 31 -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11") -- Configuring done -- Generating done -- Build files have been written to: /kallisto/ext/bifrost/build [ 23%] Performing build step for 'bifrost' [ 3%] Building CXX object src/CMakeFiles/bifrost_dynamic.dir/Bifrost.cpp.o c++: error: unrecognized command-line option ‘-march=native’; did you mean ‘-mcpu=native’? make[5]: [src/CMakeFiles/bifrost_dynamic.dir/build.make:76: src/CMakeFiles/bifrost_dynamic.dir/Bifrost.cpp.o] Error 1 make[4]: [CMakeFiles/Makefile2:128: src/CMakeFiles/bifrost_dynamic.dir/all] Error 2 make[3]: [Makefile:136: all] Error 2 make[2]: [CMakeFiles/bifrost.dir/build.make:86: ../ext/bifrost/src/bifrost-stamp/bifrost-build] Error 2 make[1]: [CMakeFiles/Makefile2:147: CMakeFiles/bifrost.dir/all] Error 2 make: [Makefile:136: all] Error 2

Yenaled commented 5 months ago

Thanks! I think there's two things that always results in some compilations issues: 1) The AVX-2 instructions, and 2) machine architecture (march) option.

These optimizations are enabled by default (in both the distributed binaries and in the source code) as they can lead to significant speedups. However, they seem to be problematic as they can't be used on a fraction of computer systems.

I will try to add a cmake option to disable these things in the next release, and perhaps disable these automatically in the precompiled binaries.

See the issue here which may present a solution: https://github.com/pachterlab/kallisto/issues/424

You may want to also add -DCOMPILATION_ARCH=OFF after the -DENABLE_AVX2=OFF

spirpinias commented 4 months ago

@Yenaled do you have a time frame for the new release with these fixes included?

Yenaled commented 4 months ago

Unfortunately not yet; haven't really prioritize it since kallisto works on most (albeit not all) systems. As such, a new release will include more than just these upgrades to the compilation/cmake options.

Yenaled commented 4 months ago

@spirpinias I expect that it will happen sometime this month.

Delaney

vinodk99 commented 3 months ago

@spirpinias I expect that it will happen sometime this month.

Delaney

@spirpinias is this fixed?

Yenaled commented 3 months ago

In the devel version (available on the "devel" branch on GitHub), you can now compile kallisto via:

cmake .. -ENABLE_AVX2=OFF -COMPILATION_ARCH=OFF

That has not been put onto the "master" branch for stable release yet, because a project of ours is going through the final rounds of editing.

Yenaled commented 2 months ago

I apologize for the delay on this — things are still on devel branch, because a project accompanying the next release of kallisto is taking longer than expected to be put out. It’s already finished; there are just some internal discussions right now that need to be resolved. It will happen soon!

Yenaled commented 1 month ago

done :) You can set those cmake options I mentioned above to disable those features, fixing build issues.

vinodk99 commented 1 month ago

@Yenaled Still facing build issue on ppc64le architecture after updating cmake options:

[root@94fb9383ec01 build]# cmake .. -DBUILD_FUNCTESTING=ON -DENABLE_AVX2=OFF -DCOMPILATION_ARCH=OFF shared build Functional testing enabled. -- Configuring done (0.0s) -- Generating done (0.0s) -- Build files have been written to: /kallisto/build [root@94fb9383ec01 build]# make [ 3%] Performing configure step for 'bifrost' Disabling native architecture compilation (including AVX2) Disabling AVX2 instructions Build type: Release Maximum k-mer size: 31 Maximum g-mer size: 31 -- Configuring done (0.0s) -- Generating done (0.0s) -- Build files have been written to: /kallisto/ext/bifrost/build [ 7%] Performing build step for 'bifrost' [ 3%] Building CXX object src/CMakeFiles/bifrost_static.dir/Bifrost.cpp.o c++: error: unrecognized command-line option ‘-mno-avx2’ make[5]: [src/CMakeFiles/bifrost_static.dir/build.make:76: src/CMakeFiles/bifrost_static.dir/Bifrost.cpp.o] Error 1 make[4]: [CMakeFiles/Makefile2:102: src/CMakeFiles/bifrost_static.dir/all] Error 2 make[3]: [Makefile:136: all] Error 2 make[2]: [CMakeFiles/bifrost.dir/build.make:86: /kallisto/ext/bifrost/src/bifrost-stamp/bifrost-build] Error 2 make[1]: [CMakeFiles/Makefile2:121: CMakeFiles/bifrost.dir/all] Error 2 make: [Makefile:136: all] Error 2

Yenaled commented 1 month ago

Ok, I think this is a gcc issue and you may need to upgrade your c++ compiler.