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

build error: cannot be redeclared

hello! there is  an error  happened when I am building the 1.2.2 with pgi  17.4 compiler, If anyone has any ideas for me to try, that would be greatly appreciated. and the fortran code error is as flow:mpif90  -c -I.  -I/sinoecodata/DATA/CESM/root/t40.T2000/bld/pgi/mpich/nodebug/nothreads/include -I/sinoecodata/DATA/CESM/root/t40.T2000/bld/pgi/mpich/nodebug/nothreads/MCT/noesmf/a1l1r1i1o1g1w1/csm_share -I/usr/local/netcdf4/include -I/usr/local/mpich_pgcc/include -I/sinoecodata/DATA/CESM/root/t40.T2000/bld/pgi/mpich/nodebug/nothreads/include -I/root/public/cesm1_2_2/models/csm_share/shr -I. -I/root/public/cesm1_2_2/scripts/t40.T2000/SourceMods/src.clm -I/root/public/cesm1_2_2/models/lnd/clm/src/cpl_share -I/root/public/cesm1_2_2/models/lnd/clm/src/util_share -I/root/public/cesm1_2_2/models/lnd/clm/src/clm4_0/main -I/root/public/cesm1_2_2/models/lnd/clm/src/clm4_0/biogeophys -I/root/public/cesm1_2_2/models/lnd/clm/src/clm4_0/biogeochem -I/root/public/cesm1_2_2/models/lnd/clm/src/cpl_mct -I/sinoecodata/DATA/CESM/root/t40.T2000/bld/lib/include  -I/sinoecodata/DATA/CESM/root/t40.T2000/bld/pgi/mpich/nodebug/nothreads/pio/pio -i4 -gopt -Mlist -time -Mextend -byteswapio -Mflushz -Kieee   -nomp  -DMAXPATCH_PFT=17 -DLINUX  -DNDEBUG -DMCT_INTERFACE -DHAVE_MPI -DFORTRANUNDERSCORE -DNO_SHR_VMATH -DNO_R16   -DLINUX -DCPRPGI  -DHAVE_SLASHPROC -Mfree   /root/public/cesm1_2_2/models/lnd/clm/src/util_share/decompInitMod.F90PGF90-S-0155-lsize is use associated and cannot be redeclared (/root/public/cesm1_2_2/models/lnd/clm/src/util_share/decompInitMod.F90: 350)  0 inform,   0 warnings,   1 severes, 0 fatal for decompinit_glcp/root/public/cesm1_2_2/scripts/t40.T2000/Tools/Makefile:640: recipe for target 'decompInitMod.o' failed gmake: *** [decompInitMod.o] Error 2Thanks in advance!!
 
i don't know how to solve this porblem, but this happened because the variables have been defined in the other fortran file, and it is also defined in this module's subroutine, so the confilct happed. the variable lsize has been defined in the module mct_mod.F90, but in this module's subroutine it is also defined with the same name. therefore, there is a conflict about the variable. some compilers may be able to ignore this error, which is compiled in the past, but the PGI compiler does not recognize this variable, so the compiler error is happened. whether there is a compiler option with PGI compiler, which can effectively solve this problem? or how to modify the code to go through the PGI compiler?
 
Since in that subroutine "lsize" is just a local variable, so probably you can safely change that variable to a different name, such as "local_size".But make sure to change all the places where it is declared, and used.
 
Since in that subroutine "lsize" is just a local variable, so probably you can safely change that variable to a different name, such as "local_size".But make sure to change all the places where it is declared, and used.
 
as the method what you have said, i changed the fortran code, just only tow fortran code files, which can be seen in the attachment. the complete program is no longer problemed with the pgi compiler, but the program terminated unexpectedly while running. can you help me to check the code, wheath there is any error in there? and why the program is terminated? the program running error is as flow:cesm.log.170916-154508points.  Reset to  0.0E+00 Worst =-1.1E-11 at i,k=   4  1 QNEG3 from TPHYSBCb:m=  3 lat/lchnk=   1801 Min. mixing ratio violated at    1 points.  Reset to  0.0E+00 Worst =-2.3E-11 at i,k=   4  1 QNEG3 from TPHYSBCb:m=  3 lat/lchnk=   1802 Min. mixing ratio violated at    1 points.  Reset to  0.0E+00 Worst =-5.1E-12 at i,k=   4  1 Opened file ./t40.T2000.clm2.r.0001-01-06-00000.nc to write       458752 Opened file ./t40.T2000.clm2.rh0.0001-01-06-00000.nc to write       524288 ====================================================================================   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES=   PID 11491 RUNNING AT iZ8vbbzoh0rwvg8o8879djZ=   EXIT CODE: 9=   CLEANING UP REMAINING PROCESSES=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES===================================================================================YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Killed (signal 9)This typically refers to a problem with your application.Please see the FAQ page for debugging suggestions cpl.log.170916-154508elth, atm merge:           unset field_ocn,kof,imerge,amerge,xmerge= Fioi_melth           33  F  T  T  ocn field:          _meltw, xao merge:           unset, ice merge:          _meltw, atm merge:           unset field_ocn,kof,imerge,amerge,xmerge= Fioi_meltw           34  F  T  T  ocn field:           _salt, xao merge:           unset, ice merge:           _salt, atm merge:           unset field_ocn,kof,imerge,amerge,xmerge= Fioi_salt           35  F  T  T tStamp_write: model date =    10102       0 wall clock = 2017-09-16 21:10:27 avg dt = 13938.42 dt = 13938.42 memory_write: model date =    10102       0 memory =     270.12 MB (highwater)         -0.00 MB (usage)  (pe=    0 comps= cpl ATM LND OCN ICE GLC ROF WAV) tStamp_write: model date =    10103       0 wall clock = 2017-09-16 23:53:12 avg dt = 11851.70 dt =  9764.97 memory_write: model date =    10103       0 memory =     349.06 MB (highwater)         -0.00 MB (usage)  (pe=    0 comps= cpl ATM LND OCN ICE GLC ROF WAV) tStamp_write: model date =    10104       0 wall clock = 2017-09-17 02:16:51 avg dt = 10774.25 dt =  8619.37 memory_write: model date =    10104       0 memory =     354.36 MB (highwater)         -0.00 MB (usage)  (pe=    0 comps= cpl ATM LND OCN ICE GLC ROF WAV) tStamp_write: model date =    10105       0 wall clock = 2017-09-17 04:34:23 avg dt = 10143.59 dt =  8251.60 thanks for your answer in advance!!
 
i don't think there is error, "EXIT CODE: 9" which means like this job was killed, perhaps because of my hard disk is full, so i re submit the job again, found that there is no error occurred. the program running log now is as follows:------------------------------------------------------------------------- CESM BUILDNML SCRIPT STARTING - To prestage restarts, untar a restart.tar file into /sinoecodata/DATA/CESM/root/z40.Z4000/run infile is /root/public/cesm1_2_2/scripts/z40.Z4000/Buildconf/cplconf/cesm_namelistCAM writing dry deposition namelist to drv_flds_inCAM writing namelist to atm_inCLM configure done.CLM adding use_case 2000_control defaults for var sim_year with val 2000CLM adding use_case 2000_control defaults for var sim_year_range with val constantCLM adding use_case 2000_control defaults for var use_case_desc with val Conditions to simulate 2000 land-useCICE configure done.POP2 build-namelist: ocn_grid is gx1v6POP2 build-namelist: ocn_tracer_modules are  iage CESM BUILDNML SCRIPT HAS FINISHED SUCCESSFULLY-------------------------------------------------------------------------------------------------------------------------------------------------- CESM PRESTAGE SCRIPT STARTING - Case input data directory, DIN_LOC_ROOT, is /sinoecodata/DATA/CESM/inputdata - Checking the existence of input datasets in DIN_LOC_ROOT CESM PRESTAGE SCRIPT HAS FINISHED SUCCESSFULLY-------------------------------------------------------------------------Wed Sep 20 23:19:27 CST 2017 -- CSM EXECUTION BEGINS HEREThu Sep 21 04:17:01 CST 2017 -- CSM EXECUTION HAS FINISHED(seq_mct_drv): ===============       SUCCESSFUL TERMINATION OF CPL7-CCSM ===============Archiving cesm output to /sinoecodata/DATA/CESM/root/archive/z40.Z4000Calling the short-term archiving script st_archive.sh st_archive.sh: start of short-term archivingst_archive.sh: short-term archiving completed successfullythanks for you help !!
 
Top