I’m trying to compile Gromacs 2018 with icc 2018.1.126 on a iMac using flag
cmake .. -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc -DGMX_GPU=on -DGMX_USE_OPENCL=on -DGMX_SIMD=AVX2_256 -DGMX_FFT_LIBRARY=mkl -DREGRESSIONTEST_DOWNLOAD=ON
The cmake succeed without any warning but during the making I have encountered an error.
[ 23%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/gmxana/gmx_dipoles.cpp.o
gromacs-2018/src/gromacs/gmxana/gmx_dipoles.cpp(257): error: expected an identifier
if (debug || std::isnan(cosa))
compilation aborted for /gromacs-2018/src/gromacs/gmxana/gmx_dipoles.cpp (code 2)
make: *** [src/gromacs/CMakeFiles/libgromacs.dir/gmxana/gmx_dipoles.cpp.o] Error 2
make: *** [src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2
make: *** [all] Error 2
I have repeated the same compilation on another Mac and encountered the same error.
I have tried to replace icc with GCC7 and clang6 and the compilation succeeded without any error for both of them. I have also tried to compile the same Gromacs on a Linux with the same 2018.1 intel compiler (2018.1.163) and it succeeded without any error. I suspect the upgrading from 2018.1.126 (OSX) to 2018.1.163 has fixed some bugs? I'm interested in using icc to compile Gromacs and wonder if anyone else has encountered the same problem as I am?