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

netCDF library serial vs parallel

mellis

New member
I'm a little confused by specs for the installation of the netCDF library. Per the WRF user's guide:

"If netCDF-4 is used, be sure that it is installed without activating parallel I/O based on HDF5. The WRF modeling system can use either the classic data model from netCDF-3 or the compression options supported in netCDF-4. Beginning with V4.4, the ability to write compressed NetCDF-4 files in parallel is available. With this option performance is slower than with pnetcdf but can be notably faster than the use of regular NetCDF on parallel file systems. Compression provides files significantly smaller than pnetcdf generates. It is expected that files sizes will differ with compression."

At first this appears to indicate that if using netCDF-4, I cannot use a parallel version of the netCDF library. However, the red text seems to indicate that is no longer true beginning in WRF V4.4. Can someone explain this contradiction? I'm on an HPC environment that does not allow for loading a serial version of netCDF when loading intel mpi. So if I can just use the parallel version of netCDF after all that would make life simpler.
 
Yes, you can use the parallel-compiled netcdf as long as WRF is compiled for dmpar (or dm+sm). Did you try it? See doc/README.netcdf4par for the details. You need to set NETCDFPAR to the library location (instead of setting NETCDF).
 
Yes, you can use the parallel-compiled netcdf as long as WRF is compiled for dmpar (or dm+sm). Did you try it? See doc/README.netcdf4par for the details. You need to set NETCDFPAR to the library location (instead of setting NETCDF).
I set NETCDFPAR and I'm still getting the error below when I run ./configure:

************************** W A R N I N G ************************************
NETCDF4 IO features are requested, but this installation of NetCDF
/home/mellis/netcdf_links
DOES NOT support these IO features.

Please make sure NETCDF version is 4.1.3 or later and was built with
--enable-netcdf4

OR set NETCDF_classic variable
bash/ksh : export NETCDF_classic=1
csh : setenv NETCDF_classic 1

Then re-run this configure script

!!! configure.wrf has been REMOVED !!!

*****************************************************************************


I've already created a separate directory to link the netcdf files into the same directory, since netcdf-c and and netcdf-fortran files were installed in different paths. And I checked:
nc-config --has-nc4 --has-hdf5 --has-parallel4
yes
yes
yes

nf-config --has-nc4
yes

Any ideas why it would think netcdf-4 is not supported when using the parallel version?
 
My guess is that 'make nc4_test' is failing for some reason. Usually either a library problem or a mismatch between the compiler and libraries (e.g. serial compiler, parallel libraries)
 
You can edit the 'configure' script to comment out the line where it deletes the configure.wrf after failing the nc4_test (around line 1088):

rm -f configure.wrf

and then run configure again use the configure.wrf to run 'make nc4_test' to see what error is happening. The compile may just work, anyway, but it would be helpful to know how the test is failing. It could be that 'mpirun' is not allowed to run on your login node or something like that, in which case I would go ahead and try compiling.
 
Top