CCTM problem and fix
Error message:
/usr/bin/pgf90 -c -DFLDMN=1 -fast -Mdalign -Mextend -Mbyteswapio -DF90=1
Solution:
-DAUTO_ARRAYS=1 -Msecond_underscore -Mnoupcase -Demis_vdif
-DSUBST_MODULES=NOOP_MODULES -DSUBST_GLOBAL_MAX=NOOP_GLOBAL_MAX
-DSUBST_GLOBAL_MIN=NOOP_GLOBAL_MIN
-DSUBST_GLOBAL_MIN_DATA=NOOP_GLOBAL_MIN_DATA
-DSUBST_GLOBAL_TO_LOCAL_COORD=NOOP_GLOBAL_TO_LOCAL_COORD
-DSUBST_GLOBAL_SUM=NOOP_GLOBAL_SUM -DSUBST_LOOP_INDEX=NOOP_LOOP_INDEX
-DSUBST_SUBGRID_INDEX=NOOP_SUBGRID_INDEX
-DSUBST_HI_LO_BND_PE=NOOP_HI_LO_BND_PE -DSUBST_SUM_CHK=NOOP_SUM_CHK
-DSUBST_INIT_ARRAY=NOOP_INIT_ARRAY -DSUBST_COMM=NOOP_COMM
-DSUBST_MY_REGION=NOOP_MY_REGION -DSUBST_SLICE=NOOP_SLICE
-DSUBST_GATHER=NOOP_GATHER -DSUBST_DATA_COPY=NOOP_DATA_COPY
-DSUBST_GRID_ID=The problem with cctm came from non-backward compatible module files created from the STENEX library by the Portland Group Fortran compiler. The module files are created by UCR-RMC with pgf90 3.2-4. Follow the subsequent instructions to create new modules files compatible with your pgf90 compiler:
1. Check out noop_f90 from the stenex library:
- a. set environmental variable CVSROOT
csh/tcsh shell: setenv CVSROOT $M3HOME/tools/STENEX/src
bash/ksh shell: CVSROOT=$M3HOME/tools/STENEX/src export CVSROOT- b. Create a temp directory, for example we call it noop_src (in your home directory):
cd
mkdir noop_src- c. Enter the diretory you just made and check out the stenex noop_f90 source code:
cd noop_srci
cvs checkout noop_f90
CVS will create a directory named noop_f90 under noop_src and copy source code into that directory.- d. replace the Makefile in the noop_f90 directory with the attached Makefile
- e. After you successfully compiled the programs to create the .mod files, commit the changes (new Makefile) by:
cvs commit -m "Modification to Makefile" Makefile- f. Finally, replace the old module files with the new ones The new module files should be in ${M3TOOLS}/stenex/Linux2/
Download makefile here. You will probably need to right click the link and choose 'Save link as'.