turning off file locking

Drake, Richard R rrdrake at sandia.gov
Wed May 19 17:06:48 CDT 2004


I agree that NFS file locking is insufficient, therefore, can it be turned
off?  At least when I will only be writing a new file.

Looking at the MPI-2 spec, the MPI_MODE_UNIQUE_OPEN mode to MPI_File_open()
says "...allows an implementation to optimize access by eliminating the
overhead of file locking."

Does pnetcdf open the file more than once using MPI_File_open() and expect
MPI-I/O to handle the syncronization correctly, or does pnetcdf open the
file uniquely (at least amongh the MPI processes for that job).  If so, then
why can't file locking be turned off?

On the other hand, if MPI-I/O will not function correctly without file
locking, then there is a bug or lacking feature in the implementation (at
least according to MPI-2).

-rich

-----Original Message-----
From: Richard Hedges [mailto:richard-hedges at llnl.gov] 
Sent: Wednesday, May 19, 2004 3:23 PM
To: Foucar, James G
Cc: 'parallel-netcdf at mcs.anl.gov'
Subject: Re: turning off file locking


>Hello, I have been having off and on problems with file locking on NFS when
>using pnetcdf. The error i get is:
>
>File locking failed in ADIOI_Set_lock. If the file system is NFS, you need
>to use NFS version 3 and mount the directory with the 'noac' option (no
>attribute caching).
>
>My question is: is there anyway turn off file locking for the pnetcdf file?
>
>Thanks,
>James


Well, I think that the complaint is that the file locking in NFS is 
not adequate for the parallel operations that you are attempting. 
Things you can do:

1) use a real parallel filesystem (GPFS, CPFS, PVFS, Lustre: not NFS)
2) if an SMP node is big enough, use a local filesystem on an SMP node.
3) mount NFS without attribute caching (as recommended in the 
diagnostic message)

- Richard

-- 



====================================================

Richard Hedges
Scalable I/O Project
Development Environment Group - Livermore Computing
Lawrence Livermore National Laboratory
7000 East Avenue, MS L-550
Livermore, CA	94551

v:	(925) 423-2699
f:	(925) 423-1173
E:	richard-hedges at llnl.gov





More information about the parallel-netcdf mailing list