[MITgcm-support] Compiling Problems

Samar Khatiwala samar.khatiwala at earth.ox.ac.uk
Wed Aug 14 03:31:04 EDT 2024


Hi Madeleine,

I can’t remember if it is related to your error but I had difficulty compiling one of the checkpoints (68o I think) with the intel compiler. My gfortran optfile is pasted below. I used the following modules:


module --force purge

module load ncarenv

module load gcc/12.2.0

module load cray-mpich

module load ncarcompilers

module load hdf5-mpi

module load netcdf-mpi

It is possible the error has nothing to do with the compiler/build options but your code mods.

Best,

Samar


#!/bin/bash


# Build options for gfortran compiler (GNU) on Linux AMD64 platform

#


NETCDF_F_ROOT=/glade/u/apps/derecho/23.09/spack/opt/spack/netcdf/4.9.2/cray-mpich/8.1.27/gcc/12.2.0/wjvu

NETCDF_C_ROOT=/glade/u/apps/derecho/23.09/spack/opt/spack/netcdf/4.9.2/cray-mpich/8.1.27/gcc/12.2.0/wjvu

MPI_INC_DIR=/opt/cray/pe/mpich/8.1.27/ofi/gnu/9.1/include


FC=mpifort

CC=mpicc

F90C=mpifort


DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4 -DNML_TERMINATOR'

CPP='/usr/bin/cpp  -traditional -P'

EXTENDED_SRC_FLAG='-ffixed-line-length-132'

F90FIXEDFORMAT='-ffixed-form'


CPPINCLUDES=


NOOPTFLAGS='-O0 -fPIC'


FFLAGS="-fPIC -fconvert=big-endian -fimplicit-none -fallow-argument-mismatch"

FDEBUG=''

FFLAGS="$FDEBUG $FFLAGS"


FOPTIM='-O2'

FOPTIM="$FOPTIM"


F90FLAGS=$FFLAGS

F90OPTIM=$FOPTIM


INCLUDEDIRS="${NETCDF_F_ROOT}/include ${NETCDF_C_ROOT}/include"

INCLUDES="-I${NETCDF_F_ROOT}/include -I${NETCDF_C_ROOT}/include"

LIBS="-L${NETCDF_F_ROOT}/lib -lnetcdff -L${NETCDF_C_ROOT}/lib -lnetcdf"


INCLUDES="$INCLUDES -I$MPI_INC_DIR"

INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"

MPIINCLUDEDIR="$MPI_INC_DIR"


On Aug 14, 2024, at 4:08 AM, Madeleine Youngs <myoungs at umd.edu> wrote:

Hi Takaya,

That didn’t seem to fix the issue, but thank you for sending this along!

Madeleine

On Aug 13, 2024, at 6:10 PM, Takaya Uchida <tu22 at fsu.edu> wrote:

Hi Madeleine,

I’ve copy and pasted below the opt file I ended up using to compile MITgcm on Derecho.

#
# Build options for Derecho at NCAR
#

FC=ftn
CC=cc
DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4 -DNML_TERMINATOR'
CPP='cpp -P -traditional'
EXTENDED_SRC_FLAG='-132'
NOOPTFLAGS='-O2 -g -march=core-avx2'
LIBS=''
INCLUDES='-I/opt/cray/pe/mpich/8.1.25/ofi/intel/19.0/include/'

if test "x$DEVEL" != x ; then
    FFLAGS="$FFLAGS  -W0 -WB -convert big_endian -assume byterecl -fPIC -O0 -g -noalign -fpstkchk -check all -fpe0 -traceback -ftrapuv -fpmodel except -warn all -march=core-avx2"
else
    FFLAGS="$FFLAGS  -W0 -WB -convert big_endian -assume byterecl -fPIC -march=core-avx2 -g"
fi

if test "x$IEEE" = x ; then
        FOPTIM='-O2 -align -ip'
        else
        FOPTIM='-O2 -align -ip -mp'
fi
CFLAGS='-O2 -ip -fPIC'

The list of modules I load are:

module load ncarenv/23.09 craype/2.7.23 intel-classic/2023.2.1 ncarcompilers/1.0.0 cray-mpich/8.1.27 hdf5/1.12.2 netcdf/4.9.2

----------------------------------
Takaya Uchida (内田貴也)
Assistant Research Scientist
Florida State University
Center for Ocean-Atmospheric Prediction Studies
https://roxyboy.github.io/

<Center for Ocean-Atmospheric Prediction Studies signature alt.png>

On Aug 13, 2024, at 8:51 PM, Madeleine Youngs <myoungs at umd.edu> wrote:

Hi Everyone,

I am working on compiling checkpoint68y on Derecho using no opt file (?) and I am getting this error.  Any advice on what the issue is?


mpif90 -W0 -WB -msse2 -convert big_endian -assume byterecl -O2 -align -lmpich -lnetcdff -lnetcdf  -c diagnostics_fract_fill.f
cat diagnostics_ini_io.F |  cpp  -traditional -P -DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4 -DALLOW_USE_MPI -DHAVE_SYSTEM -DHAVE_FDATE -DHAVE_ETIME_FCT -DHAVE_CLOC -DHAVE_SETRLSTK -DHAVE_SIGREG -DHAVE_STAT -DHAVE_FLUSH  -I.  | ../../../tools/set64bitConst.sh  > diagnostics_ini_io.f
mpif90 -W0 -WB -msse2 -convert big_endian -assume byterecl -O2 -align -lmpich -lnetcdff -lnetcdf  -c diagnostics_ini_io.f
Cannot disable Fortran error message 6404
diagnostics_ini_io.f(2005): error #6404: This name does not have a type, and must have an explicit type.   [DIAGMDSDIR]
      IF ( diag_mdsio .AND. (diagMdsDir.NE.' ') .AND.
-----------------------------^
Cannot disable Fortran error message 6404
diagnostics_ini_io.f(2006): error #6404: This name does not have a type, and must have an explicit type.   [DIAGMDSDIRCREATE]
     &     diagMdsDirCreate .AND. (mdsioLocalDir.EQ.' ') ) THEN
-----------^
Cannot disable Fortran error message 6514
diagnostics_ini_io.f(2009): error #6514: Substring or array slice notation requires CHARACTER type or array.   [DIAGMDSDIR]
        WRITE(namBuf,'(3A)') ' mkdir -p ', diagMdsDir(1:iL), ' '
-------------------------------------------^
compilation aborted for diagnostics_ini_io.f (code 1)
make[1]: *** [Makefile:1776: diagnostics_ini_io.o] Error 1
make[1]: Leaving directory '/glade/derecho/scratch/myoungs/MITgcm/MultiWidthExperiments/Present9.20.16/build'
make: *** [Makefile:1688: fwd_exe_target] Error 2


Thanks,
Madeleine
_______________________________________________
MITgcm-support mailing list
MITgcm-support at mitgcm.org
http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support

_______________________________________________
MITgcm-support mailing list
MITgcm-support at mitgcm.org
http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support

_______________________________________________
MITgcm-support mailing list
MITgcm-support at mitgcm.org
http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20240814/cda9e6d4/attachment-0001.html>


More information about the MITgcm-support mailing list