Reading a NetCDF file stored on an NFS-based filesystem such as your HOME or PERM gets stuck.


Current versions of NetCDF using HDF5 1.10 or newer implement a file locking feature to prevent data corruption in certain cases. Unfortunately, this feature is not supported on our NFS filesystems so accessing a netCDF file may result in the program getting stuck indefinitely. There are two workarounds for this problem:

Using a Lustre-based filesystem

Lustre being a parallel filesystem deals with locks in a different manner. If you copy/move your NetCDF files to a Lustre-based Filesystem such as SCRATCH or HPCPERM, you should be able to work with it without experiencing the problem. 

Disabling File locking in HDF5

If you wish to continue using the files from your NFS-based Filesystem such as HOME or PERM, you may disable the file locking feature defining the following environment variable in your shell script or interactive sessionbefore running your  program:


Similarly, if you wish to disable it from a Python Script or Python session, you may add the following line: