Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Could NOT find NetCDF_Fortran

ntandon

Neil Tandon
Member
I am attempting to build a case, and I'm getting the error below when building pio. I don't understand why I'm getting this error, because I have declared NetCDF_Fortran, NetCDF_Fortran_LIBRARY and NetCDF_Fortran_INCLUDE_DIR in config_machines.xml. Any ideas? I have attached my config files as well as the full pio.bldlog.

-- Could NOT find NetCDF_Fortran (missing: NetCDF_Fortran_LIBRARY NetCDF_Fortran
_INCLUDE_DIR)
 

Attachments

  • config_batch.txt
    509 bytes · Views: 2
  • config_compilers.txt
    305 bytes · Views: 8
  • config_machines.txt
    7.1 KB · Views: 18
  • describe_version.txt
    4.7 KB · Views: 2
  • pio.bldlog.txt
    58.7 KB · Views: 7

jedwards

CSEG and Liaisons
Staff member
Since the netcdf fortran and c libraries on your system are located in the same directory you should only need to specify
NETCDF_PATH
check the directory $NETCDF_PATH/lib and make sure that it contains libnetcdff.a and/or libnetcdff.so (note the 2 f's in the name)
 

ntandon

Neil Tandon
Member
In my case the path is $NETCDF_PATH/lib64, and it contains neither libnetcdff.a nor libnetcdff.so.
 

ntandon

Neil Tandon
Member
Right, which is why I added module load netcdf-fortran-mpi and the NetCDF_Fortran, NetCDF_Fortran_LIBRARY, NetCDF_Fortran_INCLUDE_DIR environment variables to my config_machines.xml. Is that not sufficient? Should I be loading both netcdf-fortran-mpi and netcdf-mpi or just netcdf-fortran-mpi?
 

jedwards

CSEG and Liaisons
Staff member
Oh sorry - I misread your config_machines.xml file - the variable NetCDF_Fortran_LIBRARY should point to the library file to use and not just the directory.
 

ntandon

Neil Tandon
Member
Ok, I replaced that line with the following...

<env name="NetCDF_Fortran_LIBRARY">/cvmfs/soft.computecanada.ca/easybuild/software/2017/avx2/MPI/intel2018.3/impi2018.3/netcdf-fortran-mpi/4.4.4/lib/libnetcdff.so</env>

...but I am still getting the same error.

-- Could NOT find NetCDF_Fortran (missing: NetCDF_Fortran_LIBRARY NetCDF_Fortran
_INCLUDE_DIR)
 

jedwards

CSEG and Liaisons
Staff member
Try NETCDF_FORTRAN_PATH=/cvmfs/soft.computecanada.ca/easybuild/software/2017/avx2/MPI/intel2018.3/impi2018.3/netcdf-fortran-mpi/4.4.4
 

ntandon

Neil Tandon
Member
That worked! I also had to set NETCDF_C_PATH=/cvmfs/soft.computecanada.ca/easybuild/software/2017/avx2/MPI/intel2018.3/impi2018.3/netcdf-mpi/4.4.1.1
 
Top