[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.
BC
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 ...
RETURN VALUE
mkdir returns zero on success, or -1 if an error occurred (in
which
case, errno is set appropriately).
ERRORS
EPERM The filesystem containing pathname does not support the
cre-
ation of directories.
EEXIST pathname already exists (not necessarily as a directory).
This
includes the case where pathname is a symbolic link,
dangling
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
allow
search (execute) permission.
ENAMETOOLONG
pathname was too long.
ENOENT A directory component in pathname does not exist or is a
dan-
gling symbolic link.
ENOTDIR
A component used as a directory in pathname is not, in
fact, a
directory.
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
pathname.
ENOSPC The device containing pathname has no room for the new
direc-
tory.
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