nvfortran

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
jlrchavez
Posts: 2
Joined: Tue May 04, 2021 1:02 pm
Location: BUAP

nvfortran

#1 Unread post by jlrchavez »

Hello, I was trying to compile ROMS on an IBM Power9 node using NVIDIA's nvfortran compiler which is in reality PGI Fortran.
However, I get an error in ROMS/Utility/get_hash.F since the compiler does not recognizes the SHIFTR function. Is it safe to replace this function with RSHIFT or even SHIFTA? The rest of the routines compile without problems but in the end it gives another error indicating that it cannot find the netcdff_c library. I have searched for this library but was unable to locate it. Any suggestions?

Thanks in advance.
Aaki

jlrchavez
Posts: 2
Joined: Tue May 04, 2021 1:02 pm
Location: BUAP

Re: nvfortran

#2 Unread post by jlrchavez »

Hello again, the netcdff_c library is in principle part of the netcdf fortran interface, here is the output of the nf-config command:

This 4.5.4-development has been built with the following features:

--cc -> /opt/nvidia/hpc_sdk/Linux_ppc64le/21.3/compilers/bin/nvc
--cflags -> -I/opt/netcdf-4.8/include -O2

--fc -> /opt/nvidia/hpc_sdk/Linux_ppc64le/21.3/compilers/bin/nvfortran
--fflags -> -I/opt/netcdf-4.8/include
--flibs -> -L/opt/netcdf-4.8/lib -lnetcdff -lnetcdf -lnetcdf -lnetcdff_c
--has-f90 -> TRUE
--has-f03 -> yes

--has-nc2 -> yes
--has-nc4 -> yes

--prefix -> /opt/netcdf-4.8
--includedir-> /opt/netcdf-4.8/include
--version -> 4.5.4-development

I have removed the netcdff_c library from the LIBS variable in Compilers/Linux-nvfortran.mk and the compilation ends without problems.

User avatar
arango
Site Admin
Posts: 1347
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: nvfortran

#3 Unread post by arango »

I didn't know that IBM was using the NVIDIA compiler. It is unfortunate because the PGI compiler is one of the worse compilers that I have come across. We don't longer use it neither pay the license to maintain that compiler. The RSHIFT and SHIFTA intrinsic functions are part of the 2008 Fortran Standard. It has been available in other compilers for years.

Anyway, I don't longer use the CRC32 function to compute the checksum. Please update your version of the code. Also, check if your compiler has updates. Nowadays, it is advantageous to have compilers up to date because bugs are corrected.

Post Reply