[MPICH] MPICH2 Questions: Read input files from currentdirectory and output control

Ralph Butler rbutler at mtsu.edu
Fri Apr 21 15:58:35 CDT 2006


On Apr 21, 2006, at 3:49 PM, Yusong Wang wrote:

> I recompiled my program with the mpicc under the MPICH2 directory (The
> previous version was compiled with mpicc of MPICH1) and
> all the problems were gone. The lesson I learned is that the mpicc and
> mpiexec have to be from same version.
> For simple program, the program could run, but may have a problem by
> combining the mpicc of MPICH1 and mpiexec of MPICH2, even though they
> are built on the same architecture and same gcc compilers.
> Thanks for your help!
> Yusong
> On Thu, 2006-04-20 at 15:32 -0500, Ralph Butler wrote:
>> I have not been able to produce a problem like yours.  Let me explain
>> what I have tried and why I think
>> it mimics what you are trying to do.  You can tell me where I am
>> going wrong.  I ran this:
>>      mpiexec -n 2 /bin/cat tempin
>> where tempin is a tiny test file in the current dir.  I also tested
>> like this:
>>      mpiexec -n 2 -wdir `pwd` /bin/cat `pwd`/tempin
>> In this latter example, the `pwd` stuff should not be necessary since
>> the default wdir is current dir.
>> It seems to me that both do the same thing as your program.  Your
>> "cat" program (Plegant) actually reads
>> a separate file which tells it to read the equivalent of tempin.
>> But, then I would assume that it just opens
>> the second file and reads it like cat does.  There is one obvious
>> possible problem, i.e. the file being
>> read (FFTB.lte) is actually not on each box doing the reading.
>> It might be interesting to see if the examples that I tried work for
>> you.  If so, then there may be some
>> unique manner in which your application is opening the file for  
>> reading.
>> --ralph
>> On Apr 20, 2006, at 1:34 PM, Yusong Wang wrote:
>>> Ralph,
>>> Thanks for your response. I hope I can clear the confusions:
>>> On Thu, 2006-04-20 at 13:09 -0500, Ralph Butler wrote:
>>>> Hi Yusong:
>>>> I cannot figure out what you are attempting to do because I am not
>>>> sure what all the parts actually are.
>>>> For example, Pelegant seems to be an executable (pgm or script)  
>>>> that
>>>> you are attempting to run giving
>>>> it run_p.ele as an argument.
>>> Yes, you are right. Pelegant is the executable file.
>>>>   But, I am not sure of that.  If I am
>>>> right, then it is not clear what the role of
>>>> run_p.ele is.
>>> run_p.ele is a text input file (used for parsing several commands  
>>> for
>>> Pelegant), which specifies which lattice file (used for describe the
>>> layout of an accelerator) will be used.
>>>>  You say that FFTB.lte "is given" in run_p.ele.  But, I
>>>> don't know if you mean that it is a pre-existing
>>>> file that is merely mentioned by name there, or if it is written by
>>>> the executing program, or created via a
>>>> here-document in a script, etc.
>>> Both run_p.ele and FFTB.lte are pre-existed in the current  
>>> directory.
>>>>   Can you explain how to reproduce
>>>> the problem using simple cmds such as
>>>> cat or printenv??  If not, please explain what the individual files
>>>> are and how they interact.
>>> Pelegant parses run_p.ele, which tells Pelegant to use FFTB.lte  
>>> as the
>>> lattice file.
>>>> Thanks.
>>>> --ralph
>>>> On Apr 20, 2006, at 11:23 AM, Yusong Wang wrote:
>>>>> Hi,
>>>>> I am trying to run my program with MPICH2 under MPD environment.
>>>>> The cpi
>>>>> example went well. I have two questions for my own examples:
>>>>> 1) There is another file (FFTB.lte, in the current directory),
>>>>> which is
>>>>> given in run_p.ele. How can mpiexec find it without giving the  
>>>>> path
>>>>> explicitly in the run_p.ele? (I am dealing with more than a
>>>>> hundred of
>>>>> these kind of examples, it will be convenient if mpiexec can find
>>>>> the
>>>>> file itself.) It seems to me that the -wdir can only find the  
>>>>> binary
>>>>> file instead of other text input files.
>>>>> [ywang25 at weed23 FFTB1]$ mpiexec -machinefile ./myMachines -np 4 -
>>>>> wdir
>>>>> `pwd` $ebin/Pelegant `pwd`/run_p.ele
>>>>> Unable to find file FFTB.lte
>>>>> 2) The output from all the slave processes are printed out,
>>>>> although I
>>>>> have redirected them to "/dev/null".
>>>>> I don't have any problem with the mpirun of MPICH1. Those are
>>>>> something
>>>>> I need to solve before I can run my program with MPICH2.
>>>>> Thanks for your help.
>>>>> Yusong

More information about the mpich-discuss mailing list