Main menu


problem in running cesm1.0.6

19 posts / 0 new
Last post
problem in running cesm1.0.6

i tried running cesm 1.0.6 and encountered the following error in the stage where i was performing a build.


Fatal Error: File 'mpi.mod' opened at (1) is not a GFORTRAN module file

gmake[1]: *** [pio_kinds.o] Error 1

gmake[1]: Leaving directory `/storage/home/aketh/scr_root/test1/pio'

gmake: *** [all] Error 2


cat /home/aketh/scr_root/test1/pio/pio.bldlog.141218-152031

Thu Dec 18 15:21:05 IST 2014 /home/aketh/scr_root/test1/pio/pio.bldlog.141218-152031

Copying source to CCSM EXEROOT...

ignore pio file alloc_mod.F90

ignore pio file box_rearrange.F90

ignore pio file iompi_mod.F90

cp: omitting directory `m4'

ignore pio file piodarray.F90

ignore pio file pio_msg_getput_callbacks.F90

ignore pio file pionfatt_mod.F90

ignore pio file pionfget_mod.F90

ignore pio file pionfput_mod.F90

ignore pio file pionfread_mod.F90

ignore pio file pionfwrite_mod.F90

ignore pio file pio_spmd_utils.F90

ignore pio file pio_support.F90

ignore pio file rearrange.F90

New build of PIO

Running configure...

for OS=Linux MACH=generic_linux_intel

cat: Filepath: No such file or directory

cat: Srcfiles: No such file or directory

/storage/home/aketh/cesm1_0_6/scripts/test1/Tools/mkSrcfiles > /storage/home/aketh/scr_root/test1/pio/Srcfiles

cp -f /storage/home/aketh/scr_root/test1/pio/Filepath /storage/home/aketh/scr_root/test1/pio/Deppath

/storage/home/aketh/cesm1_0_6/scripts/test1/Tools/mkDepends Deppath Srcfiles > /storage/home/aketh/scr_root/test1/pio/Depends

./configure   --disable-mct --disable-timing  CC="mpicc" F90="mpif90" NETCDF_PATH="/storage/softwares/installedsoftware/netcdf" MPI_INC="-I/opt/intel/impi/" 

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables... 

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether mpicc accepts -g... yes

checking for mpicc option to accept ISO C89... none needed

checking for mpicc... mpicc

checking for MPI_Init... yes

checking for mpi.h... yes

checking how to run the C preprocessor... mpicc -E

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking for char... yes

checking size of char... 1

checking for int... yes

checking size of int... 4

checking for float... yes

checking size of float... 4

checking for double... yes

checking size of double... 8

checking for void *... yes

checking size of void *... 8

checking Fortran 90 filename extension... .F90

checking whether we are using the GNU Fortran 90 compiler... yes

checking for mpxlf90_r... no

checking for mpxlf90... no

checking for mpxlf95... no

checking for mpipgf90... no

checking for mpif90... mpif90

checking for mpif.h... yes

checking MPI-IO support in MPI implementation... yes

checking how to get the version output from mpif90... --version

checking whether byte ordering is bigendian... no


checking whether fortran .mod file is uppercase... no

checking for Fortran 90 name-mangling scheme... lower case, underscore

checking for cpp... cpp

checking if Fortran 90 compiler performs preprocessing... yes

checking if C preprocessor can work with Fortran compiler... yes

Full hostname=



using NETCDF_PATH from environment

configure: WARNING: PNETCDF_PATH not found in environment,                            defaulting to /usr/local/pnetcdf

configure: WARNING: not found in PNETCDF_PATH/include                              disabling pnetcdf support 

configure: WARNING: libpnetcdf.a not found in PNETCDF_PATH/lib                              disabling pnetcdf support 

checking Fortran 90 support for sizeof()... no

disabling Fortran sizeof()


Temp variables: {F90=mpif90} {MPIF90=mpif90}


Output Variables: {CC=mpicc} {MPICC=mpicc} {ALLCFLAGS=-g -O2 -DFORTRAN_UNDERSCORE_ -DFORTRANUNDERSCORE -DSYSLINUX -DLINUX -DCPRUNKNOWNCPR} {EXPLICIT_FPP=no} {FPP=cpp} {FPPFLAGS=-P -C -N -traditional} {FC=mpif90} {MPIF90=mpif90}{OPT=} {BIT64=} {REAL8=} {ENDIAN=} {FFLAGS= -I/opt/intel/impi/} {CFLAGS=-g -O2} {F90FLAGS=} {MACHDEFS=-DSYSLINUX -DLINUX -DCPRUNKNOWNCPR} {MPI_INC=-I/opt/intel/impi/} {MPI_LIB=} {MODINC=-I} {INCLUDEPATH=} {AR=ar} {ARFLAGS=cq} {USE_PNETCDF=no} {PNETCDF_PATH=/usr/local/pnetcdf} {USE_NETCDF=yes} {NETCDF_PATH=/storage/softwares/installedsoftware/netcdf} {USE_MCT=no} {USEBOX=yes} {PDEFS= -DSPMD -DHAVE_MPI -DUSEMPIIO -D_NETCDF -D_NOPNETCDF -D_NOUSEMCT -D_USEBOX -DNO_SIZEOF} {PDEFSF= -DSPMD -DHAVE_MPI -DUSEMPIIO -D_NETCDF -D_NOPNETCDF -D_NOUSEMCT -D_USEBOX -DNO_SIZEOF} {PINCS=-I/opt/intel/impi/ -I/storage/softwares/installedsoftware/netcdf/include} {LDLIBS= -L/storage/softwares/installedsoftware/netcdf/lib -lnetcdf } {DEBUG=no}


configure: creating ./config.status

config.status: creating Makefile.conf

Please check the Makefile.conf

Have a nice day!

Making dependencies for pio.F90 --> pio.d

Making dependencies for pio_kinds.F90 --> pio_kinds.d

Making dependencies for nf_mod.F90 --> nf_mod.d

Making dependencies for ionf_mod.F90 --> ionf_mod.d

Making dependencies for pio_types.F90 --> pio_types.d

Making dependencies for piolib_mod.F90 --> piolib_mod.d

Making dependencies for pio_mpi_utils.F90 --> pio_mpi_utils.d

Making dependencies for pio_nf_utils.F90 --> pio_nf_utils.d

Making dependencies for pio_utils.F90 --> pio_utils.d

Making dependencies for pio_quicksort.F90 --> pio_quicksort.d

Making dependencies for pio_msg_mod.F90 --> pio_msg_mod.d

Making dependencies for pio_msg_callbacks.F90 --> pio_msg_callbacks.d

Making dependencies for calcdecomp.F90 --> calcdecomp.d

Making dependencies for calcdisplace_mod.F90 --> calcdisplace_mod.d

/usr/bin/perl > pionfatt_mod.F90

Making dependencies for pionfatt_mod.F90 --> pionfatt_mod.d

/usr/bin/perl > pionfread_mod.F90

Making dependencies for pionfread_mod.F90 --> pionfread_mod.d

/usr/bin/perl > pionfwrite_mod.F90

Making dependencies for pionfwrite_mod.F90 --> pionfwrite_mod.d

/usr/bin/perl > pionfput_mod.F90

Making dependencies for pionfput_mod.F90 --> pionfput_mod.d

/usr/bin/perl > pionfget_mod.F90

Making dependencies for pionfget_mod.F90 --> pionfget_mod.d

/usr/bin/perl > alloc_mod.F90

Making dependencies for alloc_mod.F90 --> alloc_mod.d

/usr/bin/perl > box_rearrange.F90

Making dependencies for box_rearrange.F90 --> box_rearrange.d

/usr/bin/perl > rearrange.F90

Making dependencies for rearrange.F90 --> rearrange.d

/usr/bin/perl > pio_support.F90

Making dependencies for pio_support.F90 --> pio_support.d

/usr/bin/perl > iompi_mod.F90

Making dependencies for iompi_mod.F90 --> iompi_mod.d

/usr/bin/perl > piodarray.F90

Making dependencies for piodarray.F90 --> piodarray.d

/usr/bin/perl > pio_spmd_utils.F90

Making dependencies for pio_spmd_utils.F90 --> pio_spmd_utils.d

/usr/bin/perl > pio_msg_getput_callbacks.F90

Making dependencies for pio_msg_getput_callbacks.F90 --> pio_msg_getput_callbacks.d

Done updating dependencies

gmake[1]: Entering directory `/storage/home/aketh/scr_root/test1/pio'


mpif90 -c -I/opt/intel/impi/  -DSYSLINUX -DLINUX -DCPRUNKNOWNCPR -DSPMD -DHAVE_MPI -DUSEMPIIO -D_NETCDF -D_NOPNETCDF -D_NOUSEMCT -D_USEBOX -DNO_SIZEOF -I/opt/intel/impi/ -I/storage/softwares/installedsoftware/netcdf/include pio_kinds.F90



   use mpi, only : MPI_OFFSET_KIND !_EXTERNAL


Fatal Error: File 'mpi.mod' opened at (1) is not a GFORTRAN module file

gmake[1]: *** [pio_kinds.o] Error 1

gmake[1]: Leaving directory `/storage/home/aketh/scr_root/test1/pio'

gmake: *** [all] Error 2




Your MPI library (at least the Fortran) was not built with the same gfortran version that you are trying to use for CESM.   You can avoid this error in three ways:

Build CESM with the compiler version that was used to build MPI

Build MPI with the compiler version you want to use for CESM.

Add the flag -DNO_MPIMOD to your Macros file to avoid the F90 interface to MPI.    

CESM Software Engineer

i am confused. 

 i use the intel fortran and c compiler.

to add the flag -DNO_MPIMOD in the macros which parameter must be set as _DNO_MPIMOD?

i mean is it FFFLAG CDFLAG etc?




CESM Software Engineer


it is this line i have added the -DNO_MPIMOD  and still no luck the error seems to persist. it doesnt seem to add the -DNO_MPIMOD flag  mpicc -c -g -O2 -DFORTRAN_UNDERSCORE_ -DFORTRANUNDERSCORE -DSYSLINUX -DLINUX -DCPRUNKNOWNCPR -DSPMD -DHAVE_MPI -DUSEMPIIO -D_NETCDF -D_NOPNETCDF -D_NOUSEMCT -D_USEBOX -DNO_SIZEOF  -I/opt/intel/impi/ -I/storage/softwares/installedsoftware/netcdf/include topology.cmpif90 -c -I/opt/intel/impi/  -DSYSLINUX -DLINUX -DCPRUNKNOWNCPR -DSPMD -DHAVE_MPI -DUSEMPIIO -D_NETCDF -D_NOPNETCDF -D_NOUSEMCT -D_USEBOX -DNO_SIZEOF -I/opt/intel/impi/ -I/storage/softwares/installedsoftware/netcdf/include pio_kinds.F90pio_kinds.F90:19.45:    use mpi, only : MPI_OFFSET_KIND !_EXTERNAL                                             1Fatal Error: File 'mpi.mod' opened at (1) is not a GFORTRAN module file gmake[1]: *** [pio_kinds.o] Error 1 gmake[1]: Leaving directory `/storage/home/aketh/scr_root/test1/pio' gmake: *** [all] Error 2

after adding mpiifort instead of mpif90 i got the following error is this a progress or is the original setting right.


Have a nice day!

make[1]: Entering directory `/storage/home/aketh/scr_root/test1/mct/mpeu'

mpicc -c -DSYSLINUX -DCPRINTEL  -g -O2  -I/opt/intel/impi/  -I. -I../ get_zeits.c

mpif90 -c -I/opt/intel/impi/  -I. -I../ -DSYSLINUX -DCPRINTEL -O2  -w -ftz   m_mpif.F90

f951: error: unrecognized command line option "-ftz"

make[1]: *** [m_mpif.o] Error 1

make[1]: Leaving directory `/storage/home/aketh/scr_root/test1/mct/mpeu'

make: *** [subdirs] Error 2


I've been working on porting the cesm-1.0.6 version to a new platform, that uses Intel compilers and Intel MPI.  I have set FC=mpiifort in the Macros.theia file in ccsm_utils/Machines, which should set the compiler at a high level, and should then be used for the value of FC throughout.  My initial compile generated the exact same error reported above here, namely that mpif90 does not understand the -ftz option.  It appears that the mct package does *not* inherit the FC value set in Macros.theia, and is setting FC=mpif90.  For use with Intel MPI, it is required to use the wrapper scripts mpiifort and mpiicc.

To me, this is an error in the coding of the and associated files in the mct package.  

I can get around it by pre-pending to my path, a directory in which I create a soft link for "mpif90", that points to the "mpiifort" in the appropriate directory for the version of Intel MPI used to compile.


Have you tried compiling and running something simple like the mpi hello world program that you can find in the CESM users manual?

CESM Software Engineer

the hello world MPI program seems to be running without any issues. 


however i noticed something strange

mpif90 -f90=ifort -c -I/opt/intel/impi/  -I. -I../ -DSYSLINUX -DCPRINTEL -O2  -w -ftz hello works perfectly and produces an output file with a .o extention.




mpif90 -c -I/opt/intel/impi/  -I. -I../ -DSYSLINUX -DCPRINTEL -O2  -w -ftz hello



produces this error


f951: error: unrecognized command line option "-ftz"



so i believe the problem is with to force mpif90 to use the fortran of intel rather than the GNU.



but i am unable to figure out how to do this.

here is my error log after i did the following it does seem to remove the -ftz error.


export I_MPI_CC=icc


export I_MPI_CXX=icpc


export I_MPI_F77=ifort


export I_MPI_F90=ifort

after adding these to the .bashrc and source ~/.bashrc i stumbled upon another new error    mpicc -c -g -O2 -DFORTRAN_UNDERSCORE_ -DFORTRANUNDERSCORE -DSYSLINUX -DLINUX -DCPRINTEL -DSPMD -DHAVE_MPI -DUSEMPIIO -D_NETCDF -D_NOPNETCDF -D_NOUSEMCT -D_USEBOX  -I/opt/intel/impi/ -I/storage/softwares/installedsoftware/netcdf/include topology.c    mpif90 -c -r8 -convert big_endian  -I/opt/intel/impi/ -w -ftz -assume byterecl -DSYSLINUX -DLINUX -DCPRINTEL -DSPMD -DHAVE_MPI -DUSEMPIIO -D_NETCDF -D_NOPNETCDF -D_NOUSEMCT -D_USEBOX -I/opt/intel/impi/ -I/storage/softwares/installedsoftware/netcdf/include pio_kinds.F90    pio_kinds.F90(19): error #7881: This module file was generated for a different platform or by an incompatible compiler or compiler release. It cannot be read.   [MPI]   use mpi, only : MPI_OFFSET_KIND !_EXTERNAL-------^pio_kinds.F90(40): error #6592: This symbol must be a defined parameter, an enumerator, or an argument of an inquiry function that evaluates to a compile-time constant.   [MPI_OFFSET_KIND]      PIO_OFFSET = MPI_OFFSET_KIND-------------------^pio_kinds.F90(19): error #6580: Name in only-list does not exist.   [MPI_OFFSET_KIND]   use mpi, only : MPI_OFFSET_KIND !_EXTERNAL  

Add -DNO_MPIMOD to your CPPDEFS.   

CESM Software Engineer

that is something i am unable to do.


-DNO_MPIMOD is already added to the CPPDEFS. i use 1.0.6 version of CESM i also performed a cleanbuild before a build and then build still the issue persists.  

I think that in 1_0_6 the clean build may not always clean everything - try completely removing your build directory and starting over:


rm -fr /storage/home/aketh/scr_root/test1

CESM Software Engineer

i tried with deleting a creating a fresh case it still fails with the same error.

checking the error log it isnt using the _DNO_MPIMOD flag which means there must be something thats stopping the compiler to set the flag which i am unable to figure out.

i performed a cd to /storage/home/aketh/scr_root/test1/pio

and tried this 


 mpif90 -c -I/opt/intel/impi/  -DSYSLINUX -DLINUX -DCPRUNKNOWNCPR -DSPMD -DHAVE_MPI -DUSEMPIIO -D_NETCDF -D_NOPNETCDF -D_NOUSEMCT -D_USEBOX -I/opt/intel/impi/ -I/storage/softwares/installedsoftware/netcdf/include pio_kinds.F90 and encountered the same error


while with this


 mpif90 -c -I/opt/intel/impi/  -DSYSLINUX -DLINUX -DCPRUNKNOWNCPR -DSPMD -DHAVE_MPI -DUSEMPIIO -D_NETCDF -D_NOPNETCDF -D_NOUSEMCT -D_USEBOX -DNO_MPIMOD -I/opt/intel/impi/ -I/storage/softwares/installedsoftware/netcdf/include pio_kinds.F90

there is a successful compilation i feel there is a way to add to CPPDEFS to take up userdefined flags which i am unable to figure out.


> i feel there is a way to add to CPPDEFS to take up userdefined flags which i am unable to figure out.

You should have a file in your case directory called Macros.machine  The first line of that file should be CPPDEFS.

CESM Software Engineer

i managed a successful build and run.

but while performing the submir i got the follwing output is this something to do with the dead component set.


check_case OK

UNSET: Command not found.


Grep your case directory for UNSET - you still haven't fully defined your platform.

CESM Software Engineer

all i got after fixing the UNSET problen was



















 - To prestage restarts, untar a restart.tar file into /home/aketh/scr_root/test1/run

 - Create modelio namelist input files




 - CCSM input data directory, DIN_LOC_ROOT_CSMDATA, is /home/aketh/inputdata

 - Case input data directory, DIN_LOC_ROOT, is /home/aketh/inputdata

 - Checking the existence of input datasets in DIN_LOC_ROOT


Fri Dec 26 12:09:24 IST 2014 -- CSM EXECUTION BEGINS HERE



is this right. i am using the dead component set.

Log in or register to post comments

Who's new

  • 1658093099@...
  • mborreggine@...
  • kabirtam@...
  • suns@...
  • liangpeng0405@...