[fluka-discuss]: Re: Loading multiple FORTRAN binary arrays freezes simulation without feedback on err or log files

From: Primidis, Thomas <Thomas.Primidis_at_liverpool.ac.uk>
Date: Tue, 22 Oct 2019 15:57:48 +0000

Let me close this thread. The arrays were loaded but there was a code mistake during sampling that resulted in an infinite loop before the particle was sampled.


Therefore, there was no sampled particle and as a result the log file was not updated, neither the err file so the write statements were not printed on them to help debug.


Using instead open,write,close statements with user defined UNIT number in the code made the write statements visible and helped find the position of the infinite loop.

________________________________
From: owner-fluka-discuss_at_mi.infn.it <owner-fluka-discuss_at_mi.infn.it> on behalf of Primidis, Thomas <Thomas.Primidis_at_liverpool.ac.uk>
Sent: Monday, October 21, 2019 10:44:27 AM
To: fluka-discuss
Subject: [fluka-discuss]: Loading multiple FORTRAN binary arrays freezes simulation without feedback on err or log files


Dear all,


I am using source.f for a bespoke source description and in the initialisation block of the script I am trying to load 3 cumulative probability distribution function (CDF) arrays in binary format which describe my source. I created these arrays using gfortran outside of fluka.


Compilation of the script is complete but when I run flair, the simulation freezes without any feedback on what is wrong. I have put write(*,*) commands right before loading each of the binary arrays but none of them are printed. In the fluka_xxxx folder, the Err output is empty and the Log output only contains up until the 1st line of the termination paragraph of the user license.


If I load only one binary array, the 3 write(*,*) commands are shown in the log file but the simulation freezes again and the err file contains only 2 'NEXT SEEDS' lines.


If I do not load them and just leave them uninitialised, the code runs.


The loading commands are bellow(I have stripped the renaming of the FILE strings and other bits of code between declaration and initialisation).

      INTEGER, DIMENSION(100) :: CDFXXF
      INTEGER, DIMENSION(100,100) :: CDFYYF
      INTEGER, DIMENSION(100,100,10*10) :: CDFXY
      ........
      ........
      ........
* | *** User initialization ***

      WRITE(*,*) flname
      OPEN(UNIT=26,FILE=flname,STATUS='OLD',FORM='UNFORMATTED')
      READ(26) CDFXXF
      CLOSE(26)

      WRITE(*,*) flname
      OPEN(UNIT=27,FILE=flname,STATUS='OLD',FORM='UNFORMATTED')
      READ(27) CDFYYF
      CLOSE(27)

      WRITE(*,*) flname
      OPEN(UNIT=28,FILE=flname,STATUS='OLD',FORM='UNFORMATTED')
      READ(28) CDFXY
      CLOSE(28)

If the error was later in the code, I assume that the write commands would be printed regardless. But since they are not printed the problem must be here.
Is this an issue seen before? Perhaps a compatibility issue with gfortran(I am using the same version as GFORFLU)? Are there more ways to get debugging information from the run?

Best regards,
Thomas


__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Tue Oct 22 2019 - 19:06:22 CEST

This archive was generated by hypermail 2.3.0 : Tue Oct 22 2019 - 19:06:24 CEST