Compilation failure

Issue #17 resolved
manodeep created an issue

Hi,

Thanks for creating and maintaining pkdgrav3. I am hoping to run a high-res (~3072^3) dark-matter only simulation with pkdgrav3; such a resolution would not have been possible with (at least my versions of) Gadget3.

On our supercomputer cluster, pkdgrav3 failed to configure even when the appropriate dependencies were loaded. The reported error was that gsl could not be found, even though the gsl module was loaded. We tracked the error down and seemed that the gsl error was really an fftw3 error from a previous step.

In any case, the solution we found was to export CC=mpicc. The final link step failed again but this was because the link step was using g++; after replacing the final g++ with mpic++, I now have an executable of pkdgrav3_mpi.

For reference, I was running ./configure --with-fftw --with-cuda. I have also tried to run ./configure --with-fftw --with-cuda --with-mpi but both of these fail at the gsl-config error (if export CC=mpicc is not active)

I have copy-pasted the error message and attached the config.log file -- hope that helps. Happy to provide further info.

Thanks again for the software!

-Manodeep

checking for fftwf_execute in -lfftw3f... yes
checking for fftwf_mpi_init in -lfftw3f_mpi... yes
checking for fftwf_init_threads in -lfftw3f_threads... yes
checking for gsl-config... /apps/skylake/software/compiler/gcc/6.4.0/gsl/2.4/bin/gsl-config
checking for GSL - version >= 1.8... no
*** Could not run GSL test program, checking why...
*** The test program compiled, but did not run. This usually means
*** that the run-time linker is not finding GSL or finding the wrong
*** version of GSL. If it is not finding GSL, you'll need to set your
*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point
*** to the installed location  Also, make sure you have run ldconfig if that
*** is required on your system
***
*** If you have an old version installed, it is best to remove it, although
*** you may also be able to get things to work by modifying LD_LIBRARY_PATH
configure: error: Unable to locate GNU Scientific Library (gsl)

Loaded modules

[~/research/codes/pkdgrav3 @farnarkle1] module list

Currently Loaded Modules:
  1) binutils/2.30                      6) ifort/2018.1.163-gcc-6.4.0  11) gcc/6.4.0        16) matplotlib/2.2.2-python-3.6.4    21) mpi4py/3.0.0-python-3.6.4
  2) szip/2.1.1                         7) icc/2018.1.163-gcc-6.4.0    12) openblas/0.2.20  17) openmpi/3.0.0                    22) h5py/2.7.1-python-3.6.4
  3) nvidia/.384.90             (H,S)   8) git/2.16.0                  13) gsl/2.4          18) fftw/3.3.7
  4) slurm/.latest              (H,S)   9) cuda/9.0.176                14) sqlite/3.21.0    19) hdf5/1.10.1
  5) intel/2018.1.163-gcc-6.4.0        10) gcccore/6.4.0               15) python/3.6.4     20) scalapack/2.0.2-openblas-0.2.20

  Where:
   S:  Module is Sticky, requires --force to unload or purge
   H:             Hidden Module

Comments (3)

  1. manodeep reporter

    The one-step solution for me was to run ./configure --with-fftw --with-cuda --with-mpi CC=mpicc CXX=mpic++

  2. Douglas Potter repo owner

    pkdgrav3 has been moved to the CMake build system so this report is no longer relevant. CMake should be able to detect gsl more robustly.

  3. manodeep reporter

    The new version with cmake has a compile failure with the following error message. I have included the previous lines as well to provide the context:

    mpic++ -DHAVE_CONFIG_H -I.    -Imdl2/mpi/ -Imdl2 -Iopenpa/src -march=native -I/apps/skylake/software/compiler/gcc/6.4.0/gsl/2.4/include    -g -O2 -MT pkdgrav3_mpi-ic.o -MD -MP -MF .deps/pkdgrav3_mpi-ic.Tpo -c -o pkdgrav3_mpi-ic.o `test -f 'ic.cxx' || echo './'`ic.cxx
    In file included from openpa/src/primitives/opa_gcc_intel_32_64.h:11:0,
                     from openpa/src/opa_primitives.h:106,
                     from openpa/src/opa_queue.h:14,
                     from mdl2/mdlbase.h:34,
                     from mdl2/mpi/mdl.h:20,
                     from pkd.h:24,
                     from pst.h:21,
                     from ic.cxx:27:
    openpa/src/primitives/opa_gcc_intel_32_64_ops.h:93:27: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
         __asm__ __volatile__ ("lock ; add"OPA_SS" %1,%0"
                               ^
    openpa/src/primitives/opa_gcc_intel_32_64_ops.h:101:27: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
         __asm__ __volatile__ ("lock ; inc"OPA_SS" %0"
                               ^
    openpa/src/primitives/opa_gcc_intel_32_64_ops.h:109:27: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
         __asm__ __volatile__ ("lock ; dec"OPA_SS" %0"
                               ^
    openpa/src/primitives/opa_gcc_intel_32_64_ops.h:119:27: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
         __asm__ __volatile__ ("lock ; dec"OPA_SS" %0; setz %1"
                               ^
    In file included from whitenoise.hpp:20:0,
                     from ic.cxx:29:
    gridinfo.hpp:19:10: fatal error: blitz/array.h: No such file or directory
     #include "blitz/array.h"
              ^~~~~~~~~~~~~~~
    compilation terminated.
    

    From the looks of it, since the full path spec to that particular header file is blitz/blitz/array.h, there should be an -I./blitz within the include path. My attempt at fixing via setting CXXFLAGS did not work, so unsure how to fix properly.

    Happy to provide further info if that would be helpful.

    Cheers,

    Manodeep

  4. Log in to comment