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

shr_spfn_mod.F90

Dear Helper,
        I succesfully compiled and run cesm1_1_2 and try to move to the neweset version cesm1_2_0. when I compiled, I got error for a new file shr_spfn_mod.F90 .I wonder anyone can give a quick fix. thanks.---/homedir/msun/cam5/cesm1_2_0/models/csm_share/shr/shr_mpi_mod.F90(1431): (col. 27) remark: LOOP WAS VECTORIZED/homedir/msun/cam5/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 intrinsic subroutine name.   [ERFC_SCALED]
  intrinsic erfc_scaled
------------^
/homedir/msun/cam5/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 intrinsic subroutine name.   [ERFC_SCALED]
  intrinsic erfc_scaled
------------^
/homedir/msun/cam5/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 intrinsic subroutine name.   [GAMMA]
  intrinsic gamma
------------^
/homedir/msun/cam5/cesm1_2_0/models/csm_share/shr/shr_spfn_mod.F90(335): error #7137: Any procedure referenced in a PURE procedure, including one referenced via a defined operation or assignmnent, must be explicitly declared PURE.   [GAMMA]
  res = gamma(x)
--------^
compilation aborted for /homedir/msun/cam5/cesm1_2_0/models/csm_share/shr/shr_spfn_mod.F90 (code 1)
make: *** [shr_spfn_mod.o] Error 1
make: *** Waiting for unfinished jobs....--------
 

jedwards

CSEG and Liaisons
Staff member
I believe that this error is due to using a compiler too old to support some of the f2003 features used in CESM, you'll need to update to a newer version of the compiler.
 
Thank you for your suggestion. But the problem is: I have no control of the compilaiton installation and from my own experience, it will take pretty long time for system admistrators to install newer version. I wonder if there is any way around it. Thanks.
 

Yuan Wang

New Member
Hi there, I think I'm experiencing the same problem with you. Could you share your solution which doesn't require the compiler update? Many thanks.
 

santos

Member
You can use SourceMods to change shr_spfn_mod.F90, and make sure that HAVE_GAMMA_INTRINSICS and HAVE_ERF_INTRINSICS are not set. But if you have an older compiler, there may be other issues.
 
Hi,    I looked through my incomplete node. I did modify the shr_spfn_mod.F9add 'defined CPRINTEL' to line 12.< #if defined CPRIBM || defined CPRINTEL || defined __GFORTRAN__ || defined CPRCRAY || defined CPRLAHEY

I am not sure if this will solve your problem. you can try.  I used intel compiler.and my configure  was:$camcfg/configure -fc mpif90 -fc_type intel -cc mpicc -mpi_inc $MPI_INC -mpi_lib $MPI_LIB -dyn fv -hgrid 1.9x2.5 -ntasks 24 -nosmp -testLater I moved to another cluster with much better enviuronment that I don't have much problem.The most confusing thing to me is that all kind of libraries needed are not up to date or compiler picked wrong libraries. Once the libraries are good, it seems it compiles well.Sorry if not helping. Moguo     
 
Hi Sean,Thanks for your reply! I have a bunch of intel compilers installed in our system, from intel11.1 to 14.1. So when you say "old", how old that will be? I will try to comment out the HAVE_GAMMA_INTRINSICS and HAVE_ERF_INTRINSICS. Also I will follow what Moguo suggested to delete the "defined CPRINTEL"I will update what I found. Thanks all your suggestions. It's a great forum for new users. BTW, I am setting up for the CAM-CHEM v5.3 standlone simulations.  
 
So to summary for this issue on my cluster:(1) I changed the intel compiler from v11.1 to v14.0, and it didn't solve the problem. Seems that not very related to the intel compiler? I am not sure about that since I don't know when they say "old", what's the version does they refer. (2) I followd Sean's method to get the  HAVE_GAMMA_INTRINSICS and HAVE_ERF_INTRINSICS not set, and it works. (3) I also tried Moguo's method by removing the "defined CPRINTEL", and it works too.  Thanks you all for the suggestions!  
 

santos

Member
If multiple versions are available, I would recommend trying Intel 12 or 13. If you use either of those, I believe it should not be necessary to modify shr_spfn_mod. Intel 14 has several compiler bugs that cause different CESM configurations to fail, so don't use it.
 
Hi Sean,Actually We do have intel 12 & 13 on our cluster but I didn't use it as I follow the suggestion to use the "latest intel"..... I will remember that when I switch the cluster in the near future. It's really good that you point this out and the community will know. Really appreciate your work! Thanks! Yuqiang
 
Top