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

When I run ./$CASE.$MACH.build, I encountered the error (related to m_mctworld.mod)

I am trying to compile CCSM3.0 on a 64-bit linux cluster with Intel Pentium CPUs
using PGI6.1 (and NetCDF-3.6.1 and MPICH-1.2.7).

When I run ./$CASE.$MACH.build, I encountered the following error.
This is related to m_mctworld.mod which we can not find on our directories.
Does anybody know how to get this file or solve this problem:

Many thanks in advance,

-Han,

-----------------------------------------------------------------------------------------------------
mpif90 -I. -I/usr/local/netcdf-3.6.1-64/include -I/usr/include -I/home4/sdhan/model/exe/4213/lib/include -I/usr/local/mpich-1.2.7-64/include -I. -I/home4/sdhan/model/4213/SourceMods/src.cpl -I/home4/sdhan/model/ccsm3_0/models/cpl/cpl6 -I/home4/sdhan/model/ccsm3_0/models/csm_share -I/home4/sdhan/model/ccsm3_0/models/csm_share/shr -I/home4/sdhan/model/ccsm3_0/models/csm_share/cpl -c -r8 -i4 -Kieee -Mrecursive -Mdalign -Mextend -Mfree -DLINUX -DPGF90 -DNO_SHR_VMATH -DLINUX /home4/sdhan/model/ccsm3_0/models/csm_share/cpl/cpl_mct_mod.F90
/home4/sdhan/model/ccsm3_0/models/csm_share/cpl/cpl_mct_mod.F90:
PGF90-F-0004-Unable to open MODULE file m_mctworld.mod (/home4/sdhan/model/ccsm3_0/models/csm_share/cpl/cpl_mct_mod.F90: 37)
PGF90/any Linux/x86-64 6.1-6: compilation aborted
File with unknown suffix passed to linker: /usr/local/pgi/linux86-64/6.1/include/usr/local/mpich-1.2.7-64/include
gmake: *** [cpl_mct_mod.o] Error 2
 
Dear sdhan,

I also have the same problem, and I'd like to ask the same question, have you fix your problem? Thanks,Civi
-----------------------------------------------------------------------------------------
pgf90 -I. -I/home/h/hbkrima1/ccsm3_0/scripts/test_1/SourceMods/src.cpl -I/home/h/hbkrima1/ccsm3_0/models/cpl/cpl6 -I/home/h/hbkrima1/ccsm3_0/models/csm_share -I/home/h/hbkrima1/ccsm3_0/models/csm_share/shr -I/home/h/hbkrima1/ccsm3_0/models/csm_share/cpl -c -r8 -Kieee -Mdalign -Mrecursive -Mextend -O2 -Mfreeform -DLINUX -DPGF90 -DNO_SHR_VMATH -DLINUX /home/h/hbkrima1/ccsm3_0/models/csm_share/cpl/cpl_mct_mod.F90
pgf90 -I. -I/home/h/hbkrima1/ccsm3_0/scripts/test_1/SourceMods/src.cpl -I/home/h/hbkrima1/ccsm3_0/models/cpl/cpl6 -I/home/h/hbkrima1/ccsm3_0/models/csm_share -I/home/h/hbkrima1/ccsm3_0/models/csm_share/shr -I/home/h/hbkrima1/ccsm3_0/models/csm_share/cpl -c -r8 -Kieee -Mdalign -Mrecursive -Mextend -O2 -Mfreeform -DLINUX -DPGF90 -DNO_SHR_VMATH -DLINUX /home/h/hbkrima1/ccsm3_0/models/csm_share/shr/shr_alarm_mod.F90
PGF90-F-0004-Unable to open MODULE file m_mctworld.mod (/home/h/hbkrima1/ccsm3_0/models/csm_share/cpl/cpl_mct_mod.F90: 37)
PGF90/x86-64 Linux 7.2-4: compilation aborted
gmake: *** [cpl_mct_mod.o] Error 2
gmake: *** Waiting for unfinished jobs....
 
I have a draft on my progress compiling CCSM3. It was based on an older version where it was coupled with ibis instead of lnd. Anyway, I don't think it has changed so much that will be troublesome for you.

Well, first of all, forgive if I let pass any badword, it was just a draft and I was bored while doing it :P but I really hope this will help on solving this issue.

First of all, the mctworld.mod is not working cause mct package is not compiling at all. You either fix it so it points to the correct CLOCKS_PER_SEC instead of CLK_TCK (#define CLK_TCK CLOCKS PER SEC) or grab a newer version of mct (http://www.mcs.anl.gov/research/projects/mct/). According to my draft:

--- draft begin ---
"I've got MCT from somewhere (MCTnodata.tar.gz), and threw it replacing ccsm3/model/util/mct directory, so the scripts will install the newer version of MCT (which now refers to CLOCKS_PER_SEC instead of CLK_TCK on mpeu/get_zeits.c."

Anyway, it is generating a wrong Makefile.conf as it loves pgf90 instead of intel, at first I removed pgf90 from path
echo $PATH
export PATH=(what was printed except the additional entry to pgf90)
-- I hope you were smart/lucky enough to install pgf90 on other directory than /usr/bin or /usr/sbin etc! :P In my case, /usr/pgi/bin was it. Otherwise, you will have to change the code into mct or pray for these

Well, not enough. What we want to send to configure mct is the following command:
FPP=icc F90=ifort OPT=-O3 FCFLAGS="-fc=ifort -c -axST -ip -ipo -xST -mtune=core2 -extend-source -i4 -assume byterecl" FPPFLAGS=-c REAL=-r8 ENDIAN="-convert big_endian" CFLAGS="-O3 -fPIC -m64" CXXFLAGS="-O3 -c -fPIC -m64" INCLUDEPATH="$SCRATCH/$CASE/mct/mct" ./configure

The bastard is called from $CASEROOT/$CASE/Buildlib/mct.buildlib. Open it for editing. Near the end, there is an './configure' line sitting innocently. Rip it off. Then put in our beloved long line (the one just above) so the part of the file will look like:

# run configure with correct arguments if necessary
if ($runconf == 1) then
echo "Running configure..."
if ($OS == 'Linux-ia64') then
./configure FCFLAGS="-WB -tpp2 -ip -g -Zp16 -fno-alias -fno-fnalias -stack_temps"
else if ($OS == 'UNICOS') then
./configure FCFLAGS="-s real64 -dp" --enable-selectedrealkind
else
# WARNING: tweaked for ifort compiler, optimized for newer xeons
./configure FPP=icc F90=ifort OPT=-O3 FCFLAGS="-fc=ifort -c -axST -ip -ipo -xST -mtune=core2 -extend-source -i4 -assume byterecl" FPPFLAGS=-c REAL=-r8 ENDIAN="-convert big_endian" CFLAGS="-O3 -fPIC -m64" CXXFLAGS="-O3 -c -fPIC -m64" INCLUDEPATH="$SCRATCH/$CASE/mct/mct"
endif
endif

The comment I added is because our -axST, -xST -mtune options optimizes for xeons with ssse3 and sse4 instruction sets, so it would not work on older xeons (cat /proc/cpuinfo to see which instruction sets your CPU supports).
Notice that the first example is ./configure and into the file it is ./configure . They like csh not bash. In other words, the first sample is the one I developed by configuring manually (experimenting the options comparing to Makefile.conf) from bash shell, and the second is int the csh format to fit the scripts already done.
Now we hapily get to errors while compiling cpl."
--- end of draft ---

Notice that $SCRATCH is the scratch path, and $CASE is just the case name. In the beginning of my draft, I mention:

--- draaftie ---
CASE = avenger
CASEROOT = /home/avenger/ccsm3_ibis/cases
SCRATCH = $CASEROOT/scratch # Important! Define this on your environment variable list as it is not defined into env_run. You could put it into env_run but for every case you will have to manually do so again. Curse ccsm3!
--- draftiend ---

I think it should help you out!

EDIT: Oh yes, there are lotsa flags that are for intel compiler. Skip what are FFLAGS F90FLAGS or CFLAGS CXXFLAGS. One important thing is that one in mct.buildlib, the 'INCLUDEPATH=' part. This makes it so you assure to look for the modules inside mct directory. But other important thing is to make mct compile. I'm not really sure, but I think that the scripts does not see that mct has failed compiling.
 
Top