Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

error compiling convert_mpas

janac4

Member
I'm trying to compile convert_mpas with the exports from the compilation of the MPAS. The NETCDF libraries needed work fine. The Flags set seem to be fine but there is an error while executing the make from the repository. Someone nows how to proceed?
 

Attachments

  • exports.txt
    4.1 KB · Views: 1
  • error.txt
    29.6 KB · Views: 3
The first of the errors in your "error.txt" file suggests that the PnetCDF library isn't being included in the list of libraries to link with:
/usr/bin/ld: /share/home/liort/mpasja/libraries/lib/libnetcdf.a(libdispatch_la-derror.o): in function `nc_strerror':
/share/home/liort/mpasja/netcdf-c-4.7.0/libdispatch/derror.c:276: undefined reference to `ncmpi_strerror'
(Note that 'ncmpi_strerror' is a PnetCDF function, and the NetCDF library can be configured to include PnetCDF functionality.) Since the convert_mpas Makefile relies on the 'nf-config' program provided by the NetCDF-Fortran library to give a list of libraries needed by the NetCDF library, it may be that 'nf-config' isn't working correctly.

In case the 'nc-config' program (which comes with the NetCDF-C library) is able to correctly report the needed libraries, you could try reverting recent changes to switch from 'nc-config' to 'nf-config' in the convert_mpas Makefile. Here are the changes to revert: Switch from use of 'nc-config' to 'nf-config' in top-level Makefile · mgduda/convert_mpas@248de60 .

If switching from 'nf-config' back to 'nc-config' (i.e., reverting the changes referenced above) doesn't resolve the issue, please don't hesitate to follow up here.
 
Thank you for your answer
We have applied the changes you suggested to use nc-config by modifying the Makefile. Unfortunately it does not work. We attach the error, the exports and the make. We hope you can help us. Feel free to ask anything about the library configuration (we followed in the installation of mpas the script provided 'iolib_installation.sh').
 

Attachments

  • makefile.txt
    1.5 KB · Views: 3
  • exports2.txt
    4 KB · Views: 3
  • error2.txt
    29.6 KB · Views: 2
Apologies for the long delay in replying! It looks like the 'nc-config' program still isn't supplying the correct information to pick up the PnetCDF library. Could you try adding the following line below the definition of the FCLIBS variable in the Makefile:
Code:
FCLIBS += -L${PNETCDF}/lib -lpnetcdf
so that the first five lines of the Makefile are as follows:
Code:
FC = $(shell nf-config --fc)
FFLAGS = -O3
FCINCLUDES = $(shell nf-config --fflags)
FCLIBS = $(shell nf-config --flibs)
FCLIBS += -L${PNETCDF}/lib -lpnetcdf
?
 
Top