[Beowulf] Stupid MPI programming question

Joe Landman landman at scalableinformatics.com
Thu Sep 28 00:15:34 EDT 2006

Clements, Brent M (SAIC) wrote:
> Ok, here is the code I'm working with....mkdir keeps giving me a -1
> failure...can anyone spot what I"m doing wrong?

Trust in the man page Luke ... er Brent...  (and use

	#include <errno.h>
	extern int errno;

in your code.

Then you can do an

	if (mkdir_return == -1)
	   if (errno == EPERM) { printf("Its a permission error!\n"); }
	   if (errno == EEXIST) { printf("Its already existed!\n"); }
	   if (errno == EACESS) { printf("Parent directory wont let me!\n"); }


 From the man page ...

        mkdir  returns  zero  on success, or -1 if an error occurred (in 
        case, errno is set appropriately).

        EPERM  The filesystem containing pathname does not  support  the 
               ation of directories.

        EEXIST pathname already exists (not necessarily as a directory). 
               includes the case where pathname is a symbolic  link, 
               or not.

        EFAULT pathname points outside your accessible address space.

        EACCES The  parent  directory  does  not allow write permission 
to the
               process, or one of the directories in pathname  did  not 
               search (execute) permission.

               pathname was too long.

       ENOENT A  directory  component in pathname does not exist or is a 
               gling symbolic link.

               A component used as a directory in pathname is not, in 
fact,  a

        ENOMEM Insufficient kernel memory was available.

        EROFS  pathname refers to a file on a read-only filesystem.

        ELOOP  Too many symbolic links were encountered in resolving 

        ENOSPC The device containing pathname has no room for the  new 

        ENOSPC The  new  directory  cannot  be created because the 
user's disk
               quota is exhausted.


Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics LLC,
email: landman at scalableinformatics.com
web  : http://www.scalableinformatics.com
phone: +1 734 786 8423
fax  : +1 734 786 8452 or +1 866 888 3112
cell : +1 734 612 4615

Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf

More information about the Beowulf mailing list