From: Florian (florian.sommerer@cern.ch)
Date: Mon Apr 23 2007 - 12:29:12 CEST
Dear Preeksingh,
You are opening the file fort.21 every time you are entering source.f.
Then you are reading the data also every time. I don't know what Fortran
does in this case but I guess it saves the data somewhere and is finally
running out of memory.
You should read the data only the first time and save it. You can do so
by doing the reading within the block which starts with "IF ( LFIRST ) THEN"
which is called only the first time.
You can do for example:
*
LOGICAL LFIRST
*
SAVE LFIRST
DATA LFIRST / .TRUE. /
PARAMETER (MXKK = 1626)
DOUBLE PRECISION tkeffff(MXKK),cxtrkkk(MXKK),cytrkkk(MXKK)
DATA tkeffff / MXKK*ZERZER /
DATA cxtrkkk / MXKK*ZERZER /
DATA cytrkkk / MXKK*ZERZER /
SAVE tkeffff, cxtrkkk, cytrkkk
*======================================================================*
* *
* BASIC VERSION *
* *
*======================================================================*
NOMORE = 0
* +-------------------------------------------------------------------*
* | First call initializations:
IF ( LFIRST ) THEN
* | *** The following 3 cards are mandatory ***
TKESUM = ZERZER
LFIRST = .FALSE.
LUSSRC = .TRUE.
open(84,FILE='yourpath/fort.21',STATUS='OLD')
DO KK = 1, MXKK
read(84,*)tkeffff(kk),cxtrkkk(kk),cytrkkk(kk)
END DO
* | *** User initialization ***
END IF
Regards, Florian
g4736524@student.mahidol.ac.th wrote:
> Dear Fluka authors,
>
> I used the source.f to randomly
> read the data of kinetic energy, direction cosine
> in x and y from fort.21 then used as input of
> properties of beam to 18_nmpt3.inp but there were
> error occur where I cannot find it. Could you
> kindly guide me where the error should be?
>
> regards,
>
> Preeksingh....
>
>
> -------------------------------------------------
> This mail sent through MU-Webmail: webmail.mahidol.ac.th
-- ########################################### Florian Sommerer European Organization for Nuclear Research CERN DSU/TT Mailbox Z08700 Geneve 23 CH-1211 Switzerland Tel : +41 2276 75582 ###########################################
This archive was generated by hypermail 2.1.6 : Mon Apr 23 2007 - 13:12:43 CEST