Re: Source routine creating bigsize files

From: P K SAHANI <pksfluka_at_gmail.com>
Date: Tue, 21 May 2013 15:55:03 +0530

Thank You Sir. I have incorporated your comments as

1. Removed the USRDUMP card.

2. Sample the energy between 4.0E-6 and 9.81884E-5

3. do loop I=1,139

Thank you once agian for correcting my mistakes.

Regards
P K Sahani
On Mon, May 20, 2013 at 1:41 PM, Alberto Fasso' <fasso_at_slac.stanford.edu>wrote:

> Dear Sahani,
>
> Fluka is generating huge size file as XXXX_source, because you put in
> your input a command USERDUMP requesting to dump on a file called
> "source" all the source particles. With a run of 1.E7 particles, you get
> a file of 10 million records. And, as you say: "This file size go on
> increasing as we increase the histories".
> I don't know why you you have that command in input: but the program
> gives you exactly what you requested. Remove USERDUMP, and the file will
> disappear.
>
> Having said this, I must warn you that there are errors of logics in
> your source routine. These are not the cause of the huge file, but are
> probably affecting the results.
> 1) the energies of the spectrum read by your source go from 4.E-6 to
> 9.8E-5, but you sample the energy between 1.E-6 and 2.E-4, therefore in
> a wider interval. It is difficult to predict the effect of this.
>
> 2) you read EN(I), SPEC(I) (energies and spectral values) with I going
> from 1 to 140. But you assign a weight to the sampled energy as follows:
> DO 3 I = 1, 140
> IF(ENERGY .GT. EN(I)) THEN
> WEIGHT = HLFHLF*(SPEC(I)+SPEC(I+1))
> END IF
> 3 CONTINUE
> For I = 140, I+1 is = 141, and you have not read a value for
> SPEC(141).
> The program doesn't crash because you have dimensioned EN and SPEC
> from 0 to 630, so SPEC(141) is a legal array member, but its value is
> undefined.
>
> Alberto
>
>
> On Sun, 19 May 2013, P K SAHANI wrote:
>
> > Dear Sir,
> > I am sending this personally to you as I found no reply to my
> query in
> > fluka discussion list. I am also attaching the input, source subroutine
> > and spectrum file with this mail. Please guide me.
> >
> >
> > Regards
> >
> > P K Sahani
> >
> >
> >
> >
> ____________________________________________________________________________
> > From: P K SAHANI [pksfluka_at_gmail.com]
> > Sent: 07 March 2013 07:49
> > To: fluka-discuss_at_fluka.org
> > Subject: Souce routine creating bigsize files
> >
> > Dear Fluka users,
> > I am using source routine for synchrotron radiation spectrum dose
> > calculation This routine is the same as suggested by Mr. Alberto Fasso
> > (ref:
> > http://www.fluka.org/web_archive/earchive/new-fluka-discuss/2970.html).
> > My spectrum has 140 energies and simulating for 1e7 histories. Fluka
> > is generating huge size file as XXXX_source (720MB) for each cycle.
> > This file size go on increasing as we increase the histories. I want
> > to go for higher number of histories that too at minimum 5 cycle run.
> > So please suggest me to reduce the file size otherwise its difficult
> > to handle such big files in my PC.
> >
> >
> > Regards
> > P K Sahani
> --1334189000-1456032314-1369037486=:26906--
>
>
>

--001a11c1c3d2c24bc504dd37dc8d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>Thank You Sir. I have incorporated your comments as </div>
<div>=A0</div>
<div>1. Removed the USRDUMP card.</div>
<div>=A0</div>
<div>2.=A0Sample the energy between 4.0E-6 and 9.81884E-5</div>
<div>=A0</div>
<div>3. do loop I=3D1,139 </div>
<div>=A0</div>
<div>Thank you once agian for correcting my mistakes.</div>
<div>=A0</div>
<div>Regards</div>
<div>P K Sahani<br></div>
<div class=3D"gmail_quote">On Mon, May 20, 2013 at 1:41 PM, Alberto Fasso&#=
39; <span dir=3D"ltr">&lt;<a href=3D"mailto:fasso_at_slac.stanford.edu" target=
=3D"_blank">fasso_at_slac.stanford.edu</a>&gt;</span> wrote:<br>
<blockquote style=3D"BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PA=
DDING-LEFT:1ex" class=3D"gmail_quote">
<div class=3D"HOEnZb">
<div class=3D"h5">Dear Sahani,<br><br>Fluka is generating huge size file as=
  XXXX_source, because you put in<br>your input a command USERDUMP requestin=
g to dump on a file called<br>&quot;source&quot; all the source particles. =
With a run of 1.E7 particles, you get<br>
a file of 10 million records. And, as you say: &quot;This file size go on<b=
r>increasing as we increase the histories&quot;.<br>I don&#39;t know why yo=
u you have that command in input: but the program<br>gives you exactly what=
  you requested. Remove USERDUMP, and the file will<br>
disappear.<br><br>Having said this, I must warn you that there are errors o=
f logics in<br>your source routine. These are not the cause of the huge fil=
e, but are<br>probably affecting the results.<br>1) the energies of the spe=
ctrum read by your source go from 4.E-6 to<br>
9.8E-5, but you sample the energy between 1.E-6 and 2.E-4, therefore in<br>=
a wider interval. It is difficult to predict the effect of this.<br><br>2) =
you read EN(I), SPEC(I) (energies and spectral values) with I going<br>
from 1 to 140. But you assign a weight to the sampled energy as follows:<br=
>=A0 =A0 =A0 =A0 DO 3 I =3D 1, 140<br>=A0 =A0 =A0 =A0 =A0 =A0IF(ENERGY .GT.=
  EN(I)) THEN<br>=A0 =A0 =A0 =A0 =A0 =A0 =A0 WEIGHT =3D HLFHLF*(SPEC(I)+SPEC=
(I+1))<br>=A0 =A0 =A0 =A0 =A0 =A0END IF<br>=A0 =A03 =A0 =A0CONTINUE<br>
=A0 =A0 =A0For I =3D 140, I+1 is =3D 141, and you have not read a value for=
  SPEC(141).<br>=A0 =A0 =A0The program doesn&#39;t crash because you have di=
mensioned EN and SPEC<br>from 0 to 630, so SPEC(141) is a legal array membe=
r, but its value is<br>
undefined.<br><br>Alberto<br><br><br>On Sun, 19 May 2013, P K SAHANI wrote:=
<br><br>&gt; Dear Sir,<br>&gt; =A0 =A0 =A0 I am sending this personally to =
you as I found no reply to my query in<br>&gt; fluka discussion list. =A0 I=
  am also attaching the input, source subroutine<br>
&gt; and spectrum file with this mail. Please guide me.<br>&gt;<br>&gt;<br>=
&gt; Regards<br>&gt;<br>&gt; P K Sahani<br>&gt;<br>&gt;<br>&gt;<br>&gt; ___=
_________________________________________________________________________<b=
r>
&gt; From: P K SAHANI [<a href=3D"mailto:pksfluka_at_gmail.com">pksfluka_at_gmail=
.com</a>]<br>&gt; Sent: 07 March 2013 07:49<br>&gt; To: <a href=3D"mailto:f=
luka-discuss_at_fluka.org">fluka-discuss_at_fluka.org</a><br>&gt; Subject: Souce =
routine creating bigsize files<br>
&gt;<br>&gt; Dear Fluka users,<br>&gt; =A0 =A0 I am using source routine fo=
r synchrotron radiation spectrum dose<br>&gt; calculation This routine is t=
he same as suggested by Mr. Alberto Fasso<br>&gt; (ref:<br>&gt; <a href=3D"=
http://www.fluka.org/web_archive/earchive/new-fluka-discuss/2970.html" targ=
et=3D"_blank">http://www.fluka.org/web_archive/earchive/new-fluka-discuss/2=
970.html</a>).<br>
&gt; My spectrum has 140 energies and simulating for 1e7 histories. Fluka<b=
r>&gt; is generating huge size file as XXXX_source (720MB) for each cycle.<=
br>&gt; This file size go on increasing as we increase the histories. I wan=
t<br>
&gt; to go for higher number of histories that too at minimum 5 cycle run.<=
br>&gt; So please suggest me to reduce the file size otherwise its difficul=
t<br>&gt; to handle such big files in my PC.<br>&gt;<br>&gt;<br>&gt; Regard=
s<br>
&gt; P K Sahani<br></div></div>--1334189000-1456032314-1369037486=3D:26906-=
-<br><br><br></blockquote></div><br>

--001a11c1c3d2c24bc504dd37dc8d--
Received on Tue May 21 2013 - 15:49:48 CEST

This archive was generated by hypermail 2.3.0 : Tue May 21 2013 - 15:49:51 CEST