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

Porting CESM 1.0.3 to Linux

Hi,

I'm new to modeling and trying to port the CESM to a local Intel Linux machine with GNU compilers. I have tried moving over newer versions of MPI and NetCDF, slightly modifying options, but after everything I try I always get the same error. I believe I've narrowed it down to MPI settings, but I'm not sure where to go to enter these values. What are my options for the variables CPPDEFS, FFLAGS and LDFLAGS in the Macros file? and how can I set some of these MPI values?

I am starting with .generic_linux_intel, and the error I get is,
Wed Sep 7 11:24:20 EDT 2011 /home/atp42/models/scratch/atp42/test_catalina/mct/mct.bldlog.110907-112420
Copying source to CCSM EXEROOT...
New build of MCT
Running configure...
for OS=Linux MACH=catalina2
cat: Filepath: No such file or directory
cat: Srcfiles: No such file or directory
/home/atp42/test_catalina/Tools/mkSrcfiles > /home/atp42/models/scratch/atp42/test_catalina/mct/Srcfiles
cp -f /home/atp42/models/scratch/atp42/test_catalina/mct/Filepath /home/atp42/models/scratch/atp42/test_catalina/mct/Deppath
/home/atp42/test_catalina/Tools/mkDepends Deppath Srcfiles > /home/atp42/models/scratch/atp42/test_catalina/mct/Depends
/bin/tcsh ./configure CC="mpicc" FC="mpif90" F90="mpif90" INCLUDEPATH="-I/usr/lib/openmpi/1.2.8-gcc/bin/include"
Missing }.
gmake: *** [configure] Error 1
cp: cannot stat `Makefile.conf': No such file or directory
Makefile:4: Makefile.conf: No such file or directory
make: *** No rule to make target `Makefile.conf'. Stop.

I'm also not sure where the missing "}" is, I've check over the files I modified 3 times, there are a couple blank variables, but there is no unpaired "{". Where could this be?

are my make.out, config.out and config.log files . (they are zipped because the forum doesn't like the extensions.

Thank you for your help and please let me know if you need more information.
-Aaron
 
So I think I've narrowed down the problem somewhat, but I'm still running into issues. I can manually build the mct part of the model, but not without passing "INCLUDEPATH=-I/usr/lib/openmpi/1.2.8-gcc/include" with the configure command, even though this is the path I entered in the Macros files. Once I do this I can build the model up to pio, but same issue. Any ideas as to what I should change?
 
I've realized that a lot of my issues come from some improperly set arguments in the Macros file. I'm still having trouble finding a good resource to learn how I should set these variables (or what some of them even mean).

Could anyone suggest a good resource to find out what options there are for the CPPDEFS, CFLAGS, FFLAGS, and LDFLAGS?

Thank you!
 
I've managed to have the model build most of the way, but for some reason it fails while trying to build to CCSM executable. I'm not entirely sure what the error message means.

Here is the build script...

[atp42@catalina2 ~/5test]$ ./*build
-------------------------------------------------------------------------
CCSM BUILDNML SCRIPT STARTING
- To prestage restarts, untar a restart.tar file into /home/atp42/models/scratch/atp42/5test/run
- Create modelio namelist input files
CCSM BUILDNML SCRIPT HAS FINISHED SUCCESSFULLY
-------------------------------------------------------------------------
CCSM PRESTAGE SCRIPT STARTING
- CCSM input data directory, DIN_LOC_ROOT_CSMDATA, is /home/atp42/models/Inputdata
- Case input data directory, DIN_LOC_ROOT, is /home/atp42/models/Inputdata
- Checking the existence of input datasets in DIN_LOC_ROOT
CCSM PRESTAGE SCRIPT HAS FINISHED SUCCESSFULLY
-------------------------------------------------------------------------
CCSM BUILDEXE SCRIPT STARTING
- Build Libraries: mct pio csm_share
Mon Sep 12 16:58:31 EDT 2011 /home/atp42/models/scratch/atp42/5test/mct/mct.bldlog.110912-165831
Mon Sep 12 16:58:31 EDT 2011 /home/atp42/models/scratch/atp42/5test/pio/pio.bldlog.110912-165831
Mon Sep 12 16:58:31 EDT 2011 /home/atp42/models/scratch/atp42/5test/csm_share/csm_share.bldlog.110912-165831
Mon Sep 12 16:58:54 EDT 2011 /home/atp42/models/scratch/atp42/5test/run/cpl.bldlog.110912-165831
Mon Sep 12 16:58:54 EDT 2011 /home/atp42/models/scratch/atp42/5test/run/atm.bldlog.110912-165831
Mon Sep 12 16:58:54 EDT 2011 /home/atp42/models/scratch/atp42/5test/run/lnd.bldlog.110912-165831
Mon Sep 12 16:58:54 EDT 2011 /home/atp42/models/scratch/atp42/5test/run/ice.bldlog.110912-165831
Mon Sep 12 16:58:55 EDT 2011 /home/atp42/models/scratch/atp42/5test/run/ocn.bldlog.110912-165831
Mon Sep 12 16:58:55 EDT 2011 /home/atp42/models/scratch/atp42/5test/run/glc.bldlog.110912-165831
Mon Sep 12 16:58:56 EDT 2011 /home/atp42/models/scratch/atp42/5test/run/ccsm.bldlog.110912-165831
ERROR: ccsm.buildexe.csh failed, see /home/atp42/models/scratch/atp42/5test/run/ccsm.bldlog.110912-165831
ERROR: cat /home/atp42/models/scratch/atp42/5test/run/ccsm.bldlog.110912-165831


...and here is the bldlog....


-------------------------------------------------------------------------
Building a single executable version of CCSM
-------------------------------------------------------------------------
cat: Srcfiles: No such file or directory
/home/atp42/5test/Tools/mkSrcfiles > /home/atp42/models/scratch/atp42/5test/ccsm/obj/Srcfiles
.
.

.
usr/lib/openmpi/1.2.8-gcc/bin/mpif90 -o /home/atp42/models/scratch/atp42/5test/run/ccsm.exe ccsm_comp_mod.o ccsm_driver.o map_atmatm_mct.o map_atmice_mct.o map_atmlnd_mct.o map_atmocn_mct.o map_glcglc_mct.o map_iceice_mct.o map_iceocn_mct.o map_lndlnd_mct.o map_ocnocn_mct.o map_rofocn_mct.o map_rofrof_mct.o map_snoglc_mct.o map_snosno_mct.o mrg_x2a_mct.o mrg_x2g_mct.o mrg_x2i_mct.o mrg_x2l_mct.o mrg_x2o_mct.o mrg_x2s_mct.o seq_avdata_mod.o seq_diag_mct.o seq_domain_mct.o seq_flux_mct.o seq_frac_mct.o seq_hist_mod.o seq_rearr_mod.o seq_rest_mod.o -L/home/atp42/models/scratch/atp42/5test/lib -latm -llnd -lice -locn -lglc -L/home/atp42/models/scratch/atp42/5test/lib -lcsm_share -lmct -lmpeu -lpio -L/usr/local/lib -lnetcdf -L/usr/lib/openmpi/1.2.8-gcc/lib -lmpich
/usr/bin/ld: skipping incompatible /home/atp42/models/scratch/atp42/5test/lib/libmct.a when searching for -lmct
/usr/bin/ld: skipping incompatible /home/atp42/models/scratch/atp42/5test/lib/libmct.a when searching for -lmct
/usr/bin/ld: cannot find -lmct
collect2: ld returned 1 exit status
gmake: *** [/home/atp42/models/scratch/atp42/5test/run/ccsm.exe] Error 1


Thank you for any help you can give.
 
Top