Compiling GROMACS with Intel oneapi icc/icpc has undefined feenableexcept/fedisableexcept

286 views Asked by At

I am posting here since I don't think GROMACS is going to know my issue. I have MacOS Big Sur and download Intel C/C++ compiler because it is supposed to make this program faster. I can compile with clang and GNU gcc but not Intel. The cmake commands finds both feenableexcept/fedisableexcept but when using the functions in one of the C++ files math/utilities.cpp during making the progam it fails. See failure below. It is related maybe to this post

-- Looking for feenableexcept in m
-- Looking for feenableexcept in m - found
-- Looking for fedisableexcept in m
-- Looking for fedisableexcept in m - found

Failure:

/Users/brian/tools/gromacs-2021.4/src/gromacs/math/utilities.cpp(96): error: identifier "feenableexcept" is undefined
      return feenableexcept(c_FPexceptions);
             ^

/Users/brian/tools/gromacs-2021.4/src/gromacs/math/utilities.cpp(125): error: identifier "fedisableexcept" is undefined
      return fedisableexcept(c_FPexceptions);
             ^

This is my cmake commmand

cmake .. -DGMX_FFT_LIBRARY=mkl \
      -DMKL_LIBRARIES="/opt/intel/oneapi/mkl/2021.4.0/lib" \
      -DMKL_INCLUDE_DIR="/opt/intel/oneapi/mkl/2021.4.0/include" \
      -DCMAKE_C_COMPILER=icc \
      -DCMAKE_CXX_COMPILER=icpc \
      -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk \
      -DCMAKE_OSX_DEPLOYMENT_TARGET=/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk \
      -DGMX_USE_TNG=OFF \
      -DZLIB_LIBRARY=/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/lib 

And these are my flags I set before running cmake

CFLAGS="-syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/lib  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -L/opt/intel/oneapi/ipp/latest/lib -I/opt/intel/oneapi/compiler/2021.4.0/mac/compiler/include -I/opt/intel/oneapi/ipp/latest/include -MMD -MF -MP -lz -std=99 -lboost" 
CXXFLAGS="-syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/lib -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -L/opt/intel/oneapi/ipp/latest/lib -I/opt/intel/oneapi/compiler/2021.4.0/mac/compiler/include -I/opt/intel/oneapi/ipp/latest/include -MMD -MF -MP -lz -std=99 -lboost" 
export CPLUS_INCLUDE_PATH=/opt/intel/oneapi/compiler/2021.4.0/mac/compiler/include:/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include:/opt/intel/oneapi/ipp/latest/include
export C_INCLUDE_PATH=/opt/intel/oneapi/compiler/2021.4.0/mac/compiler/include:/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include:/opt/intel/oneapi/ipp/latest/include
export CPATH=/opt/intel/oneapi/compiler/2021.4.0/mac/compiler/include:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include:$(xcrun --show-sdk-path)/usr/include:/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include:/opt/intel/oneapi/ipp/latest/include
export LIBRARY_PATH=/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/lib
0

There are 0 answers