Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

compilation error of CESM1.1

I am installing CESM1.1 on my machine and got the following error as building pio lib. mpif90  -c -Dlinux -DMCT_INTERFACE -DHAVE_MPI -DFORTRANUNDERSCORE -DNO_SHR_VMATH -DNO_R16 -Dlinux -DCPRPGI -DSPMD -DHAVE_MPI -DUSEMPIIO -DSYSLINUX -D_NETCDF -I/opt/netcdf/include -D_NOPNETCDF -DTIMING  -i4 -gopt -Mlist -time -Mextend -byteswapio -Mflushz -Kieee   -Mfree  -I.  -I/opt/netcdf/include -I/opt/pgi/linux86-64/2012/mpi/mpich/include -I/tng4/users/ldiao/CESM/cesm1_1/exe/mct/mct -I/tng4/users/ldiao/CESM/cesm1_1/exe/mct/mpeu -I/tng4/users/ldiao/CESM/cesm1_1/exe/pio -I/tng4/users/ldiao/CESM/cesm1_1/models/utils/pio -I/tng4/users/ldiao/CESM/cesm1_1/exe/lib/include -I/opt/netcdf/include   -I../timing  /tng4/users/ldiao/CESM/cesm1_1/models/utils/pio/ionf_mod.F90
PGF90-F-0004-Unable to open MODULE file perf_utils.mod (/tng4/users/ldiao/CESM/cesm1_1/models/utils/pio/ionf_mod.F90: 18)
PGF90/x86-64 Linux 12.10-0: compilation aborted
gmake[1]: *** [/tng4/users/ldiao/CESM/cesm1_1/models/utils/pio/ionf_mod.o] Error 2
gmake[1]: Leaving directory `/tng4/users/ldiao/CESM/cesm1_1/exe/pio'
gmake: *** [all] Error 2

It looks stange since ionf_mod.F90 doesn't need perf_utils.mod.  Any suggestions will be appreciated.
 

jedwards

CSEG and Liaisons
Staff member
In fortran 90 you can have dependancy chains of module files, module A uses module B uses module C etc.    In the past most compilers would require module B but not module C be in the include path when compiling module A.   PGI has recently decided that module C also needs to be in the include path.   To fix this an update is required in file scripts/ccsm_utils/Machines/buildlib.pio I've attached an update that should work.    I am concerned that you are using cesm1.1 which has a couple of serious known problems.   I recommend that you start over with cesm1.1.1 (you'll still have the pio build problem though).   Jim
 
Hi, Jim:
I already switched to v1.1.1 and updated the buildlib.pio file provided by you. The same error still occurs. Can you guide me working out this error? thank you very much!
 

jedwards

CSEG and Liaisons
Staff member
Sorry I gave you the wrong fix.  The file perf_utils.mod  should be in /tng4/users/ldiao/CESM/cesm1_1/exe/gptl You can either add -I/tng4/users/ldiao/CESM/cesm1_1/exe/gptl to your include path or copy /tng4/users/ldiao/CESM/cesm1_1/exe/gptl/*.mod /tng4/users/ldiao/CESM/cesm1_1/exe/lib/include  
 
Hi, jedwards:Your suggestion works this time. but I got new error message as below still for pio lib:mpif90  -c -Dlinux -DMCT_INTERFACE -DHAVE_MPI -DFORTRANUNDERSCORE -DNO_SHR_VMATH -DNO_R16 -Dlinux -DCPRPGI -DSPMD -DHAVE_MPI -DSYSLINUX -D_NETCDF -I/opt/netcdf/include -D_NOPNETCDF -DTIMING  -i4 -gopt -Mlist -time -Mextend -byteswapio -Mflushz -Kieee   -Mfree  -I.  -I/opt/netcdf/include -I/tng4/users/ldiao/CESM/cesm1_1_1/exe/mct/mct -I/tng4/users/ldiao/CESM/cesm1_1_1/exe/mct/mpeu -I/tng4/users/ldiao/CESM/cesm1_1_1/exe/pio -I/tng4/users/ldiao/CESM/cesm1_1_1/models/utils/pio -I/tng4/users/ldiao/CESM/cesm1_1_1/exe/lib/include -I/opt/netcdf/include   -I../timing  /tng4/users/ldiao/CESM/cesm1_1_1/models/utils/pio/pionfput_mod.F90
PGF90-W-0435-Array declared with zero size (/tng4/users/ldiao/CESM/cesm1_1_1/models/utils/pio/pionfput_mod.F90: 627)I still have no idea about how to fix this problem. I hope you can give me suggestion again. Million thanks.
 

jedwards

CSEG and Liaisons
Staff member
> PGF90-W-0435-Array declared with zero size (/tng4/users/ldiao/CESM/cesm1_1_1/models/utils/pio/pionfput_mod.F90: 627) That is a warning that you can safely ignore.  
 
Hi, Jedward:Ok, then the true problem is the following which caused the installation failed. mpif90  -c -Dlinux -DMCT_INTERFACE -DHAVE_MPI -DFORTRANUNDERSCORE -DNO_SHR_VMATH -DNO_R16 -Dlinux -DCPRPGI -DSPMD -DHAVE_MPI -DSYSLINUX -D_NETCDF -I/opt/netcdf/include -D_NOPNETCDF -DTIMING  -i4 -gopt -Mlist -time -Mextend -byteswapio -Mflushz -Kieee   -Mfree  -I.  -I/opt/netcdf/include -I/tng4/users/ldiao/CESM/cesm1_1_1/exe/mct/mct -I/tng4/users/ldiao/CESM/cesm1_1_1/exe/mct/mpeu -I/tng4/users/ldiao/CESM/cesm1_1_1/exe/pio -I/tng4/users/ldiao/CESM/cesm1_1_1/models/utils/pio -I/tng4/users/ldiao/CESM/cesm1_1_1/exe/lib/include -I/opt/netcdf/include   -I../timing  /tng4/users/ldiao/CESM/cesm1_1_1/models/utils/pio/pionfput_mod.F90PGF90-S-0155-Could not resolve generic procedure mpi_bcast (/tng4/users/ldiao/CESM/cesm1_1_1/models/utils/pio/pionfput_mod.F90: 1040)
  0 inform,   0 warnings,   1 severes, 0 fatal for put_var_3d_text

PGF90-S-0155-Could not resolve generic procedure mpi_bcast (/tng4/users/ldiao/CESM/cesm1_1_1/models/utils/pio/pionfput_mod.F90: 4368)
  0 inform,   0 warnings,   1 severes, 0 fatal for put_vara_4d_text

PGF90-S-0155-Could not resolve generic procedure mpi_bcast (/tng4/users/ldiao/CESM/cesm1_1_1/models/utils/pio/pionfput_mod.F90: 5061)
  0 inform,   0 warnings,   1 severes, 0 fatal for put_vara_5d_int

gmake[1]: *** [/tng4/users/ldiao/CESM/cesm1_1_1/models/utils/pio/pionfput_mod.o] Error 2
gmake[1]: Leaving directory `/tng4/users/ldiao/CESM/cesm1_1_1/exe/pio'
gmake: *** [all] Error 2

there are dozens of similar error messages. Thanks for your help!
 

jedwards

CSEG and Liaisons
Staff member
Hi Lijun,I've not seen this problem before - what MPI library and version are you using?   It looks like a problem in the F90 module mpi.mod.    A workaround would be to add the flag-DNO_MPIMOD to your cppdefs. 
 
Hi, Jedward: Although adding -DNO_MPIMOD option works, but what does it actally mean and will it affect the parallel execution of the cesm.exe?I got the last error message in the command line as:-L/opt/pgi/linux86-64/2012/mpi/mpich/lib –lmpi  /usr/bin/ld: cannot find -lmpigmake: *** [/tng4/users/ldiao/CESM/cesm1_1_1/exe/cesm.exe] Error 2in my path there is indeed no mpi lib, but I do have mpich lib. Can I change it from -lmpi to -lmpich?I feel if it is not my fault, CESM1.1.1 has deficiencies on installing. But anyway I am very indebted to your efforts.
 

jedwards

CSEG and Liaisons
Staff member
It should be something iikeSLIBS+= $(shell $(NETCDF_PATH)/bin/nf-config --flibs) In your case Macros file.   Look in file scripts/ccsm_utils/Machines/config_compilers.xml  for the place to change it permanently.
 
I am having the same error. I could compile the code earlier but had to change the pgi compiler to 12.10 instead of 12.5 I was using earlier and now I am getting this error. I saw the solution above but that path does not exist in my script. I hope someoen can help.

mpif90  -c -DLINUX -DMCT_INTERFACE -DHAVE_MPI -DFORTRANUNDERSCORE -DNO_SHR_VMATH -DNO_R16 -DLINUX -DCPRPGI -DHAVE_SLASHPROC -DSPMD -DHAVE_MPI -DUSEMPIIO -DSYSLINUX -D_NETCDF -I/global/software/sl-6.x86_64/modules/pgi/12.10/netcdf/4.2.1.1-pgi-s/include -D_NOPNETCDF -DTIMING  -i4 -gopt -Mlist -time -Mextend -byteswapio -Mflushz -Kieee   -Mfree  -I.  -I/global/software/sl-6.x86_64/modules/pgi/12.10/netcdf/4.2.1.1-pgi-s/include -I/global/software/sl-6.x86_64/modules/pgi/12.10/netcdf/4.2.1.1-pgi-s/include -I/global/scratch/rsingh/cesm1_1_1/cesmrun/sfrec_assim_test/bld/mct/mct -I/global/scratch/rsingh/cesm1_1_1/cesmrun/sfrec_assim_test/bld/mct/mpeu -I/global/scratch/rsingh/cesm1_1_1/cesmrun/sfrec_assim_test/bld/pio -I/global/scratch/rsingh/cesm1_1_1/models/utils/pio -I/global/scratch/rsingh/cesm1_1_1/cesmrun/sfrec_assim_test/bld/lib/include -I/global/software/sl-6.x86_64/modules/pgi/12.10/netcdf/4.2.1.1-pgi-s/include   -I../timing  /global/scratch/rsingh/cesm1_1_1/models/utils/pio/ionf_mod.F90PGF90-F-0004-Unable to open MODULE file perf_utils.mod (/global/scratch/rsingh/cesm1_1_1/models/utils/pio/ionf_mod.F90: 18)PGF90/x86-64 Linux 12.10-0: compilation abortedgmake[1]: *** [/global/scratch/rsingh/cesm1_1_1/models/utils/pio/ionf_mod.o] Error 2gmake[1]: Leaving directory `/global/scratch/rsingh/cesm1_1_1/cesmrun/sfrec_assim_test/bld/pio' gmake: *** [all] Error 2 
 

jedwards

CSEG and Liaisons
Staff member
The file perf_utils.mod  should be in /tng4/users/ldiao/CESM/cesm1_1/exe/gptl You can either add -I/tng4/users/ldiao/CESM/cesm1_1/exe/gptl to your include path orcopy /tng4/users/ldiao/CESM/cesm1_1/exe/gptl/*.mod /tng4/users/ldiao/CESM/cesm1_1/exe/lib/include Just replace /tng4/users/ldiao/CESM/cesm1_1  with/global/scratch/rsingh/cesm1_1_1/cesmrun/sfrec_assim_test/
 
Top