[Beowulf] Stupid MPI programming question
Robert G. Brown
rgb at phy.duke.edu
Wed Sep 27 21:08:32 PDT 2006
On Thu, 28 Sep 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?
What is errno on the return? That might give you an idea of what is
causing the problem (see list of error codes in man 2 mkdir).
> char fullpath;
> sprintf(fullpath,"/tmp/oooo/RANK%d", my_rank);
> printf("MY PATH TO CREATE %s", fullpath);
> int mkdir_return;
> mkdir_return = mkdir(fullpath,0777);
> printf("mkdir results: %d\n", mkdir_return);
Um, does /tmp/oooo exist? I don't think mkdir(2) does the equivalent of
mkdir -p and create parent directories as required. Also are the slaves
successfully printing out the line(s) showing that they have fullpath
set as you expect?
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567 Fax: 919-660-2525 email:rgb at phy.duke.edu
More information about the Beowulf