Dear Stack over flow community, I am running a simple simulation with KPP processor and after the 9th output .dat file (out of 150) the simulation terminates with the following error message:
forrtl: severe (66): output statement overflows record, unit -5, file Internal Formatted Write
Compiler used: Intel Fortran Compiler 2022.2.1 .
This might be the part of the Fortran code involved:
* OPEN( unit=10, file="dyno_"//ex_no(1)//ex_no(2)//ex_no(3)//".dat")
......
......
INTEGER i
WRITE(10,999) (TIME-TSTART)/3600.D0, &
(C(LOOKAT(i))/CFACTOR, i=1,NLOOKAT)
999 FORMAT(E24.16,100(1X,E24.16))*
I hope you can help with that.
Thank you in advance.
I tried checking the WRITE statement in the Fortran Integrator.f90 script but I did not find enough resources inline to check exactly what the problem was.
Maybe this longer description helps:
After successfully compiling a Makefile, with Intel Fortran Compiler 2022.2.1, with the options suggested by chw21, I get an executable file called dynho.exe.
In order to get the desired output I execute dynho.exe with the ./ command. The output should be made of 150 .dat files, because the simulation uses 150 different sets of initial conditions.
The simulation runs but terminated after producing only 9 out of 150 expected .dat files.
The execution of the dynho.exe has been made submitting the salloc script in bwunicluster:
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --cpus-per-task=5
#SBATCH --mem=600mb
#SBATCH --time=27:00:00
#SBATCH -J test_bwbatch # Specify job name
#SBATCH --mail-user=blablabla@kit.edu
#SBATCH --mail-type=BEGIN,END,FAIL
echo "Start kpp script execution at $(date)"
./dynho.exe
which produces a .out file. This is the part where the forrtl error is mentioned:
forrtl: severe (66): output statement overflows record, unit -5, file Internal Formatted Write
Image PC Routine Line Source
dynho.exe 0000000000455A3A Unknown Unknown Unknown
dynho.exe 0000000000454737 Unknown Unknown Unknown
dynho.exe 0000000000408629 dynho_util_mp_ini 66 dynho_Util.f90
dynho.exe 0000000000430EE6 MAIN__ 82 dynho_Main.f90
dynho.exe 000000000040385D Unknown Unknown Unknown
libc-2.28.so 000014B9B1F6D493 __libc_start_main Unknown Unknown
dynho.exe 000000000040377E Unknown Unknown Unknown
============================= JOB FEEDBACK =============================
NodeName=uc2n501
Job ID: 21896960
Cluster: uc2
User/Group: ii5664/imk-tro
State: FAILED (exit code 66)
Nodes: 1
Cores per node: 6
CPU Utilized: 00:12:52
CPU Efficiency: 9.02% of 02:22:36 core-walltime
Job Wall-clock time: 00:23:46
Memory Utilized: 5.89 MB
Memory Efficiency: 0.98% of 600.00 MB
I could post the dynho_Util.f90 and dynho_Main.f90 routines but I would not to overwhelm the post.
This is part of the dynho_Util.f90 :
SUBROUTINE InitSaveData (j)
USE dynho_Parameters
INTEGER :: j
CHARACTER :: ex_no(3)
ex_no(1:2) = '000'
IF(j.lt.10) then
WRITE(ex_no(3),4) j
4 FORMAT(i1)
ELSEIF (j.ge.10.and.j.lt.100) then
WRITE(ex_no(2:3),5) j !! This is line 66 !!
5 FORMAT(i2)
ELSE
WRITE(ex_no(:),6) j
6 FORMAT(i3)
END IF
OPEN( unit=10, file="dynho_"//ex_no(1)//ex_no(2)//ex_no(3)//".dat")
! open(10, file='dynho.dat')
END SUBROUTINE InitSaveData
This dynho_Util.f90 routine is a bit longer but I guess the relevant part should be this one.