gptl always pointing to gfortran

Dear all, I also have a problem with gptl building. Seems it always tries to find gfortran instead of ifort.
I have set the enviroment variable SFC and so on in config_machines.xml and config_compilers.xml. But I still got the error. Any hints how do I solve the problem? Thanks very much. I am using inter compiler and MACH is Tianhe2.
 

Attachments

jedwards

CSEG and Liaisons
Staff member
The compiler that you want to use should be first in the PATH environment variable.
The environment used by the model is not necessarily the environment you see in your shell,
but you can set your shell to have the model environment with:
source .env_mach_specific.sh (or .csh depending on your shell).

Then run mpicc --version and make sure it's the compiler you want. If it is not you should adjust your path so that it is.
You can also do module show intelcompiler/18.0.0
to see how it's updating your environment.
 

jedwards

CSEG and Liaisons
Staff member
DId you change the Makefile? You should have the following CPPDEFS in your build
-DNUM_COMP_INST_ATM=1 -DNUM_COMP_INST_LND=1 -DNUM_COMP_INST_ICE=1 -DNUM_COMP_INST_OCN=1 -DNUM_COMP_INST_ROF=1 -DNUM_COMP_INST_GLC=1 -DNUM_COMP_INST_WAV=1 -DNUM_COMP_INST_ESP=1 -DTIMING -DLINUX -DCESMCOUPLED
I don't see them there and I'm not sure why. They are set in script buildlib.csm_share
 
Thanks very much for the reply. I see they are defined here

multi_driver = case.get_value("MULTI_DRIVER")
.....
multiinst_cppdefs += " -DNUM_COMP_INST_{}={}".format(comp, ninst_comp)

And my MULTI_DRIVER is FALSE.

In my makefile (as attached), if I set CPPDEFS := -DFORTRANUNDERSCORE -DCPRINTEL. The model does not see DNUM_COMP_INST_ROF and so on.
If I delete CPPDEFS, the compiling process stopped with error:

/BIGDATA1/nuist_xzhang_1/CESM/cime/src/share/util/shr_infnan_mod.F90.in(74): error #7407: Unresolved MODULE PROCEDURE specification name. [SHR_INFNAN_ISNAN_REAL]

Maybe I should check whether my source code are the latest version...
 

Attachments

Back
Top