From: Alberto Fasso' (fasso@SLAC.Stanford.EDU)
Date: Wed Apr 04 2007 - 16:16:28 CEST
the reason it doesn't work is that the job is running in a
temporary subdirectory, and the file you want to open is in the
So, instead of
OPEN(UNIT = 21.0, FILE = 'spectrum.dat'
you should have
OPEN(UNIT = 21.0, FILE = '../spectrum.dat'
Otherwise you can use the OAUXFI routine, as suggested by Paola: in this case
the program will find automatically where the file is.
On Wed, 4 Apr 2007, Burge, F (Frances) wrote:
> Hello all,
> I am trying to modify the SOURCE user routine to read in a file
> containing spectrum data, so that I can then sample photon energies from
> this spectrum.
> I have included a Fortran OPEN statement in the initialisation part of
> SOURCE to do this, as instructed in the fluka manual, and have been able
> to compile the routine and link it to create a new fluka exe. However
> when I run this exe it apparently cannot open the spectrum data file. I
> have been able to open and read it with a separate Fortran program,
> using very similar statements to the ones I include in the SOURCE
> routine, so I don't think there is anything wrong with the spectrum file
> itself. I was thinking that maybe it has to be saved in a particular
> directory, but I've tried specifying the full path to it and it still
> doesn't work.
> Can anyone advise me what I need to do to get the file to open? I've
> attached the relevant section of SOURCE as a text file.
> Many thanks,
> Frances Burge
> Health Physicist
> 01235 778269
> Diamond Light Source Ltd.
> Rutherford Appleton Laboratory
> OX11 0DE
-- Alberto FassÚ SLAC-RP, MS 48, 2575 Sand Hill Road, Menlo Park CA 94025 Phone: (1 650) 926 4762 Fax: (1 650) 926 3569 firstname.lastname@example.org
This archive was generated by hypermail 2.1.6 : Wed Apr 04 2007 - 16:30:38 CEST