DOI-USGS / COAWST

COAWST modeling system git repository
Other
104 stars 48 forks source link

unable to build SCRIP #149

Closed almacarolina closed 1 year ago

almacarolina commented 1 year ago

Dear forum,

I have been unable to build the SCRIP program on a Cray HPC. I have successfully built SCRIP and compiled COAWST before in different HPCs. I thought someone here with more expertise than me can give some advice on how to start debugging these errors. On my makefile I set FORT = ftn-cray and when I type "make" this is the error I get ( I have also asked the HPC helpdesk but so far they have been unable to debug these errors):

/usr/bin/cpp -P -traditional -w -DMPI ./read_swan.f ./read_swan.fpp /opt/cray/pe/craype/2.7.15/bin/ftn -e m -c ./read_swan.fpp ftn-2260 ftn: WARNING in command line In the next major release, the "-hsystem_alloc" option will be removed. ftn-2107 ftn: ERROR in command line No valid filenames are specified on the command line. make: *** [makefile:110: read_swan.o] Error 1

Thanks

jcwarner-usgs commented 1 year ago

i can work with you to get this resolved. so did you cd to Lib/SCRIP_COAWST edit makefile set FORT = ftn-cray type make

or did you copy the SCRIP code to another dir?

almacarolina commented 1 year ago

Hi John, I did everything directly Lib/SCRIP_COAWST Thanks, Alma

jcwarner-usgs commented 1 year ago

is that the full output?

jcwarner-usgs commented 1 year ago

ok try this. cd Lib/SCRIP_COAWST do an ls and see if the file read_swan.fpp is there. if it is, type /opt/cray/pe/craype/2.7.15/bin/ftn -e m -c ./read_swan.fpp this should try to compile the read_swan.fpp to read_swan.o

if that does not work try /opt/cray/pe/craype/2.7.15/bin/ftn -c ./read_swan.fpp

if that does not work tell me what this does /opt/cray/pe/craype/2.7.15/bin/ftn --help or --version or something to get the compiler

almacarolina commented 1 year ago

I do have the file read_swan.fpp in Lib/SCRIP_COAWST When I try this /opt/cray/pe/craype/2.7.15/bin/ftn -e m -c ./read_swan.fpp or this /opt/cray/pe/craype/2.7.15/bin/ftn -c ./read_swan.fpp I get the following output (which was the same output as when I typed make):

ftn-2260 ftn: WARNING in command line In the next major release, the "-hsystem_alloc" option will be removed. ftn-2107 ftn: ERROR in command line No valid filenames are specified on the command line.

This command /opt/cray/pe/craype/2.7.15/bin/ftn --help prints all the options understood by the craype compiler (see below). I tried some of those options and still got the error ftn-2107 ftn: ERROR in command line No valid filenames are specified on the command line.

: -[no-]add-rpath Controls whether or not '-Wl,-rpath' options are added for all pkg-config generated '-L' options and new dtags are disabled. This can be useful to 'lock in' specific versions of libraries at runtime for dynamically linked applications. (Off by default.)

-[no-]add-rpath-shared Controls whether or not '-Wl,-rpath' options are added for all pkg-config generated '-L' options. This can be useful to 'lock in specific versions of libraries at runtime for generated shared libraries. (Off by default.)

-[no-]add-runpath Controls whether or not '-Wl,-rpath' options are added for all pkg-config generated '-L' options and new dtags are enabled. This can be useful to 'lock in' specific versions of libraries at runtime for dynamically linked applications, while still allowing users to use alternate versions by setting LD_LIBRARY_PATH. (Off by default.)

--[no-]as-needed Controls whether or not '-l' options provided by the driver will be wrapped with '-Wl,--as-needed' and '-Wl,--no-as-needed' when possible to minimize unnecessary dependencies when linking dynamically. (On by default.)

--[no-]custom-ld-script[=script]
Controls whether or not CrayPE attempts to pass ld a custom linker script. If a script is provided, it will be used. Otherwise, a custom script will be used if beneficial. (On by default.)

--cray-bypass-pkgconfig Disable linking PE libraries via pkg-config.

--cray-print-opts[=option] Print the results generated by pkg-config. options: all print include and library information. cflags print include information. cray_ld_library_path print a dynamically generated CRAY_LD_LIBRARY_PATH. libs Print library information. pcfiles Print the pcfiles that pkg-config will be called with. pkg_config_path Print PKG_CONFIG_PATH used. variables Print the variables definitions that pkg-config will be called with.

-craype-verbose Print the command which is forwarded to compiler invocation.

--craype-append-opt=[flag] Add 'flag' after all CrayPE generated flags. This can effectively be used to override flags set by CrayPE.

--craype-prepend-opt=[flag] Add 'flag' before all CrayPE generated flags. -default64 PGI: Passes the -i8 and -r8 options to the compiler. The -i8 option directs the compiler to use 64 bits for the data sizeof default integer and logical operations. The -r8 option directs the compiler to use 64 bits for the data size of default real variables.

            CCE:Passes the -sdefault64 option to the
            compiler. For CCE, the ftn command will also
            recognize the -sdefault64 option and perform the
            same functionality as the -default64 option.

            The -default64 option also arranges that
            appropriate 64-bit versions of the MPI & SHMEM
            libraries are used.

-dynamic Directs the compiler driver to link dynamic libraries at runtime, rather than linking static libraries in at compile time. The linker stores the internal name of the dynamic library in the executable file. The actual library that is loaded at runtime must have the same internal name but, may differ from the filename of the library found at link time. This option is used to create dynamically linked executable files and may not be used with the -static or -shared options.

-[no]-gcc-rpath Controls whether or not '-Wl,-rpath=/opt/cray/pe/gcc-libs' is added to the link line when dynamically linking using GCC or CCE. This enables a user to run such an application. without setting LD_LIBRARY_PATH or loading a gcc module. (On by default.)

-help Print a description of the options understood by the craype driver.

-shared Creates a library which may be dynamically linked at runtime.

-static Directs the linker to use the static version of the libraries, not the dynamic version of the libraries, to create an executable file. (This is the default.)

-target-accel=[ACCELERATOR] Set the desired accelerator target.

-target-cpu=[CPU] Set the desired cpu optimization. The appropriate optimization flag will be passed to the compiler, and matching libraries will be linked in.

-target-network=[NETWORK] Set the desired network target.

OpenMP support: -homp Enables OpenMP and links in OpenMP libraries when possible using CCE-Classic. (This is the default.)

-hnoomp Disables OpenMP and links in non-OpenMP libraries when using CCE-classic.

-fopenmp Enables OpenMP and links in OpenMP libraries when possible using CCE, AOCC, and GNU.

-openmp Enables OpenMP and links in OpenMP libraries when possible.

-noopenmp Disables OpenMP.

-mp Enables OpenMP and links in OpenMP libraries when possible using PGI.

-Mnoopenmp Disables OpenMP and links in non-OpenMP libraries when using PGI.

-qopenmp Enables OpenMP and links in OpenMP libraries when possible when using Intel.

-qno-openmp Disables OpenMP and links in non-OpenMP libraries when possible when using Intel.

jcwarner-usgs commented 1 year ago

i think the "-hsystem_alloc" is just a warning, and it is not the problem.

The "No valid filenames are specified on the command line." is the issue. I did a google and this came up: http://archive.ambermd.org/201403/0229.html

i found some other pages, suggesting the env. Do you need to set an env first?

almacarolina commented 1 year ago

Agree. The problem is "No valid filenames are specified on the command line."

I do have to load the cray compiler craype and PrgEnv-cray. I also have the option of loading PrgEnv-gnu PrgEnv-intel and several other options. I have compiled ROMS and WRF and COAWST with PrgEnv-cray, cray-hdf5-parallel/1.12.1.3 and cray-netcdf-hdf5parallel/4.8.1.3.

I have tried compiling SCRIP lwith PrgEnv-gnu and changing the makefile IFORT to ftn-gnu and I get the following output error:

/usr/bin/cpp -P -traditional -w -DMPI ./read_swan.f ./read_swan.fpp /opt/cray/pe/craype/2.7.15/bin/ftn -frepack-arrays -c ./read_swan.fpp ./read_swan.fpp:31:10:

31 | use kinds_mod ! defines common data types | 1 Fatal Error: Cannot open module file 'kinds_mod.mod' for reading at (1): No such file or directory

jcwarner-usgs commented 1 year ago

well that's a start. did you type make and that was all it gave? the kinds_mod.f should have been the first thing built. maybe do a clean first.

almacarolina commented 1 year ago

I still get the same error when doing a clean first. Just emailed again the HPC helpdesk to make sure I have the environments set correctly