Failed compilation of gs2 on Dirac with Intel compilers

Issue #185 resolved
William Hornsby created an issue

Hello,

I'm having problems compiling gs on Dirac with the current master branch. I am getting the following errors:

Compiling : /home/ir-horn2/Code/gs2/src/antenna.f90

Compiling : /home/ir-horn2/Code/gs2/src/geo/ballstab.f90

Compiling : /home/ir-horn2/Code/gs2/generated_src/build_config.f90

/home/ir-horn2/Code/gs2/generated_src/build_config.f90(47): error #6580: Name in only-list does not exist.   [COMPILER_VERSION]

use, intrinsic :: iso_fortran_env, only: compiler_version, compiler_options

---------------------------------------------^

/home/ir-horn2/Code/gs2/generated_src/build_config.f90(47): error #6580: Name in only-list does not exist.   [COMPILER_OPTIONS]

use, intrinsic :: iso_fortran_env, only: compiler_version, compiler_options

---------------------------------------------------------------^

/home/ir-horn2/Code/gs2/generated_src/build_config.f90(55): error #6404: This name does not have a type, and must have an explicit type.   [COMPILER_VERSION]

write(output, '(a, a)') "Built with ", compiler_version()

-------------------------------------------^

/home/ir-horn2/Code/gs2/generated_src/build_config.f90(56): error #6404: This name does not have a type, and must have an explicit type.   [COMPILER_OPTIONS]

write(output, '(a, a)') trim(output) // nl // "Build flags: ", compiler_options()

-------------------------------------------------------------------^

compilation aborted for /home/ir-horn2/Code/gs2/generated_src/build_config.f90 (code 1)

make: *** [/home/ir-horn2/Code/gs2/objs/build_config.o] Error 1

The following modules are loaded:

Currently Loaded Modulefiles:

  1. dot                            6) rhel7/global                  11) intel/libs/tbb/2017.4         16) rhel7/default-peta4           21) fftw/intel/64/3.3.3
  2. slurm                          7) intel/compilers/2017.4        12) intel/libs/ipp/2017.4         17) hdf5/1.12.1
  3. turbovnc/2.0.1                 8) intel/mkl/2017.4              13) intel/libs/daal/2017.4        18) libmatheval/intel/1.1.11
  4. vgl/2.5.1/64                   9) intel/impi/2017.4/intel       14) intel/bundles/complib/2017.4  19) hdf5/impi/1.8.16
  5. singularity/current           10) intel/libs/idb/2017.4         15) cmake/latest                  20) netcdf/4.4.1

And Makefile

# Host: CSD3 Cambridge

# Requires the fftw, netcdf and hdf5 modules to be loaded

helplocal:

# GK_SYSTEM = dirac

# You are using  Makefile.dirac to build gs2 executables on DIRAC.

define STANDARD_SYSTEM_CONFIGURATION

module load fftw ;\

module load netcdf;\

module load hdf5;\

echo Module configuration complete ;\

export MAKEFLAGS='-j -I Makefiles';\

export TESTEXEC='srun -n 24';

endef

COMPILER ?= intel

include Makefile.$(COMPILER)

FC = mpif90

MPIFC = mpif90

FFT_LIB = -lfftw3

NETCDF_LIB = -lnetcdff -lnetcdf

Any help is greatly appreciated. Regards

William

Comments (5)

  1. David Dickinson

    Hi @William Hornsby I think the error is arising as the intel 2017 compiler does not support the f2008 intrinsics compiler_version, compiler_options . The easiest solution may be to use a newer compiler version if available. If this isn’t possible then I think commenting out lines 92, 100 and 101 of src/build_config.fpp should avoid this particular issue. Unfortunately we don’t currently offer an easy way to turn off this use at compile time.

  2. David Dickinson

    Alternatively I’ve just pushed a patch in PR 609 which adds a compile time flag to avoid using these intrinsics. To use this you’ll need to apply the patch and then something like

    make GK_HAS_COMPILER_OPTIONS_2008= gs2 to rebuild without using these intrinsics. This means the build won’t capture the compiler used or the full set of compiler flags.

  3. William Hornsby reporter

    Hello David,

    many thanks for the help and suggestions. Ive tried with intel 2020.4 and this seems to have worked without having to modify the source code. It's compiled a binary at least.

  4. David Dickinson

    I’m glad to hear that it’s working now. Do let me know if there’s anything else I can help with

  5. Log in to comment