Building NCEPLIBS-external with Cray compiler

The Cray compiler produces FORTRAN mod files with upper-case names by default. That is, a source with a module called MyMod will produce MYMOD.mod as output. This busts the CMake install, which looks for MyMod.mod. There is a compiler flag, "-ef" instead of "-em", that will override this behavior, but I am unable ot figure out how to get the build to use that flag. Suggestions?     

Try to put the option into the build option file defined under the directory ufs-weather-model/conf (or model/conf)

Thanks,

Linlin

 

Permalink

In reply to by Linlin.Pan

Hey, thanks for the quick response!

There are about 15 files in that directory, with names like configure.fv3.hera.intel. Unfortunately, none of them are for this machine, as it is a new machine. How does the build determine which configure file to use? 

Or perhaps the better question is, do I need to modify one of these, or create a new one?

We need some clarification first. You are referring to building NCEPLIBS-external, not the ufs-mrweather-app, right?

NCEPLIBS-external doesn't have a machine-specific configuration, but in the code there are examples how to build the prerequisites in 

NCEPLIBS-external/doc/README_*.txt

There is one entry for a Cray machine called "gaea". I don't recall adding a flag "-ef" anywhere, though. This website shows a few options on how to pass compiler flags to cmake

https://stackoverflow.com/questions/44284275/passing-compiler-options-cmake

You could also try to specify the Fortran compiler flags as

cmake -DCMAKE_Fortran_FLAGS="..."

when building NCEPLIBS-external.