DOI-USGS / COAWST

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

Compilation error on a cray computer #135

Open almacarolina opened 1 year ago

almacarolina commented 1 year ago

Dear John,

I am trying to compile COAWST on an NOAA HPC (Gaea) which uses a Cray ftn compiler. I have been able to compile ROMS successfully in the NOAA HPC but not COAWST, probably because I am loading improper modules or not properly configuring my coawst.bash. I would appreciate any advice in debugging these compilation errors since it has been hard to get advice from the system administration regarding COAWST and WRF and I have little experience with compilers. I attach a wrf.log file that shows my compilation errors. This i the first error I get: "Linux gaea12 4.12.14-197.99-default #1 SMP Thu Jul 15 13:52:56 UTC 2021 (a15b9f6) x86_64 x86_64 x86_64 GNU/Linux Not sure how to figure out the version of this compiler: ftn"

Thanks Alma wrf.log

jcwarner-usgs commented 1 year ago

looks like the WRF compiler option is using some flags that your compiler does not know about. Fortran compiler for the model source code: which FC which: invalid option -- 'h' which: invalid option -- 'n' which: invalid option -- 'o' which: invalid option -- 'o' which: invalid option -- 'm' which: invalid option -- 'p'

this is -h no omp (no openmp). suggest you look in WRF/arch/configure.defaults and look for noomp this only appears once. change DM_FC = ftn $(NOOMP) to DM_FC = ftn

and do a coawst.bash and see if that error goes away

almacarolina commented 1 year ago

Hi John, That worked and I was able to compile WRF using a Cray machine (not sure if there will be a problem letter just by commenting that compiler flag). Now, as expected, I was not able to compile WPS with grib2. This is the error I get: /opt/cray/pe/cce/9.1.1/binutils/x86_64/x86_64-pc-linux-gnu/bin/ld: cannot find -ljasper^M /opt/cray/pe/cce/9.1.1/binutils/x86_64/x86_64-pc-linux-gnu/bin/ld: cannot find -lpng^M make[1]: [Makefile:19: ungrib.exe] Error 1 (ignored)^M

I already set my JASPERLIB and JASPERINC environmental variables so not really sure what other things I can check to debug this error. I attach my full compile wps log file here.

compile.log Thanks

jcwarner-usgs commented 1 year ago

not sure. that is another environment issue. what do you get for $JASPERLIB and for $JASPERINC

almacarolina commented 1 year ago

I had set these environmental variables before compiling WRF and WPS to the following. echo $JASPERLIB /usr/lib64 echo $JASPERINC /usr/include I set those variables because the sys admin told me the libraries are there.

jcwarner-usgs commented 1 year ago

yes, but go to the command prompt and type

$JASPERLIB

and see what it returns. then do an ls for that directory and see if the libs are really there. same for $JASPERINC

almacarolina commented 1 year ago

So when I do $JASPERLIB I have this directory /usr/lib64/ and when I do $JASPERINC I have this directory /usr/include/

These are the jasper libraries in these directories /usr/lib64/libjasper.so.4 /usr/lib64/libjasper.so.4.0.0

/usr/include/jasper /usr/include/jasper/jas_cm.h /usr/include/jasper/jas_config.h /usr/include/jasper/jas_debug.h /usr/include/jasper/jas_dll.h /usr/include/jasper/jas_fix.h /usr/include/jasper/jas_getopt.h /usr/include/jasper/jas_icc.h /usr/include/jasper/jas_image.h /usr/include/jasper/jas_init.h /usr/include/jasper/jas_malloc.h /usr/include/jasper/jas_math.h /usr/include/jasper/jas_seq.h /usr/include/jasper/jas_stream.h /usr/include/jasper/jas_string.h /usr/include/jasper/jas_tmr.h /usr/include/jasper/jas_tvp.h /usr/include/jasper/jas_types.h /usr/include/jasper/jas_version.h /usr/include/jasper/jasper.h /usr/lib64/libjasper.so /usr/lib64/pkgconfig/jasper.pc

jcwarner-usgs commented 1 year ago

maybe you need to use JASPERINC=/usr/include/jasper ??

almacarolina commented 1 year ago

Yes, I have tried that too, and got the same error. I just emailed the system admin to see if they can help. Thanks