diff options
Diffstat (limited to 'src/H5Fint.c')
-rw-r--r-- | src/H5Fint.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c index 030fda8..bb092f3 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -1519,15 +1519,22 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) if(NULL == (drvr = H5FD_get_class(fapl_id))) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to retrieve VFL class") - /* Check the environment variable that determines if we care - * about file locking. File locking should be used unless explicitly - * disabled. + /* Check for file locking disabled internally, then check the environment + * variable that determines if we care about file locking. File locking + * should be used unless explicitly disabled. */ - lock_env_var = HDgetenv("HDF5_USE_FILE_LOCKING"); - if(lock_env_var && !HDstrcmp(lock_env_var, "FALSE")) +#ifdef H5_HAVE_PARALLEL + if(H5CX_get_disable_file_locking()) use_file_locking = FALSE; else - use_file_locking = TRUE; +#endif /* H5_HAVE_PARALLEL */ + { + lock_env_var = HDgetenv("HDF5_USE_FILE_LOCKING"); + if(lock_env_var && !HDstrcmp(lock_env_var, "FALSE")) + use_file_locking = FALSE; + else + use_file_locking = TRUE; + } /* end block/else */ /* * Opening a file is a two step process. First we try to open the |