Dear PGI experts
I am trying to compile the CESM1.0.3 climate model
with pgfortran 11.7.
I used pgfortran 11.7 to build OpenMPI 1.4.4, then I use the
corresponding mpif90 compiler wrapper to compile CESM1.0.3.
The OS is CentOS 5.2 on AMD x86_64 ‘Shanghai’.
The compilation fails.
I am puzzled, because the same code compiles with Intel ifort 10.1.017
[and same OpenMPI 1.4.4].
Here are the compilation command that fails and the error message:
/home/sw/openmpi/1.4.4/gnu-4.1.2-pgi-11.7/bin/mpif90 -c -I. -I/home/sw/netcdf3/3.6.3/gnu-4.1.2-pgi-11.7/include -I/home/sw/netcdf3/3.6.3/gnu-4.1.2-pgi-11.7/include -I. -I/home/gus/src/CESM1.0/cesm1_0_3_working_copy/scripts/F_8p_gp/SourceMods/src.drv -I/home/gus/src/CESM1.0/cesm1_0_3_working_copy/models/drv/driver -I/scratch4/gus/runs/cesm-1.0.3/F_8p_gp/lib/include -DMCT_INTERFACE -DHAVE_MPI -DCO2A -DLINUX -DSEQ_ -DFORTRANUNDERSCORE -DNO_R16 -DNO_SHR_VMATH -DLDEO_EDDY_STAT -i4 -r8 -Mextend -byteswapio -Mflushz -tp=shanghai-64 -fast -Mfprelaxed -free /home/gus/src/CESM1.0/cesm1_0_3_working_copy/models/drv/driver/ccsm_comp_mod.F90
pgfortran-Warning-Unknown switch: -free
PGF90-F-0004-Unable to open MODULE file cam_history_support.mod (/home/gus/src/CESM1.0/cesm1_0_3_working_copy/models/drv/driver/ccsm_comp_mod.F90: 39)
PGF90/x86-64 Linux 11.7-0: compilation aborted
gmake: *** [ccsm_comp_mod.o] Error 2
I presume ‘39’ refers to the failing line on the source code.
However, line 39 of ccsm_comp_mod.F90 doesn’t really point to the module
in the error message [cam_history_support].
It points to another module [shr_orb_mod, which is actually in one of the
include directories in the compilation command line, ‘…/lib/include’].
See:
$ cat -n /home/gus/src/CESM1.0/cesm1_0_3_working_copy/models/drv/driver/ccsm_comp_mod.F90 | head -n 40|tail -n 3
38 use shr_cal_mod, only: shr_cal_date2ymd
39 use shr_orb_mod, only: shr_orb_params
40 use mct_mod ! mct_ wrappers for mct lib
Am I missing something simple here?
Thank you for your help.
Gus Correa