Archives


- Beowulf
- Beowulf Announce
- Scyld-users
- Beowulf on Debian

question about using same unit number to open different files on a dual processor computer.

Many of your questions may have already been answered in earlier discussions or in the FAQ. The search results page will indicate current discussions as well as past list serves, articles, and papers.

Search

Martin Siegert siegert at sfu.ca
Wed Jun 12 19:52:18 PDT 2002


Hi,

On Wed, Jun 12, 2002 at 04:34:14PM -0500, gli at chem.wisc.edu wrote:
> Hi, everybody,
> i use MPICH to make a parallel program on one dual-processor computer.
> so there should be two processes on this computer i can use. id=0,1
> i want to open different files for different id processes but using the 
> same unit number, is it possible?
> if yes, how i can do it?
> 
> thanks very much!!

Since you are refering to "unit numbers" I am guessing that your program
is written in Fortran. In that case something like

if (id == 0) then
   open(8,file='file0')
else
   open(8,file='file1')
endif

should do the trick.
I hope this helps.

Cheers,
Martin

========================================================================
Martin Siegert
Academic Computing Services                        phone: (604) 291-4691
Simon Fraser University                            fax:   (604) 291-4242
Burnaby, British Columbia                          email: siegert at sfu.ca
Canada  V5A 1S6
========================================================================



More information about the Beowulf mailing list