could not open /proc/self/stat
while running my binary compiled with pgcc on pgicygwin I am getting following runtime error and program crashes io_memory_usage could not open /proc/self/stat file: No such file or directory how to resolve this ? thanks in advance.
July 30th, 2010 2:31pm

are you sure that cygwin has this file?
Free Windows Admin Tool Kit Click here and download it now
July 30th, 2010 7:20pm

yes it has PGI Workstation 10.5 (64) PGI$ ls /proc/self/stat /proc/self/stat PGI$
July 30th, 2010 7:42pm

What do you get when you run a stat and a less on the file? What does your C code look like for opening the file and what libraries are you including? What happens if you use regular gcc instead of pgcc to compile? On my working Cygwin system I get, $ stat /proc/self/stat File: `/proc/self/stat' Size: 0 Blocks: 0 IO Block: 65536 regular empty file Device: f8h/248d Inode: 7505178099053704630 Links: 1 Access: (0444/-r--r--r--) Uid: (194304/<username>) Gid: (10513/<primary group>) Access: 2010-07-30 10:54:51.000000000 -0600 Modify: 2010-07-30 10:54:51.000000000 -0600 Change: 2006-11-30 17:00:00.000000000 -0700 $ less /proc/self/stat 2404 (less) R 3788 2404 3788 0 -1 0 1005 1005 0 0 0 31 0 31 -449906192 0 0 0 89335000 3870720 983 345 $ ls -la /proc/self/stat -r--r--r-- 1 <username> <group> 0 2010-07-30 10:56 /proc/self/stat -- Mike Burr
Free Windows Admin Tool Kit Click here and download it now
July 30th, 2010 11:59pm

ok good but can you open it? or in other words do you have the rights to open this file, if you don't have them, try running your binary as a root user.
July 31st, 2010 5:20am

thanks Mike. I can also access tthe stat file from the command prompt PGI Workstation 10.5 (64) PGI$ ls -l /proc/self/stat stat statm status PGI$ ls -l /proc/self/stat -r--r--r-- 1 subhasis mkpasswd 0 Jul 31 2010 /proc/self/stat PGI$ stat /proc/self/stat File: `/proc/self/stat' Size: 0 Blocks: 0 IO Block: 1024 regular empty file Device: f8h/248d Inode: 10018764915042765373 Links: 1 Access: (0444/-r--r--r--) Uid: ( 400/subhasis) Gid: ( 401/mkpasswd) Access: 2010-07-31 09:47:50.373980300 +0100 Modify: 2010-07-31 09:47:50.373980300 +0100 Change: 2010-07-31 09:47:50.373980300 +0100 PGI$ cat /proc/self/stat 4032 (cat) R 4932 4032 4932 0 -1 0 964 964 0 0 15 0 15 0 1627812119 0 0 0 272596 000 2625536 949 345 PGI$ This shows I have access to this file .... and permission is also OK. I am using HDF5 Library. The io for my application is expected to handle by this library and there it complains about on runtime. Without IO the application works fine as I am not including HDF5. subhasis
Free Windows Admin Tool Kit Click here and download it now
July 31st, 2010 3:54pm

Hi Subhasis, Your issue is not related with windows and related to cygwin , i would recommend you to post your question under cygwin forum. Thanks for understanding.
August 2nd, 2010 2:44pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics