Main menu

Navigation

Some IO problems in running SCAM

7 posts / 0 new
Last post
1475922792@...
Some IO problems in running SCAM

Dear all,
I want to run the SCAM by using the configuration. So after I set some options in the file via “./configure (-some options)”, then I typed “gmake”, it comes up to some problems in IO files. I cannot figure out the reason of it. Can somebody help me to solve the problem? Thank you very much!
cesm1_2_0/models/utils/pio/pio_types.F90(13): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [NETCDF]
use netcdf ! _EXTERNAL
---------^
cesm1_2_0/models/utils/pio/pio_types.F90(311): error #6592: This symbol must be a defined parameter, an enumerator, or an argument of an inquiry function that evaluates to a compile-time constant. [NF90_GLOBAL]
integer, public, parameter :: PIO_global = nf90_global
----------------------------------------------^
cesm1_2_0/models/utils/pio/pio_types.F90(312): error #6592: This symbol must be a defined parameter, an enumerator, or an argument of an inquiry function that evaluates to a compile-time constant. [NF90_UNLIMITED]
integer, public, parameter :: PIO_unlimited = nf90_unlimited
-------------------------------------------------^
cesm1_2_0/models/utils/pio/pio_types.F90(313): error #6592: This symbol must be a defined parameter, an enumerator, or an argument of an inquiry function that evaluates to a compile-time constant. [NF90_DOUBLE]
integer, public, parameter :: PIO_double = nf90_double
----------------------------------------------^
cesm1_2_0/models/utils/pio/pio_types.F90(314): error #6592: This symbol must be a defined parameter, an enumerator, or an argument of an inquiry function that evaluates to a compile-time constant. [NF90_REAL]
integer, public, parameter :: PIO_real = nf90_real
----------------------------------------------^
cesm1_2_0/models/utils/pio/pio_types.F90(315): error #6592: This symbol must be a defined parameter, an enumerator, or an argument of an inquiry function that evaluates to a compile-time constant. [NF90_INT]
integer, public, parameter :: PIO_int = nf90_int
----------------------------------------------^
cesm1_2_0/models/utils/pio/pio_types.F90(316): error #6592: This symbol must be a defined parameter, an enumerator, or an argument of an inquiry function that evaluates to a compile-time constant. [NF90_CHAR]
integer, public, parameter :: PIO_char = nf90_char
----------------------------------------------^
cesm1_2_0/models/utils/pio/pio_types.F90(317): error #6592: This symbol must be a defined parameter, an enumerator, or an argument of an inquiry function that evaluates to a compile-time constant. [NF90_NOERR]
integer, public, parameter :: PIO_noerr = nf90_noerr
----------------------------------------------^
Mary

eaton

It appears that the path to the netcdf .mod files is missing.  You can verify this by running configure with the -test option.  There is information about getting started using CAM's configure in the User Guide.

 

1475922792@...

Thank you for your suggestion! It is so useful that can solve some problems, but after I typed the command “./configure -nlev 30 -nospmd -nosmp -test -v -camiop -nc_lib /usr/local/lib -nc_inc /usr/local/include  -dyn eul  -cppdefs  -scam -usr_src /home/cesm1_2_0/models/atm/cam/src  -fc_type intel  -fc ifort -debug -ldflags 'Mnobounds' “, it shows as follows. And I cannot figure out it. You mentioned that it appears have missed the file netcdf.mod. I think so, but how can I add the path when configuring the model?

Thank you very much!

 

Test linking to NetCDF library... **** FAILED ****

Issued the command:

gmake -f /home/cesm1_2_0/models/atm/cam/bld/Makefile test_nc 2>&1

 

The output was:

cat: Srcfiles: No such file or directory

/home/cesm1_2_0/models/atm/cam/bld/Makefile:1052: /home/cesm1_2_0/models/atm/cam/bld/configure-tests/Depends: No such file or directory

/home/cesm1_2_0/models/atm/cam/bld/mkSrcfiles > /home/cesm1_2_0/models/atm/cam/bld/configure-tests/Srcfiles

/home/cesm1_2_0/models/atm/cam/bld/mkDepends Filepath Srcfiles > /home/cesm1_2_0/models/atm/cam/bld/configure-tests/Depends

ifort -c  -I. -I/home/cesm1_2_0/models/atm/cam/bld/configure-tests -I/usr/local/include  -I/home/cesm1_2_0/models/atm/cam/bld/mct/mct -I/home/cesm1_2_0/models/atm/cam/bld/mct/mpeu -I/home/cesm1_2_0/models/atm/cam/bld/mct/mpi-serial -DNO_SHR_VMATH -DSEQ_MCT -DNO_C_SIZEOF -scam   -DFORTRANUNDERSCORE -DCO2A -DMAXPATCH_PFT=numpft+1 -DLSMLAT=1 -DLSMLON=1 -DBFB_CAM_SCAM_IOP -DPLON=128 -DPLAT=64 -DNUM_COMP_INST_ATM=1 -DNUM_COMP_INST_LND=1 -DNUM_COMP_INST_OCN=1 -DNUM_COMP_INST_ICE=1 -DNUM_COMP_INST_GLC=1 -DNUM_COMP_INST_ROF=1 -DNUM_COMP_INST_WAV=1 -DPLEV=30 -DPCNST=25 -DPCOLS=16 -DPSUBCOLS=1 -DPTRM=42 -DPTRN=42 -DPTRK=42 -DCCSMCOUPLED -Dcoupled -Dncdf -DNCAT=1 -DNXGLOB=128 -DNYGLOB=64 -DNTR_AERO=0 -DBLCKX=32 -DBLCKY=32 -DMXBLCKS=8  -DMODAL_AERO -DMODAL_AERO_3MODE  -D_USEBOX -D_NETCDF   -DLINUX -DCPRINTEL -ftz -convert big_endian -fp-model precise  -check all -check noarg_temp_created -fpe0 -g -traceback -DHIDE_MPI -D_MPISERIAL -DNO_MPIMOD -DNO_MPI2 -DNO_SIZEOF  test_nc.F90

ifort: command line warning #10156: ignoring option '-s'; no argument required

test_nc.F90(2): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [NETCDF]

   use netcdf

-------^

test_nc.F90(5): error #6404: This name does not have a type, and must have an explicit type.   [NF90_CREATE]

   ret = nf90_create('foo.nc', NF90_CLOBBER, ncid)

---------^

test_nc.F90(6): error #6404: This name does not have a type, and must have an explicit type.   [NF90_NOERR]

   if ( ret == NF90_NOERR ) then

---------------^

test_nc.F90(9): error #6404: This name does not have a type, and must have an explicit type.   [NF90_STRERROR]

      print *, nf90_strerror( ret )

---------------^

compilation aborted for test_nc.F90 (code 1)

gmake: *** [test_nc.o] Error 1

 

Mary

eaton

There is an error in your configure command which is not causing the current problem, but may cause a problem later.    The arguments "... -cppdefs  -scam ..." are telling configure to treat "-scam" as a CPP define.  So -scam is being given as an argument to ifort (it issues a warning about ignoring the -s option).  Since you are not providing a value to the -cppdefs argument it should be removed.


The best way to find the location of the netcdf include and library files is to consult the system documentation or ask a system administrator.

If you are working on a system that you administer yourself, like a desktop or laptop, then you need to know what tools are available for that system to help finding files.  On my desktop with a linux OS I use the locate command.  So for example I'd search for the netcdf files as follows:


~> locate netcdf.mod
/usr/lib64/gfortran/modules/netcdf.mod
~> locate libnetcdf.a
/usr/lib64/libnetcdf.a
~> locate netcdf.inc
/usr/include/netcdf.inc

When the netcdf.inc and netcdf.mod files are in the same place then you only need to use the -nc_inc argument to configure.  If they are in different places then use both the -nc_inc and -nc_mod arguments.  I would issue the configure command with the following args:

./configure ... -nc_inc /usr/include -nc_mod /usr/lib64/gfortran/modules -nc_lib /usr/lib64


1475922792@...

Thank you for your reply. Your suggestion is very useful to me. After putting your suggestion into practice, it works, namely, it succeed in configuring. But after I typed “gmake”, it arise some problems about csm_share. It shows as follows. Sorry to bother you again. Could you help me again? Thank you! I am particularly grateful to your timely help.

The command of the configuring is “./configure -nlev 30 -nospmd -nosmp -test -v -camiop -nc_lib /cm/shared/apps/netcdf/3.6.0/lib -nc_inc /cm/shared/apps/netcdf/3.6.0/include -nc_mod /cm/shared/apps/netcdf/3.6.0/include  -dyn eul  -cppdefs -DDISABLE_TIMERS  -scam -usr_src /home/cesm1_2_0/models/atm/cam/src  -fc_type intel  -fc ifort -debug -ldflags 'Mnobounds'”.

Then I typed "gmake".

The error is as below:

/home/cesm1_2_0/models/csm_share/shr/shr_spfn_mod.F90(304): error #6407: This symbolic name is not an intrinsic function name or an intr

insic subroutine name.   [ERFC_SCALED]

  intrinsic erfc_scaled

------------^

/home/cesm1_2_0/models/csm_share/shr/shr_spfn_mod.F90(319): error #6407: This symbolic name is not an intrinsic function name or an intr

insic subroutine name.   [ERFC_SCALED]

  intrinsic erfc_scaled

------------^

/home/cesm1_2_0/models/csm_share/shr/shr_spfn_mod.F90(334): error #6407: This symbolic name is not an intrinsic function name or an intr

insic subroutine name.   [GAMMA]

  intrinsic gamma

------------^

/home/cesm1_2_0/models/csm_share/shr/shr_spfn_mod.F90(335): error #7137: Any procedure referenced in a PURE procedure, including one ref

erenced via a defined operation or assignmnent, must be explicitly declared PURE.   [GAMMA]

  res = gamma(x)

--------^

compilation aborted for /home/cesm1_2_0/models/csm_share/shr/shr_spfn_mod.F90 (code 1)

gmake: *** [shr_spfn_mod.o] Error 1

gmake: *** Waiting for unfinished jobs....

 

Mary

eaton

The erfc and gamma intrinsic functions are part of the Fortran 2008 standard.  The failure indicates that you are using an old version of ifort which does not support these features of Fortran 2008.  The best solution is to upgrade the compiler.  Also, netcdf version 3.6.0 is very old and it would be good to upgrade that as well.  If you aren't able to get upgraded software then I'd recommend trying the old (but still supported) cesm1.0.6 release.

1475922792@...

I will download an old release which you just recommended to have a try. Hope it can work. Thank you again for your help!

 

Mary

Log in or register to post comments

Who's new

  • Nicholas.Davis@...
  • numarsanifa@...
  • bingdian_46@...
  • mxy2832029@...
  • nthg2000@...