Building on ARCHER2

Issue #255 resolved
keith.evans created an issue

Hi There, I’ve been trying to get gs2 working on ARCHER2, I’ve been able to clone gs2 and its submodules and I located that that already exists a make file for archer2 however, Im getting compiler errors during building

make -I Makefiles GK_SYSTEM=archer2

Compiling : /mnt/lustre/a2fs-work2/work/y02/y02/kevans86/gs2/generated_src/simpledataiof.f90
ftn-78 ftn: ERROR in command line
The -f option has an invalid argument, "allow-argument-mismatch".
ftn-78 ftn: ERROR in command line
The -f option has an invalid argument, "free-line-length-none".
ftn-78 ftn: ERROR in command line
The -f option has an invalid argument, "no-backslash".
ftn-78 ftn: ERROR in command line
The -f option has an invalid argument, "default-real-8".
ftn-78 ftn: ERROR in command line
The -f option has an invalid argument, "default-double-8".
make: *** [Makefile:716: /mnt/lustre/a2fs-work2/work/y02/y02/kevans86/gs2/objs/simpledataiof.o] Error 1

I’m guessing im not configuring it prior to building, because it strange that the ftn compiler is trying to use gfortran arguments

Thanks

Keith

Comments (14)

  1. David Dickinson

    Hi and thanks for the report. The Archer2 makefile is set up assuming that you are using the gfortran compiler (i.e. that you have done module load PrgEnv-cray). If you'd rather use the cray compiler then I believe you could pass COMPILER=cray as an additional make argument.

  2. David Dickinson

    @K Evans please do let me know if this resolves the issue that you have encountered or if there’s anything else that I can help with.

  3. keith.evans reporter

    Hi David, unfortunately I didnt fix the issue. I’ve loaded PrgEnv-cray and I’ve tried various make options including “make -I Makefiles GK_SYSTEM=archer2 COMPILER=gnu-gfortran” in an attempt to ensure it built with gfortran but I still get the same issue, its still trying to build with ftn

  4. David Dickinson

    @K Evans if you’ve loaded PrgEnv-cray then I think you would want to run make -I Makefiles GK_SYSTEM=archer2 COMPILER=cray. If you do module load PrgEnv-gnu instead then you might be able to use make -I Makefiles GK_SYSTEM=archer2 to build.

    You might need to do make distclean between attempts to ensure that any intermediate files are cleaned up (removed). This can be important when switching compilers or if you change some of the options passed to make.

  5. David Dickinson

    I should also note that on Archer2 the fortran compiler is always accessed via ftn for any of the supported compiler families.

  6. keith.evans reporter

    Hi David, yes that worked thank you, now theres an issue with netcdf module not loading, but I think thats because the module has a different name

  7. David Dickinson

    @K Evans yes it looks like the Archer2 module system may have changed slightly. My setup is effectively

    module load PrgEnv-gnu
    module load cray-hdf5-parallel  cray-fftw cray-netcdf-hdf5parallel
    module load cray-python
    module load netcdf4
    

    and then

    make submodules ; make -j GK_SYSTEM=archer2 MAKEFLAGS=-IMakefiles

    The make submodules is not required in most cases, but I run it anyway out of habit.

  8. David Dickinson

    One can swap cray-hdf5-parallel cray-netcdf-hdf5parallel for cray-hdf5 cray-netcdf if not using parallel I/O

  9. keith.evans reporter

    hi David, thats got me a lot further in the compilation however i’m now getting

    /mnt/lustre/a2fs-work2/work/y02/y02/kevans86/gs2/externals/utils/integration.f90:48:21:

    48 | total = cmplx(klein_sum(real(array)),klein_sum(aimag(array)))
    | 1
    Error: Generic function 'klein_sum' at (1) is not consistent with a specific intrinsic interface
    /mnt/lustre/a2fs-work2/work/y02/y02/kevans86/gs2/externals/utils/integration.f90:34:15:

    34 | total = klein_sum(array)
    | 1
    Error: Generic function 'klein_sum' at (1) is not consistent with a specific intrinsic interface
    make: *** [Makefile:720: /mnt/lustre/a2fs-work2/work/y02/y02/kevans86/gs2/objs/integration.o] Error 1

    Thanks

  10. David Dickinson

    Hi @K Evans that’s quite surprising as I don’t encounter the same issue! Could you report the output of the following, when run from the gs2 directory (/mnt/lustre/a2fs-work2/work/y02/y02/kevans86/gs2/)?

    module list
    git status
    git describe --long
    git submodule status
    

    My only guess is that perhaps there are some leftover object files from earlier attempts at building with a different setup.

    Could you try to see if

    make distclean GK_SYSTEM=archer2 -IMakefiles

    allows a further attempt to build gs2 (make -j GK_SYSTEM=archer2 -IMakefiles) to succeed?

  11. keith.evans reporter

    you were right there was leftover objects, make distclean worked and it’ll now build, thank you very much for your help

  12. David Dickinson

    Thanks for confirming @K Evans I’m glad it’s now working. Do let us know if there are any other issues that we can help with.

  13. Log in to comment