chap
chap copied to clipboard
Errors when compiling CHAP
Hi,
I have been trying to compile CHAP on our local cluster but ran into a number of issues.
First the I encountered the same problem as described in https://github.com/channotation/chap/issues/5
However, the suggested fix didn't work (Adding include_directories(${LAPACKE_INCLUDE_DIRS})
or target_include_directories(chap PUBLIC ${LAPACKE_INCLUDE_DIRS})
to CMakeLists.txt
). Instead I had to add the explicit path to CMakeLists.txt
(I am mainly mentioning it in case others run into the same problem).
I have however further problems during compuilation. With an intel compiler (which was used to compile Gromacs), I get the following error:
[ 42%] Building CXX object CMakeFiles/chap.dir/src/statistics/weighted_kernel_density_estimator.cpp.o
[ 43%] Building CXX object CMakeFiles/chap.dir/src/trajectory-analysis/chap_trajectory_analysis.cpp.o
/mnt/storage/home/el14718/el14718/SOFTWARE/chap-version_0_9_1/src/trajectory-analysis/chap_trajectory_analysis.cpp(87): error #3291: invalid narrowing conversion from "double" to "float"
pfInitProbePos_ = {std::nan(""), std::nan(""), std::nan("")};
^
/mnt/storage/home/el14718/el14718/SOFTWARE/chap-version_0_9_1/src/trajectory-analysis/chap_trajectory_analysis.cpp(87): error #3291: invalid narrowing conversion from "double" to "float"
pfInitProbePos_ = {std::nan(""), std::nan(""), std::nan("")};
^
/mnt/storage/home/el14718/el14718/SOFTWARE/chap-version_0_9_1/src/trajectory-analysis/chap_trajectory_analysis.cpp(87): error #3291: invalid narrowing conversion from "double" to "float"
pfInitProbePos_ = {std::nan(""), std::nan(""), std::nan("")};
^
/mnt/storage/home/el14718/el14718/SOFTWARE/chap-version_0_9_1/src/trajectory-analysis/chap_trajectory_analysis.cpp(1633): warning #192: unrecognized character escape sequence
<<"\% complete"
^
/mnt/storage/home/el14718/el14718/SOFTWARE/chap-version_0_9_1/src/trajectory-analysis/chap_trajectory_analysis.cpp(1775): warning #192: unrecognized character escape sequence
<<"\% complete"
^
compilation aborted for /mnt/storage/home/el14718/el14718/SOFTWARE/chap-version_0_9_1/src/trajectory-analysis/chap_trajectory_analysis.cpp (code 2)
make[2]: *** [CMakeFiles/chap.dir/src/trajectory-analysis/chap_trajectory_analysis.cpp.o] Error 2
make[1]: *** [CMakeFiles/chap.dir/all] Error 2
make: *** [all] Error 2
So I tried to switch to gcc, but then I got this error:
[ 44%] Building CXX object CMakeFiles/chap.dir/config/config.cpp.o
[ 45%] Linking CXX executable chap
c++: error: unrecognized command line option '-qopenmp'; did you mean '-fopenmp'?
make[2]: *** [chap] Error 1
make[1]: *** [CMakeFiles/chap.dir/all] Error 2
make: *** [all] Error 2
I thought it could be a problem of gcc version (I used GCC 7.2.0) so I tried with the same GCC version (5.4.0) as the one used on my desktop for with the installation was a success (Ubuntu desktop with all prerequisite libraries installed with apt-get).
Do you have any ideas on how to fix it?
I am happy to replace -qopenmp
with -fopenmp
but I don't know where to change it.
Many thanks