Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
MPISend and MPIReceive and options (Read 1767 times)
Ted Toal
YaBB Newbies
*
Offline


Feed your monkey!

Posts: 2
MPISend and MPIReceive and options
Jan 25th, 2011 at 5:44pm
 
We want to pass some options (a file path and a tree topology string) via MPISend() to a batch file, which will insert these into two different option arrays for two different method batch files that it will invoke.  We see how to create an options associative array in our top-level batch wrapper and pass it to MPISend().  What we do not understand is how to retrieve those two option values in our mid-level wrapper that calls the method batch files.  Help!!
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: MPISend and MPIReceive and options
Reply #1 - Jan 28th, 2011 at 5:11pm
 
Hi Ted,

If I understand your situation correctly, you have a high level wrapper which does something like

Code:
for (i = 0; i < Abs(fileList); i+=1)
{
	     filePath = fileList[i];
	     treeString = myTrees[i];


	    MPISend (nodeID, "mid_wrapper.bf", {"0":filePath, "1": treeString});
}

 



and you then mid_wrapper.bf makes other lists and passes them to other analyses.

Whatever you pass to MPISend as the third argument list is handled the same way as the call to

Code:
ExecuteAFile ("mid_wrapper.bf", argument)
 



would be in a non-MPI setting -- namely the values from 'argument' will be passed on to the standard input for "mid_wrapper.bf".

Consequently, if you open "mid_wrapper.bf" with

Code:
fscanf (stdin, "String", filePath);
fscanf (stdin, "String", treeString);

 



you should then be able to use filePath and treeString to pass them to 3-rd level files.

HTH,
Sergei



Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged