[gmx-users] GROMACS compilation error on ubuntu 15.10 with OpenCL

Josef Mitchell josefmmitchell at gmail.com
Sun Mar 20 18:25:07 CET 2016


I've been unsuccessful at compiling GROMACS with OpenCL on my own.

Machine specifcations are:
AMD HD 7790 GPU (896 cores, 1000Mhz, 2GB GDDR5)
Intel Skylake 2C4T processor @3.9Ghz (no turboboost) B150 chipset.
4x4GB 2666Mhz DDR4 CL16
500GB 2.5" HDD 7200K RPM


This is a updated ubuntu 15.10 clean install.
Kernel is
4.2.0-34-generic

Installed AMD's APP following this guide: wiki.tiker.net/OpenCLHowTo
Tested OpenCL installation using these tools: www.geeks3d.com/glslhacker/

Attempted to compile using following steps, initially following this guide
youtube.com/watch?v=BZNzYt_DUB0 :
ccmake
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DGMX_GPU=on -DGMX_USE_OPENCL=on
make ..
make -j4

ccmake settings:
 BLAS_Accelerate_LIBRARY          BLAS_Accelerate_LIBRARY-NOTFOUND
 BLAS_acml_LIBRARY                BLAS_acml_LIBRARY-NOTFOUND
 BLAS_acml_mp_LIBRARY             BLAS_acml_mp_LIBRARY-NOTFOUND
 BLAS_blas_LIBRARY                /usr/lib/libblas.so.3gf
 BLAS_complib.sgimath_LIBRARY     BLAS_complib.sgimath_LIBRARY-NOTFOUND
 BLAS_cxml_LIBRARY                BLAS_cxml_LIBRARY-NOTFOUND
 BLAS_dxml_LIBRARY                BLAS_dxml_LIBRARY-NOTFOUND
 BLAS_essl_LIBRARY                BLAS_essl_LIBRARY-NOTFOUND
 BLAS_f77blas_LIBRARY             BLAS_f77blas_LIBRARY-NOTFOUND
 BLAS_goto2_LIBRARY               BLAS_goto2_LIBRARY-NOTFOUND
 BLAS_scsl_LIBRARY                BLAS_scsl_LIBRARY-NOTFOUND
 BLAS_sgemm_LIBRARY               BLAS_sgemm_LIBRARY-NOTFOUND
 BLAS_sunperf_LIBRARY             BLAS_sunperf_LIBRARY-NOTFOUND
 BLAS_vecLib_LIBRARY              BLAS_vecLib_LIBRARY-NOTFOUND
 BUILD_SHARED_LIBS                ON
 BUILD_TESTING                    ON
 BZRCOMMAND                       BZRCOMMAND-NOTFOUND
 Boost_DIR                        Boost_DIR-NOTFOUND
 Boost_INCLUDE_DIR                Boost_INCLUDE_DIR-NOTFOUND
 CMAKE_BUILD_TYPE                 Release
 CMAKE_COLOR_MAKEFILE             ON
 CMAKE_CXX_FLAGS
 CMAKE_CXX_FLAGS_ASAN             -O1 -g -fsanitize=address
-fno-omit-frame-pointer
 CMAKE_CXX_FLAGS_DEBUG            -g
 CMAKE_CXX_FLAGS_MINSIZEREL       -Os -DNDEBUG
 CMAKE_CXX_FLAGS_PROFILE          -O3 -DNDEBUG -pg
 CMAKE_CXX_FLAGS_REFERENCE        -O0 -g
 CMAKE_CXX_FLAGS_RELEASE          -O3 -DNDEBUG
 CMAKE_CXX_FLAGS_RELWITHASSERT    -O3
 CMAKE_CXX_FLAGS_RELWITHDEBINFO   -O2 -g -DNDEBUG
 CMAKE_CXX_FLAGS_TSAN             -O1 -g -fsanitize=thread -pie -fPIE
 CMAKE_C_FLAGS
 CMAKE_C_FLAGS_ASAN               -O1 -g -fsanitize=address
-fno-omit-frame-pointer
 CMAKE_C_FLAGS_DEBUG              -g
 CMAKE_C_FLAGS_MINSIZEREL         -Os -DNDEBUG
 CMAKE_C_FLAGS_PROFILE            -O3 -DNDEBUG -pg
 CMAKE_C_FLAGS_REFERENCE          -O0 -g
 CMAKE_C_FLAGS_RELEASE            -O3 -DNDEBUG
 CMAKE_C_FLAGS_RELWITHASSERT      -O3
 CMAKE_C_FLAGS_RELWITHDEBINFO     -O2 -g -DNDEBUG
 CMAKE_C_FLAGS_TSAN               -O1 -g -fsanitize=thread -pie -fPIE
 CMAKE_EXE_LINKER_FLAGS
 CMAKE_EXE_LINKER_FLAGS_DEBUG
 CMAKE_EXE_LINKER_FLAGS_MINSIZE
 CMAKE_EXE_LINKER_FLAGS_REFEREN
 CMAKE_EXE_LINKER_FLAGS_RELEASE
 CMAKE_EXE_LINKER_FLAGS_RELWITH
 CMAKE_EXE_LINKER_FLAGS_RELWITH
 CMAKE_EXPORT_COMPILE_COMMANDS    OFF
 CMAKE_INSTALL_BINDIR             bin
 CMAKE_INSTALL_DATADIR
 CMAKE_INSTALL_DATAROOTDIR        share
 CMAKE_INSTALL_DOCDIR
 CMAKE_INSTALL_INCLUDEDIR         include
 CMAKE_INSTALL_INFODIR
 CMAKE_INSTALL_LIBDIR             lib
 CMAKE_INSTALL_LIBEXECDIR         libexec
 CMAKE_INSTALL_LOCALEDIR
 CMAKE_INSTALL_LOCALSTATEDIR      var
 CMAKE_INSTALL_MANDIR
 CMAKE_INSTALL_OLDINCLUDEDIR      /usr/include
 CMAKE_INSTALL_PREFIX             /usr/local/gromacs
 CMAKE_INSTALL_SBINDIR            sbin
 CMAKE_INSTALL_SHAREDSTATEDIR     com
 CMAKE_INSTALL_SYSCONFDIR         etc
 CMAKE_LD_FLAGS_PROFILE            -pg
 CMAKE_MAKE_PROGRAM               /usr/bin/make
 CMAKE_MODULE_LINKER_FLAGS
 CMAKE_MODULE_LINKER_FLAGS_DEBU
 CMAKE_MODULE_LINKER_FLAGS_MINS
 CMAKE_MODULE_LINKER_FLAGS_RELE
 CMAKE_MODULE_LINKER_FLAGS_RELW
 CMAKE_PREFIX_PATH
 CMAKE_SHARED_LINKER_FLAGS
 CMAKE_SHARED_LINKER_FLAGS_DEBU
 CMAKE_SHARED_LINKER_FLAGS_MINS
 CMAKE_SHARED_LINKER_FLAGS_RELE
 CMAKE_SHARED_LINKER_FLAGS_RELW
 CMAKE_SKIP_INSTALL_RPATH         OFF
 CMAKE_SKIP_RPATH                 OFF
 CMAKE_STATIC_LINKER_FLAGS
 CMAKE_STATIC_LINKER_FLAGS_DEBU
 CMAKE_STATIC_LINKER_FLAGS_MINS
 CMAKE_STATIC_LINKER_FLAGS_RELE
 CMAKE_STATIC_LINKER_FLAGS_RELW
 CMAKE_USE_RELATIVE_PATHS         OFF
 CMAKE_VERBOSE_MAKEFILE           OFF
 COVERAGE_COMMAND                 /usr/bin/gcov
 COVERAGE_EXTRA_FLAGS             -l
 CPACK_BINARY_DEB                 OFF
 CPACK_BINARY_IFW                 OFF
 CPACK_BINARY_NSIS                OFF
 CPACK_BINARY_RPM                 OFF
 CPACK_BINARY_STGZ                ON
 CPACK_BINARY_TBZ2                OFF
 CPACK_BINARY_TGZ                 ON
 CPACK_BINARY_TXZ                 OFF
 CPACK_BINARY_TZ                  ON
 CPACK_SOURCE_TBZ2                ON
 CPACK_SOURCE_TGZ                 ON
 CPACK_SOURCE_TXZ                 ON
 CPACK_SOURCE_TZ                  ON
 CPACK_SOURCE_ZIP                 OFF
 CPPCHECK_EXECUTABLE              CPPCHECK_EXECUTABLE-NOTFOUND
 CPPCHECK_XML_OUTPUT              OFF
 CTEST_SUBMIT_RETRY_COUNT         3
 CTEST_SUBMIT_RETRY_DELAY         5
 CVSCOMMAND                       CVSCOMMAND-NOTFOUND
 CVS_UPDATE_OPTIONS               -d -A -P
 DART_TESTING_TIMEOUT             1500
 DOXYGEN_DOT_EXECUTABLE           DOXYGEN_DOT_EXECUTABLE-NOTFOUND
 DOXYGEN_EXECUTABLE               DOXYGEN_EXECUTABLE-NOTFOUND
 GITCOMMAND                       GITCOMMAND-NOTFOUND
 GMX_BLAS_USER
 GMX_BROKEN_CALLOC                OFF
 GMX_BUILD_FOR_COVERAGE           OFF
 GMX_BUILD_HELP                   OFF
 GMX_BUILD_MANUAL                 OFF
 GMX_BUILD_MDRUN_ONLY             OFF
 GMX_BUILD_OWN_FFTW_MD5           2edab8c06b24feeb3b82bbb3ebf3e7b3
 GMX_BUILD_OWN_FFTW_URL           http://www.fftw.org/fftw-3.3.4.tar.gz
 GMX_BUILD_SHARED_EXE             ON
 GMX_BUILD_TARBALL                OFF
 GMX_BUILD_UNITTESTS              ON
 GMX_COOL_QUOTES                  ON
 GMX_CYCLE_SUBCOUNTERS            OFF
 GMX_DATA_INSTALL_DIR             gromacs
 GMX_DEFAULT_SUFFIX               ON
 GMX_DEVELOPER_BUILD              OFF
 GMX_DISABLE_FFTW_MEASURE         OFF
 GMX_DOUBLE                       OFF
 GMX_EXTERNAL_BLAS                ON
 GMX_EXTERNAL_BOOST               OFF
 GMX_EXTERNAL_LAPACK              ON
 GMX_EXTERNAL_TNG                 OFF
 GMX_EXTRAE                       OFF
 GMX_FAHCORE                      OFF
 GMX_FFT_LIBRARY                  fftw3
 GMX_GIT_VERSION_INFO             OFF
 GMX_LAPACK_USER
 GMX_LIB_INSTALL_DIR              lib
 GMX_LOAD_PLUGINS                 ON
 GMX_MPI                          OFF
 GMX_NACL                         OFF
 GMX_OPENMP                       ON
 GMX_OPENMP_MAX_THREADS           32
 GMX_PREFER_STATIC_LIBS           OFF
 GMX_QMMM_PROGRAM                 None
 GMX_RELAXED_DOUBLE_PRECISION     OFF
 GMX_SIMD                         AVX2_256
 GMX_SIMD_ACCURACY_BITS_DOUBLE    44
 GMX_SIMD_ACCURACY_BITS_SINGLE    22
 GMX_SKIP_DEFAULT_CFLAGS          OFF
 GMX_SOFTWARE_INVSQRT             ON
 GMX_THREAD_MPI                   ON
 GMX_USE_RDTSCP                   ON
 GMX_USE_TNG                      ON
 GMX_VMD_PLUGIN_PATH              /usr/local/lib/vmd/plugins/*/molfile
 GMX_X11                          OFF
 GMX_XML                          ON
 HAVE_LIBM                        /usr/lib/x86_64-linux-gnu/libm.so
 HGCOMMAND                        HGCOMMAND-NOTFOUND
 LAPACK_Accelerate_LIBRARY        LAPACK_Accelerate_LIBRARY-NOTFOUND
 LAPACK_goto2_LIBRARY             LAPACK_goto2_LIBRARY-NOTFOUND
 LAPACK_lapack_LIBRARY            /usr/lib/liblapack.so.3gf
 LAPACK_vecLib_LIBRARY            LAPACK_vecLib_LIBRARY-NOTFOUND
 LIBXML2_INCLUDE_DIR              /usr/include/libxml2
 LIBXML2_LIBRARIES                /usr/lib/x86_64-linux-gnu/libxml2.so
 LIBXML2_XMLLINT_EXECUTABLE       LIBXML2_XMLLINT_EXECUTABLE-NOTFOUND
 MAKECOMMAND                      /usr/bin/cmake --build . --config
"${CTEST_CONFIGURATION_TYPE}" -- -i
 MEMORYCHECK_COMMAND              MEMORYCHECK_COMMAND-NOTFOUND
 MEMORYCHECK_SUPPRESSIONS_FILE
 /home/josef/Desktop/gromacs-5.1.2/cmake/legacy_and_external.supp
 OPENCL_INCLUDE_DIR               /usr/include
 OPENCL_LIBRARY                   /etc/OpenCL/vendors/amdocl64.icd
 OpenMP_CXX_FLAGS                 -fopenmp
 OpenMP_C_FLAGS                   -fopenmp
 P4COMMAND                        P4COMMAND-NOTFOUND
 PKG_CONFIG_EXECUTABLE            /usr/bin/pkg-config
 PYTHONMODULE_PYGMENTS            pygments-NOTFOUND
 PYTHON_EXECUTABLE                /usr/bin/python
 REGRESSIONTEST_DOWNLOAD          OFF
 REGRESSIONTEST_PATH
 SCPCOMMAND                       /usr/bin/scp
 SITE                             Skylake-Platform
 SLURM_SBATCH_COMMAND             SLURM_SBATCH_COMMAND-NOTFOUND
 SLURM_SRUN_COMMAND               SLURM_SRUN_COMMAND-NOTFOUND
 SOURCE_MD5SUM                    unknown
 SPHINX_EXECUTABLE                SPHINX_EXECUTABLE-NOTFOUND
 SVNCOMMAND                       SVNCOMMAND-NOTFOUND
 THREAD_MPI_COPY_BUFFER           OFF
 THREAD_MPI_PROFILING             OFF
 THREAD_MPI_WAIT_FOR_NO_ONE       OFF
 THREAD_MPI_WARNINGS              OFF
 ZLIB_INCLUDE_DIR                 ZLIB_INCLUDE_DIR-NOTFOUND
 ZLIB_LIBRARY                     ZLIB_LIBRARY-NOTFOUND


Output of make -j4 is:

-- The GROMACS-managed build of FFTW 3 will configure with the following
optimizations: --enable-sse2;--enable-avx
-- Configuring done
-- Generating done
-- Build files have been written to: /home/josef/Desktop/gromacs-5.1.2/build
root at Skylake-Platform:/home/josef/Desktop/gromacs-5.1.2/build# make ..
root at Skylake-Platform:/home/josef/Desktop/gromacs-5.1.2/build# make -j4
[  0%] Built target fftwBuild
[  0%] Built target view_objlib
[  0%] Built target mdrun_objlib
Linking CXX shared library ../../lib/libgromacs.so
/usr/bin/ld:/etc/OpenCL/vendors/amdocl64.icd: file format not recognized;
treating as linker script
/usr/bin/ld:/etc/OpenCL/vendors/amdocl64.icd:2: syntax error
collect2: error: ld returned 1 exit status
src/gromacs/CMakeFiles/libgromacs.dir/build.make:24025: recipe for target
'lib/libgromacs.so.1.2.0' failed
make[2]: *** [lib/libgromacs.so.1.2.0] Error 1
CMakeFiles/Makefile2:2074: recipe for target
'src/gromacs/CMakeFiles/libgromacs.dir/all' failed
make[1]: *** [src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2
Makefile:136: recipe for target 'all' failed
make: *** [all] Error 2
root at Skylake-Platform:/home/josef/Desktop/gromacs-5.1.2/build# ^C
root at Skylake-Platform:/home/josef/Desktop/gromacs-5.1.2/build# cd /usr/lib
root at Skylake-Platform:/usr/lib# sudo ln -s /usr/lib/libOpenCL.so.1
libOpenCL.so
root at Skylake-Platform:/usr/lib# cd /home/josef/Desktop/gromacs-5.1.2/build
root at Skylake-Platform:/home/josef/Desktop/gromacs-5.1.2/build# make -j4
[  0%] [  0%] Built target fftwBuild
Built target view_objlib
[  0%] Built target mdrun_objlib
Linking CXX shared library ../../lib/libgromacs.so
/usr/bin/ld:/etc/OpenCL/vendors/amdocl64.icd: file format not recognized;
treating as linker script
/usr/bin/ld:/etc/OpenCL/vendors/amdocl64.icd:2: syntax error
collect2: error: ld returned 1 exit status
src/gromacs/CMakeFiles/libgromacs.dir/build.make:24025: recipe for target
'lib/libgromacs.so.1.2.0' failed
make[2]: *** [lib/libgromacs.so.1.2.0] Error 1
CMakeFiles/Makefile2:2074: recipe for target
'src/gromacs/CMakeFiles/libgromacs.dir/all' failed
make[1]: *** [src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2
Makefile:136: recipe for target 'all' failed
make: *** [all] Error 2

I don't know much about unix so i do not understand to what degree the
issue has to do with symbolic links.
Please advise, at worst, I could make do with a downloadable (linux) binary
which supports OpenCL, if not AVX2 instructions.


More information about the gromacs.org_gmx-users mailing list