RS0DJP@ROHVM1.BITNET (06/14/90)
We use a large, public domain quantum chemistry code called mopac, on a number of our machines. This fortran program opens the input and output files without names, just unit numbers. On our Alliant FX8 (running Concentrix 5.0.0) we are able to connect these unit numbers with setenv statements as follows: setenv FOR012 infile This statement will connect unit 12 with the file infile and when the program opens unit twelve for reading it will read from infile. Of course this feature is not standard, it is something that Alliant added to their version of BSD unix. We now own a Silicon Graphics Iris 4D/210 (running IRIX 3.2.1) and are borrowing two IBM RS/6000s (running AIX 3.1). These machines automatically link the fortran unit number x to the file fort.x. The only exceptions are that on the SGI units 5 and 6 are attached to standard in and standard out respectively. We have set up scripts to run the program by moving the input files to the correct fort files and moving the generated fort files to the correct output files. Unfortunately we generally run mopac in the background and often will send a number of them off. This will clearly cause problems if more than one job is run in the same directory. Is there any way to avoid the problem of colliding fort files on these other machines without messing with the source to the program? Does UNIX have any standard way of dealing with fortran unit numbers? The alliant solution works because we run each job in a different shell and the setenv commands don't conflict. Is there anything similar that is actually standard?