[Beowulf] Stupid MPI programming question

Clements, Brent M (SAIC) brent.clements at bp.com
Wed Sep 27 21:23:45 PDT 2006

All of you guys rock. Thanks for all of the advice.
I've been up for 2 days straight again and my mind is mush. Right after I emailed the list again..I simplied the code down to like 10 lines and it works fine now. That's what happens when you over code and overthink a simple problem.
I will remember the tidbits of advice you guys gave me though.
It's been about a year since I did any MPI programming, so I'm trying to relearn to keep the skills up.
Thanks for the help.
This message may contain confidential and/or privileged information.  If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein.  If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.


From: Joe Landman [mailto:landman at scalableinformatics.com]
Sent: Wed 9/27/2006 11:15 PM
To: Clements, Brent M (SAIC)
Cc: Leone B. Bosi; beowulf at beowulf.org
Subject: Re: [Beowulf] Stupid MPI programming question

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

More information about the Beowulf mailing list