Rainer Keller wrote:
Hi,
On Thursday 12 August 2010 19:09:42 Jeff Squyres wrote:
On Aug 12, 2010, at 7:21 AM, Terry Dontje wrote:
Is there not a way to determine whether the fs is tmpfs or not?
I don't know -- Rainer?
Well, this is semi-portable ,-]
But sure, it would work on Linux, where we'd want it:
./statfs /dev/shm
--------------- statfs() output-----------------
statfs() returned the following information
about file system of path (/dev/shm):
f_type : TMPFS (1021994)
f_bsize : 4096
f_blocks : 723663
f_bfree : 723662
f_bavail : 723662
f_files : 723663
f_ffree : 723661
f_fsid : TMPFS (0x0)
f_namelen : 255
(the program detects most Filesystems according to their known magic).
Regards,
Rainer
------------------------------------------------------------------------
_______________________________________________
devel mailing list
de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/devel
I we only care about Linux then here is a simpler mechanism:
$ grep tmpfs /proc/mounts
none /dev/shm tmpfs rw 0 0
Conversion from grep to fopen/fread/fclose left as an exercise for the
reader :-)
-Paul
--
Paul H. Hargrove phhargr...@lbl.gov
Future Technologies Group
HPC Research Department Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory Fax: +1-510-486-6900