3dem / relion

Image-processing software for cryo-electron microscopy
https://relion.readthedocs.io/en/latest/
GNU General Public License v2.0
447 stars 200 forks source link

Compile Relion2.0 with Intel mpi(4.1.1.036) error #121

Closed bforsbe closed 3 years ago

bforsbe commented 8 years ago

Originally reported by: Yu Xianzhi (Bitbucket: yuxianzhi, GitHub: yuxianzhi)


Error Meesage

/usr/local/cuda/bin/nvcc -M -DCUDACC /home/users/yuxianzhi/relion2-beta/src/gpu_utils/cuda_autopicker.cu -o /home/users/yuxianzhi/relion2-beta/build/src/apps/CMakeFiles/relion_gpu_util.dir//gpu_utils/relion_gpu_util_generated_cuda_autopicker.cu.o.NVCC-depend -ccbin /opt/rh/devtoolset-2/root/usr/bin/cc -m64 -DINSTALL_LIBRARY_DIR=\"/usr/local/lib/\" -DSOURCE_DIR=\"/home/users/yuxianzhi/relion2-beta/src/\" -DCUDA -DHAVE_SINCOS -Drelion_gpu_util_EXPORTS -Xcompiler ,\"-fPIC\",\"-O3\",\"-DNDEBUG\" -arch=sm_35 -DINTEL_COMPILER --disable-warnings -DNVCC -I/usr/local/cuda/include -I/opt/intel/impi/4.1.1.036/intel64/include -I/home/users/yuxianzhi/relion2-beta -I/usr/include -I/usr/local/cuda/include

In file included from /opt/intel/impi/4.1.1.036/intel64/include/mpi.h:1279:0,

from /home/users/yuxianzhi/relion2-beta/src/mpi.h:47,

from /home/users/yuxianzhi/relion2-beta/src/gpu_utils/cuda_autopicker.h:4,

from /home/users/yuxianzhi/relion2-beta/src/gpu_utils/cuda_autopicker.cu:4:

/opt/intel/impi/4.1.1.036/intel64/include/mpicxx.h:95:2: error: #error "SEEK_SET is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h"

error "SEEK_SET is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h"

^

/opt/intel/impi/4.1.1.036/intel64/include/mpicxx.h:99:2: error: #error "SEEK_CUR is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h"

error "SEEK_CUR is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h"

^

/opt/intel/impi/4.1.1.036/intel64/include/mpicxx.h:104:2: error: #error "SEEK_END is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h"

error "SEEK_END is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h"

Solution

1) use other version mpi

2) Include mpi.h before stdio.h

3) write these undefine before include mpi.h in src/mpi.h

 #undef SEEK_SET

 #undef SEEK_CUR

 #undef SEEK_END

bforsbe commented 8 years ago

Original comment by Yu Xianzhi (Bitbucket: yuxianzhi, GitHub: yuxianzhi):


I only have intel mpi on my server, There is no much difference between two tests(icc+impi, gcc+impi) when you only use cpu to do calculation. Maybe there will have an gap if you use other mpi(openmpi).

bforsbe commented 8 years ago

Original comment by Bharat Reddy (Bitbucket: barureddy, GitHub: barureddy):


What is the performance difference between gcc and icc?

biochem-fan commented 3 years ago

Too old issue.