[gmx-users] Configuration bug preventing GROMACS 5.0 build with Intel compiler?

Paul Caheny Paul.Caheny at uk.fujitsu.com
Wed Sep 3 19:08:18 CEST 2014


Hi All,

I'm attempting to compile GROMACS 5.0 (as downloaded from the tarball available here: http://www.gromacs.org/Downloads) with Intel Compiler version 14 and Intel MPI version 5 without success. I'm also compiling the CUDA functionality (with CUDA 6.5) but CUDA/MPI functionality doesn't seem to be related to the compilation problem I'm seeing. I'm using CMAKE 3.0.1 which I compiled myself from source with the same Intel 14 compiler.

Here is the version info:

icc --version
icc (ICC) 14.0.3 20140422
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

icpc --version
icpc (ICC) 14.0.3 20140422
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

mpirun --version
Intel(R) MPI Library for Linux* OS, Version 5.0 Build 20140605
Copyright (C) 2003-2014, Intel Corporation. All rights reserved.

I'm compiling like so:

module load compiler/intel/14.0/3.174
module load mpi/intel/5.0/0.028

tar -zxvf gromacs-5.0.tar.gz
cd gromacs-5.0
mkdir build
cd build

../../../CMAKE/cmake-3.0.1_intel14.0/bin/cmake .. \
-DCMAKE_C_COMPILER=mpiicc -DCMAKE_CXX_COMPILER=mpiicpc \
-DGMX_MPI=on -DGMX_GPU=on -DCUDA_TOOLKIT_ROOT_DIR=/app/libraries/cuda/6.5/sb \
-DCUDA_HOST_COMPILER=/app/compilers/intel/14.0.3.174/composer_xe_2013_sp1.3.174/bin/intel64/icpc \
-DCUDA_VERBOSE_BUILD=ON -DCUDA_VER=6.5 -DCUDA_INSTALL_PATH=/app/libraries/cuda/6.5/sb \
-DCMAKE_INSTALL_PREFIX=../../../G2/install \
-DGMX_FFT_LIBRARY=mkl \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_VERBOSE_MAKEFILE=ON
make
make install

During install I see the following:

  file INSTALL cannot find
  "/home/paul.caheny/ISV/FY14Q2/GROMACS/G2/gromacs-5.0/build/bin/gmx_mpi".

Going backwards through the compilation I first see multiple instances of undefined references to _finite and _aligned_free like this one during link:

/app/libraries/impi/5.0.0.028/intel64/bin/mpiicpc    -mavx   -w3 -wd111 -wd177 -wd181 -wd193 -wd271 -wd304 -wd383 -wd424 -wd444 -wd522 -wd593 -wd869 -wd981 -wd1418 -wd1419 -wd1572 -wd1599 -wd2259 -wd2415 -wd2547 -wd2557 -wd3280 -wd3346 -wd1782   -ip -funroll-all-loops -alias-const -ansi-alias   -O3 -DNDEBUG  -mkl=sequential    CMakeFiles/template.dir/template.cpp.o  -o ../../bin/template -rdynamic ../../lib/libgromacs_mpi.so.0.0.0 -openmp ../../lib/libgpu_utils.a ../../lib/libnbnxn_cuda.a ../../lib/libcuda_tools.a /app/libraries/cuda/6.5/sb/lib64/libcudart.so -ldl -lrt -lm -lz -Wl,-rpath,/home/paul.caheny/ISV/FY14Q2/GROMACS/G2/gromacs-5.0/build/lib:/app/libraries/cuda/6.5/sb/lib64
../../lib/libgromacs_mpi.so.0.0.0: undefined reference to `_finite'
../../lib/libgromacs_mpi.so.0.0.0: undefined reference to `_aligned_free'

...and earlier during compilation:

/home/paul.caheny/ISV/FY14Q2/GROMACS/G2/gromacs-5.0/src/gromacs/math/utilities.c(731): warning #266: function "_finite" declared implicitly
      returnval = _finite(x);

/home/paul.caheny/ISV/FY14Q2/GROMACS/G2/gromacs-5.0/src/gromacs/utility/smalloc.c(359): warning #266: function "_aligned_free" declared implicitly
          _aligned_free(free);

This seems to be related to the CMAKE configuration successfully finding functions that don't exist on my platform, in particular from:

-- Checking for isfinite
-- Performing Test isfinite_compile_ok
-- Performing Test isfinite_compile_ok - Success
-- Checking for isfinite - yes
-- Checking for _isfinite
-- Performing Test _isfinite_compile_ok
-- Performing Test _isfinite_compile_ok - Success
-- Checking for _isfinite - yes
-- Checking for _finite
-- Performing Test _finite_compile_ok
-- Performing Test _finite_compile_ok - Success
-- Checking for _finite - yes

-- Looking for _aligned_malloc
-- Looking for _aligned_malloc - found

According to build/CMakeFiles/CMakeOutput.log and CMakeError.log all the above checks pass, yet in CMakeOutput.log all except the first check (isfinite) are logged as having undefined references, yet the check still reports success. This is the just the output for _finite_compile_ok but the _isfinite_compile_ok and _aligned_malloc follow a similar pattern:

Performing C SOURCE FILE Test _finite_compile_ok succeded with the following output:
Change Dir: /home/paul.caheny/ISV/FY14Q2/GROMACS/G2/gromacs-5.0/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/gmake "cmTryCompileExec3947929838/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec3947929838.dir/build.make CMakeFiles/cmTryCompileExec3947929838.dir/build
gmake[1]: Entering directory `/home/paul.caheny/ISV/FY14Q2/GROMACS/G2/gromacs-5.0/build/CMakeFiles/CMakeTmp'
/home/paul.caheny/ISV/FY14Q2/GROMACS/CMAKE/cmake-2.8.12.2_intel14.0/bin/cmake -E cmake_progress_report /home/paul.caheny/ISV/FY14Q2/GROMACS/G2/gromacs-5.0/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec3947929838.dir/src.c.o
/app/libraries/impi/5.0.0.028/intel64/bin/mpiicc   -std=gnu99 -w3 -wd111 -wd177 -wd181 -wd193 -wd271 -wd304 -wd383 -wd424 -wd444 -wd522 -wd593 -wd869 -wd981 -wd1418 -wd1419 -wd1572 -wd1599 -wd2259 -wd2415 -wd2547 -wd2557 -wd3280 -wd3346   -D_finite_compile_ok -I/home/paul.caheny/ISV/FY14Q2/GROMACS/G2/gromacs-5.0/build/CMakeFiles/CMakeTmp/float.h    -o CMakeFiles/cmTryCompileExec3947929838.dir/src.c.o   -c /home/paul.caheny/ISV/FY14Q2/GROMACS/G2/gromacs-5.0/build/CMakeFiles/CMakeTmp/src.c
/home/paul.caheny/ISV/FY14Q2/GROMACS/G2/gromacs-5.0/build/CMakeFiles/CMakeTmp/src.c(4): warning #266: function "_finite" declared implicitly
    _finite(f);
    ^

/home/paul.caheny/ISV/FY14Q2/GROMACS/G2/gromacs-5.0/build/CMakeFiles/CMakeTmp/src.c(4): warning #592: variable "f" is used before its value is set
    _finite(f);
            ^

Linking C executable cmTryCompileExec3947929838
/home/paul.caheny/ISV/FY14Q2/GROMACS/CMAKE/cmake-2.8.12.2_intel14.0/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec3947929838.dir/link.txt --verbose=1
/app/libraries/impi/5.0.0.028/intel64/bin/mpiicc  -std=gnu99 -w3 -wd111 -wd177 -wd181 -wd193 -wd271 -wd304 -wd383 -wd424 -wd444 -wd522 -wd593 -wd869 -wd981 -wd1418 -wd1419 -wd1572 -wd1599 -wd2259 -wd2415 -wd2547 -wd2557 -wd3280 -wd3346   -D_finite_compile_ok    CMakeFiles/cmTryCompileExec3947929838.dir/src.c.o  -o cmTryCompileExec3947929838 -rdynamic
CMakeFiles/cmTryCompileExec3947929838.dir/src.c.o: In function `main':
/home/paul.caheny/ISV/FY14Q2/GROMACS/G2/gromacs-5.0/build/CMakeFiles/CMakeTmp/src.c:(.text+0x40): undefined reference to `_finite'
gmake[1]: Leaving directory `/home/paul.caheny/ISV/FY14Q2/GROMACS/G2/gromacs-5.0/build/CMakeFiles/CMakeTmp'

Source file was:
#include <float.h>
int main(void) {
  float f;
  _finite(f);
}

I've also tried with CMAKE 2.8, same result. Is this something anyone else is seeing with Intel compilers? Version 14 is apparently the only Intel compiler supported by CUDA 6.5. I also tried with Intel Compiler version 12.1 + CUDA 5.5, I saw the same apparently erroneous behaviour during the CMAKE configuration but in this case the build ended even earlier for what I think is an unrelated compilation problem:

/home/paul.caheny/ISV/FY14Q2/GROMACS/G5_INTEL12.1_CUDA5.5/gromacs-5.0/src/external/boost/boost/config/compiler/intel.hpp(40): warning #47: incompatible redefinition of macro "BOOST_COMPILER" (declared at line 11 of "/home/paul.caheny/ISV/FY14Q2/GROMACS/G5_INTEL12.1_CUDA5.5/gromacs-5.0/src/external/boost/boost/config/compiler/nvcc.hpp")
  #define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
          ^

/home/paul.caheny/ISV/FY14Q2/GROMACS/G5_INTEL12.1_CUDA5.5/gromacs-5.0/src/external/boost/boost/config/suffix.hpp(34): warning: #pragma GCC system_header cannot be used in the primary source file

/home/paul.caheny/ISV/FY14Q2/GROMACS/G5_INTEL12.1_CUDA5.5/gromacs-5.0/src/external/boost/boost/config/suffix.hpp(496): error: identifier "__int128" is undefined

/home/paul.caheny/ISV/FY14Q2/GROMACS/G5_INTEL12.1_CUDA5.5/gromacs-5.0/src/external/boost/boost/config/suffix.hpp(497): error: expected a ";"

2 errors detected in the compilation of "/tmp/tmpxft_0000797f_00000000-12_nbnxn_cuda_data_mgmt.compute_35.cpp1


I've tried with GCC 4.8.0/OpenMPI 1.6.4 and it compiles ok and as expected. Any ideas whether I'm doing something wrong in the build or otherwise whether there's a good workaround for the Intel Compiler 14?


Best Regards,

Paul.



---

Paul Caheny
Researcher
Technical Computing Research
Fujitsu Laboratories of Europe Ltd (FLE)
phone: +44 (0) 20 8606 4529
e-mail: Paul.Caheny at uk.fujitsu.com<mailto:Paul.Caheny at uk.fujitsu.com>
web: http://www.fujitsu.com/emea/about/fle/<http://www.fujitsu.com/emea/about/fle>


______________________________________________________________________
                                        
 Fujitsu Laboratories of Europe Limited
 Hayes Park Central, Hayes End Road, Hayes, Middlesex, UB4 8FE
 Registered No. 4153469
 
 This e-mail and any attachments are for the sole use of addressee(s) and
 may contain information which is privileged and confidential. Unauthorised
 use or copying for disclosure is strictly prohibited. The fact that this
 e-mail has been scanned by Trendmicro Interscan does not guarantee that 
 it has not been intercepted or amended nor that it is virus-free.


More information about the gromacs.org_gmx-users mailing list