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

CESM-1.2.2 porting error

Hello,


We are trying to run cesm1.2.2 on our cluster using PGI compiler. When we are trying to run cesm-setup it giving syntax error.Giving below:

=============================
$ ./cesm_setup
Macros script already created ...skipping
Creating batch script test3.run
Locking file env_mach_pes.xml
Running preview_namelist script
syntax error at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 784, near "$model qw(cpl atm lnd ice ocn glc rof wav)"
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 787.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 792.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 793.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 794.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 795.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 796.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 797.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 798.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 799.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 813.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 815.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 821.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 823.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 829.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 835.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 841.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 847.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 853.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 859.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 865.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 871.
syntax error at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 881, near "}"
/home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist has too many errors.
ERROR: cpl.buildnml.csh failed
ERROR: /home/test1/test3/preview_namelists failed: 25344


So, can you please tell me why this error is coming upon cesm-stup.


Thanks and Regards:


Ankush
 

jedwards

CSEG and Liaisons
Staff member
Line 784 should look like: foreach my $model qw(cpl atm lnd ice ocn glc rof wav) the keyword 'my' is an explicit declaration of $model.   I'm not sure why you would get that error unless the file has been corrupted somehow - what version of perl do you have?
 

jedwards

CSEG and Liaisons
Staff member
Try running perl -c /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist
does it give the same errors?
 
Hello,We had tried perl -c /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist,  it also gives same error$perl -c /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist
syntax error at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 784, near "$model qw(cpl atm lnd ice ocn glc rof wav)"
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 787.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 792.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 793.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 794.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 795.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 796.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 797.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 798.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 799.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 813.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 815.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 821.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 823.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 829.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 835.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 841.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 847.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 853.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 859.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 865.
Global symbol "$model" requires explicit package name at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 871.
syntax error at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 881, near "}"/home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist has too many errors. Also, I had tested this thing with older version of perl (5.14). It also giving qw errorperl -c /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist
Use of qw(...) as parentheses is deprecated at /home/opt/app/csm_collections/cesm1_2_2/models/drv/bld/build-namelist line 784.

Request you to please suggest us the useful setting to get rid of this error. Thanking you in anticipation.Best Regards,
 

jedwards

CSEG and Liaisons
Staff member
Hi Ankush, I think that the older version of perl that you tried will work.   The 'Use of qw' is a warning that can be safely ignored.   We will get a newer version of perl and test our scripts against it.  Let me know if you still have problems when using 5.14
 

jedwards

CSEG and Liaisons
Staff member
With newer versions of perl you need an extra set of parentheses around the use of qw so  foreach my $model qw(cpl atm lnd ice ocn glc rof wav) should beforeach my $model (qw(cpl atm lnd ice ocn glc rof wav))  
 
Hello, Thanks our problem has been solved with lower version of perl.Now, we are facing problem on pio building, when model start building pio, it always halting and stucking on NETCDF built with hdf5 MPIIO support. We are using PGI 13.7 and NETCDF 4.1 and .  After long wait we alwys have to manually stopped compilation process.  I am also attaching log file and macros file for your refernce. While on CESM 1.2.0 we are not getting this problem, model is successfully building  and running. I am not able to understand why cesm1.2.2 compilation process halting on pio stage. We have also set environment varible properly. ==============Model comilpation process==============$/home/opt/app/csm_collections/cesm1_2_2/scripts/create_newcase -case cam53_test7 -mach chandra -res f19_f19 -compset F_2000_CAM5$./cesm_setup#./cam53_test7.build======================================== Thanking you in anticipation.  Thanks and Regards: Ankush  
 

jedwards

CSEG and Liaisons
Staff member
I can't see the actual cause of the failure in what you sent, but I think that you need to update netcdf.   
 
Hi,    I have the same problem,when I test the porting, the error is as follow:[shaobs@login04 scripts]$ ./create_newcase -case test02 -res f45_g37 -compset X -mach sunpc
syntax error at /wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 448, near "$model qw(COMP_ATM COMP_LND COMP_ICE COMP_OCN COMP_GLC COMP_ROF COMP_WAV)"
Global symbol "$model" requires explicit package name at /wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 449.
syntax error at /wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 468, near "} else"
Global symbol "$format" requires explicit package name at /wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 469.
Global symbol "$filename" requires explicit package name at /wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 469.
Global symbol "$group" requires explicit package name at /wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 470.
Global symbol "$xmode" requires explicit package name at /wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 470.
Global symbol "$self" requires explicit package name at /wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 471.
Global symbol "$fh" requires explicit package name at /wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 471.
Global symbol "$group" requires explicit package name at /wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 471.
Global symbol "$self" requires explicit package name at /wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 473.
Global symbol "$fh" requires explicit package name at /wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 473.
Global symbol "$group" requires explicit package name at /wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 473.
Global symbol "$group" requires explicit package name at /wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 474.
Global symbol "$fh" requires explicit package name at /wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 477.
syntax error at /wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm line 479, near "}"
/wps/home/shaobs/cesm1_2_1/scripts/ccsm_utils/Case.template/ConfigCase.pm has too many errors.
Compilation failed in require at ./create_newcase line 361.Is it the because perl5.20 version new? Which version should I try?Thank you.  
 
Hello,
As suggested by you we have updated the netcdf to latest version NETCDF-4.3.3.1 (C) and netcdf-fortran-4.4.2. Also, compiled the netcdf with HDF51.8.18 and Zlib 1.2.8.But still model is halting and stucking on PIO stage. Every time model is stucking on NETCDF built without MPIIO. Our PGI compiler version is 13.7. We are not able to find any clue for this. [root@chandra bin]# tail -f /scratch/test1/csmruns/cam53amipcosp/bld/pio/pio.bldlog.150721-161816
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working Fortran compiler: /opt/pgi/linux86-64/13.7/mpi/openmpi/bin/mpif90
-- Check for working Fortran compiler: /opt/pgi/linux86-64/13.7/mpi/openmpi/bin/mpif90  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /opt/pgi/linux86-64/13.7/mpi/openmpi/bin/mpif90 supports Fortran 90
-- Checking whether /opt/pgi/linux86-64/13.7/mpi/openmpi/bin/mpif90 supports Fortran 90 -- yes
-- Fortran compiler does not support c_sizeof function
NETCDF built without MPIIO Please help , If you required more information please let me know.  Regards
 

jedwards

CSEG and Liaisons
Staff member
That's not an error, just a warning that you do not have parallel netcdf4 - it shouldn't hang at this point.   
 
Thanx for the reply.Yes,  I have also  tried with Intel 14 compiler. It was stucking on  the same point.. Also I have re-downloaded the latest source code from cesm website.But still getting the same problem. We are not able to find out the reason for stucking.I will also check with gcc and gfortran compiler and let you know.
 
Top