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

make in clm3.5

Can anybody suggest me where i am wrong.
I am getting errors during make like:
./configure
creating /scratch/local2/m220067/CLM-CN/clm3.5/bld/Filepath
creating /scratch/local2/m220067/CLM-CN/clm3.5/bld/misc.h
creating /scratch/local2/m220067/CLM-CN/clm3.5/bld/preproc.h
creating /scratch/local2/m220067/CLM-CN/clm3.5/bld/Makefile
creating /scratch/local2/m220067/CLM-CN/clm3.5/bld/config_cache.xml
configure done.

make
cat: Srcfiles: No such file or directory
Makefile:822: /scratch/local2/m220067/CLM-CN/clm3.5/bld/Depends: No such file or directory
/scratch/local2/m220067/CLM-CN/clm3.5/bld/mkSrcfiles > /scratch/local2/m220067/CLM-CN/clm3.5/bld/Srcfiles
/scratch/local2/m220067/CLM-CN/clm3.5/bld/mkDepends Filepath Srcfiles > /scratch/local2/m220067/CLM-CN/clm3.5/bld/Depends
pgf90 -c -Mfree -I. -I/scratch/local2/m220067/CLM-CN/clm3.5/src/csm_share/shr -I/scratch/local2/m220067/CLM-CN/clm3.5/src/csm_share/eshr -I/scratch/local2/m220067/CLM-CN/clm3.5/src/utils/timing -I/scratch/local2/m220067/CLM-CN/clm3.5/src/utils/mct/mpeu -I/scratch/local2/m220067/CLM-CN/clm3.5/src/utils/mct/mct -I/scratch/local2/m220067/CLM-CN/clm3.5/src/utils/mct/mpi-serial -I/scratch/local2/m220067/CLM-CN/clm3.5/src/utils/esmf_wrf_timemgr -I/scratch/local2/m220067/CLM-CN/clm3.5/src/main -I/scratch/local2/m220067/CLM-CN/clm3.5/src/biogeophys -I/scratch/local2/m220067/CLM-CN/clm3.5/src/biogeochem -I/scratch/local2/m220067/CLM-CN/clm3.5/src/riverroute -I/sw/sarge-ia32/netcdf-3.6.1/include/ -I -DFORTRANUNDERSCORE -DMAXPATCH_PFT=4 -DOFFLINE -DLINUX -i4 -Mdalign -Mextend -byteswapio -O1 /scratch/local2/m220067/CLM-CN/clm3.5/src/csm_share/shr/shr_kind_mod.F90
PGF90-S-0012-Value required for command line switch: -idir
PGF90-S-0011-Unrecognized command line switch: -DFORTRANUNDERSCORE
PGF90/any Linux/x86 6.1-1: compilation completed with severe errors
make: *** [shr_kind_mod.o] Error 2

My run -pc.csh is as follows
setenv USER_FC pgf90
setenv PGI /sw/sarge-ia32/PGI/pgi-6.1-1/linux86/6.1/bin/pgf90
set netcdf = /sw/sarge-ia32/netcdf-3.6.1
setenv INC_NETCDF /sw/sarge-ia32/netcdf-3.6.1/include
setenv LIB_NETCDF /sw/sarge-ia32/netcdf-3.6.1/lib
set mpich = /sw/sarge-ia32/mpich2-1.0.4p1-pgi
setenv INC_MPI ${mpich}/include
setenv LIB_MPI ${mpich}/lib
setenv PATH ${PGI}/bin:${mpich}/bin:${PATH}
setenv MOD_NETCDF $INC_NETCDF
setenv LD_LIBRARY_PATH "${PGI}/linux86/6.1/lib:${LD_LIBRARY_PATH}"

If i will do other way around
./run-pc.csh
creating /scratch/local2/m220067/ptmp/clmrun/bld/Filepath
creating /scratch/local2/m220067/ptmp/clmrun/bld/misc.h
creating /scratch/local2/m220067/ptmp/clmrun/bld/preproc.h
creating /scratch/local2/m220067/ptmp/clmrun/bld/Makefile
creating /scratch/local2/m220067/ptmp/clmrun/bld/config_cache.xml
configure done.
CLM build failed: see /scratch/local2/m220067/ptmp/clmrun/bld/MAKE.out

******************
In test run:
./configure -test
creating /scratch/local2/m220067/CLM-CN/clm3.5/bld/Filepath
creating /scratch/local2/m220067/CLM-CN/clm3.5/bld/misc.h
creating /scratch/local2/m220067/CLM-CN/clm3.5/bld/preproc.h
creating /scratch/local2/m220067/CLM-CN/clm3.5/bld/Makefile
creating /scratch/local2/m220067/CLM-CN/clm3.5/bld/config_cache.xml
Looking for a valid GNU make... using make
Testing for Fortran 90 compatible compiler... **** FAILED ****
Issued the command:
make -f /scratch/local2/m220067/CLM-CN/clm3.5/bld/Makefile test_fc 2>&1

The output was:
cat: Srcfiles: No such file or directory
/scratch/local2/m220067/CLM-CN/clm3.5/bld/Makefile:822: /scratch/local2/m220067/CLM-CN/clm3.5/bld/configure-tests/Depends: No such file or directory
/scratch/local2/m220067/CLM-CN/clm3.5/bld/mkSrcfiles > /scratch/local2/m220067/CLM-CN/clm3.5/bld/configure-tests/Srcfiles
/scratch/local2/m220067/CLM-CN/clm3.5/bld/mkDepends Filepath Srcfiles > /scratch/local2/m220067/CLM-CN/clm3.5/bld/configure-tests/Depends
pgf90 -c -Mfree -I. -I/scratch/local2/m220067/CLM-CN/clm3.5/bld/configure-tests -I/sw/sarge-ia32/netcdf-3.6.1/include/ -I -DFORTRANUNDERSCORE -DMAXPATCH_PFT=4 -DOFFLINE -DLINUX -i4 -Mdalign -Mextend -byteswapio -O1 test_fc.F90
PGF90-S-0012-Value required for command line switch: -idir
PGF90-S-0011-Unrecognized command line switch: -DFORTRANUNDERSCORE
PGF90/any Linux/x86 6.1-1: compilation completed with severe errors
make: *** [test_fc.o] Error 2

Thanks in advance !

:Bikash@Dec2007:
Email: bikashrp@gmail.com
 

slevis

Moderator
Staff member
The user's guide available from the clm3.5 web-page recommends modifying and using the existing jobscripts to submit clm simulations. The jobscript takes care of "configure" and "make". Sounds as though you changed your jobscript as necessary to run on your particular machine.

I noticed that when you ran run-pc.csh you got
CLM build failed: see /scratch/local2/m220067/ptmp/clmrun/bld/MAKE.out
Did you look in MAKE.out? I assume that you didn't modify the clm code. In any case, I would start from MAKE.out for clues. I would also go through all the available documentation to make sure I know how everything works.

I also noticed this error:
PGF90-S-0011-Unrecognized command line switch: -DFORTRANUNDERSCORE
This probably needs to be corrected. I don't know the correct option, but it seems intuitive that this would be wrong as written.

Sam
 
I am following the steps from CLM guide only. When I looked in make.out it says (see below).

./run-pc.csh
cd /scratch/local2/m220067/CLM-CN/ptmp/clmrun/bld
flags to configure are -make -nospmd
creating /scratch/local2/m220067/CLM-CN/ptmp/clmrun/bld/Filepath
creating /scratch/local2/m220067/CLM-CN/ptmp/clmrun/bld/misc.h
creating /scratch/local2/m220067/CLM-CN/ptmp/clmrun/bld/preproc.h
creating /scratch/local2/m220067/CLM-CN/ptmp/clmrun/bld/Makefile
creating /scratch/local2/m220067/CLM-CN/ptmp/clmrun/bld/config_cache.xml
configure done.
Building CLM in /scratch/local2/m220067/CLM-CN/ptmp/clmrun/bld ...
CLM build failed: see /scratch/local2/m220067/CLM-CN/ptmp/clmrun/bld/MAKE.out

more /scratch/local2/m220067/CLM-CN/ptmp/clmrun/bld/MAKE.out
cat: Srcfiles: No such file or directory
Makefile:822: /scratch/local2/m220067/CLM-CN/ptmp/clmrun/bld/Depends: No such file or directory
Here shows many files linkages with the src files and creates .o and .mod files.

>>>
Here in fact I have make and src files in /scratch/local2/m220067/CLM-CN/ptmp/clmrun/bld/Depends directory. Finally says...

PGF90-F-0004-Recompile source file /scratch/local2/m220067/CLM-CN/clm3.5/src/csm_share/shr/shr_kind_mod.F90 (/scratch/local2/m220067/CLM-CN/clm3.5/src/csm_s
hare/shr/shr_ncio_mod.F90: 56)
PGF90/any Linux/x86 6.1-1: compilation aborted
make: *** [shr_ncio_mod.o] Error 2

Then I do nt have any clue here !

@Bikash@
 
Top