Fortran program sometimes hangs while writing large files to disk - file-io

I have written a meshing application that runs quite well except for one thing:
While writing the results to disk, the program sometimes hangs. Well effectively it is still running, I can see it produces 100% CPU load and occupying memory using top. But there is no new data written to the file and this state would probably last indefinitely.
The job can not even be killed, the only option I had so far was rebooting the machine to get rid of the job.
However, most of the time the exact same job executes until the end without any problems. It should be noted that this only happens for large jobs where the final file size is somewhere above the order of 50GB. I haven't hat this behavior with smaller jobs so far. The result file is written up to a different point each time. Sometimes its 45GB, sometimes its 60GB or something completely different.
The workstation I use operates OpenSuse 13.1, has enough RAM and Disk space available. Yet the same behavior could be observed on different machines.
What I tried so far (apart from the usual debugging) was using Gfortran and Intel Fortran compilers to no avail. I messed around with the -mcmodel=large compiler option, but as I understood this is not related to the size of files written by the program and did not help anything.
I don't know what information to provide since I am really running out of ideas what could be causing the problem. I append the routine that writes an ASCII result file here because it produces the largest file size, but I have the same issues when writing unformatted files with a similar routine.
ANY hint on what could possibly cause this behavior is highly appreciated.
SUBROUTINE write_legacymesh
use types
use parameters
use data
implicit none
INTEGER :: l, n, i, j, k, number, c, neighbor
REAL(DP), DIMENSION(3) :: pos_d
CHARACTER(LEN=100) :: dummy_char
INTEGER(I4B), DIMENSION(26) :: neighborbuffer
LOGICAL :: file_exists
call write_header
call system ('sync')
! create the mesh file
dummy_char = folder_mesh // '/' // file_mesh
write(*,'(A,A)') ' writing mesh: ', trim(adjustl(dummy_char))
open(unit=20, file=trim(adjustl(dummy_char)), status='replace', action='write')
! write the mesh file
write(20,'(A)') ' LB database'
l = level_max
! write the header for this mesh size
write(20,'(A)') ' number of collision centers'
write(20,'(I16)') nf(l)
write(20,'(A)') ' number of cut links'
write(20,'(I16)') ncut(l)
write(20,'(A)') ' number of boundary collision centers'
write(20,'(I16)') nb(l)
write(20,'(A)') ' dummy value'
write(20,'(I16)') 0
write(20,'(A)') ' number of inflow boundary collision centers'
write(20,'(I16)') nb1(l)
write(20,'(A)') ' number of pressure boundary collision centers'
write(20,'(I16)') nb2(l)
write(20,'(A)') ' number of slip boundary collision centers'
write(20,'(I16)') nb3(l)
write(20,'(A)') ' number of noslip boundary collision centers'
write(20,'(I16)') nb4(l)
write(20,'(A)') ' lattice spacing'
write(20,'(E16.8)') dx(l)*scaling
! write the coordinates
write(20,'(A)') ' cc RBT value cc coordinates'
do n=1, nf(l)
number = order_level(l)%order(n)
i = levels(l)%blocks(number)%pos(1)
j = levels(l)%blocks(number)%pos(2)
k = levels(l)%blocks(number)%pos(3)
! rescale and move the geometry to get the original size and position
pos_d(1) = (real(i,kind=dp) - 0.5_dp) * dx(l) + corner_ibc(1)
pos_d(2) = (real(j,kind=dp) - 0.5_dp) * dx(l) + corner_ibc(2)
pos_d(3) = (real(k,kind=dp) - 0.5_dp) * dx(l) + corner_ibc(3)
write(20,'(2I16,3E20.7)') n, levels(l)%blocks(number)%state, pos_d*scaling
end do
! write the link info
write(20,'(A)') ' link information'
do n=1, nf(l)
number = order_level(l)%order(n)
do c=1, nlinks
neighbor = levels(l)%blocks(number)%neighbors(c)
if(neighbor .GT. 0) then
neighborbuffer(c) = levels(l)%blocks(neighbor)%number
else
neighborbuffer(c) = neighbor
end if
end do
write(20,'(7I16)') n, neighborbuffer(1:6)
write(20,'(A,6I16)') ' ', neighborbuffer(7:12)
write(20,'(A,6I16)') ' ', neighborbuffer(13:18)
end do
! write the q-values
write(20,'(A)') ' q-values'
do n=1, ncut(l)
write(20,'(I16,E20.7)') n, max(qmin, min(qmax, aux_level(l)%q_values(n)))
end do
write(20,'(A)') ' end of data'
close(unit=20)
END SUBROUTINE write_legacymesh
Edit1: Following the suggestions of flushing write buffers, I added this to every loop that writes data:
if(mod(n,10000000) .EQ. 0) then
call flush(20)
close(unit=20)
call system('sync')
open(unit=20, file=trim(adjustl(dummy_char)), status='old', position='append', action='write')
end if
This did not change anything, the routine still hangs at a random point, this time after writing 18.5GB of data or 211'149'016 write events in the first loop.
Edit2: Deactivating buffered I/O with the Intel Fortran compiler (not using the -assume buffered_io flag) kind of "solved" the issue. But of course this leaves me with slow unbuffered writes for large files, a particularly unpleasant combination.
Edit3: Thanks for the suggestion to add manual write buffers. The file format is not well suited to make use of them efficiently, but its still better than nothing. Anyway, this is a legacy file format and I am positive that I can convince my co-workers that a different file format or even unformatted files are the better option.
While I still have no idea what causes the error, at least I have a tolerable way to avoid it now. Thanks for all the valuable suggestions.

Related

Why fcntl start=0, len=0, whence=2 works?

According to the fcntl manual, fcntl locking with start=0, len=0, whence=2 should lock the byte range starting from the end of file (whence=2), with offset 0 (start=0) until the end of file (len=0), which in my mind means locking in total 0 bytes from EOF to EOF.
In this case I would expect that locking with those arguments would not lock anything. However, if I try (using python wrapper fcntl), the following code does lock something, and the second copy is waiting for the first to finish:
f = open('some_file', 'a+')
fcntl.lockf(f, fcntl.LOCK_EX, 0, 0, 2)
print('got the lock')
time.sleep(100)
Similarly, the code with parameters whence=2, offset=100, len=0 also works, even those in this case the byte range is backwards [EOF + 100, EOF].
What am I locking?
I did some tests, and the answer seems to be as follows - whence=2 does not lock until the EOF, but until the infinity, which is not how I would read the description in the man page:
Specifying 0 for l_len has the
special meaning: lock all bytes starting at the location
specified by l_whence and l_start through to the end of file, no
matter how large the file grows.
😞

Optimising applescript to decrease energy impact

I have this script that I created for a battery indicator widget that will show on my (Macbook pro) touch bar and have it set to re-run every 3 secs (to update the text and logo), but it is eating a lot of energy just running in the background and I was wondering if maybe there was a way to make it more efficient in some way in order to decrease battery consumption.
Here is the script:
(Keep in mind that the images for the icon are in base64 because I plan on sharing this widget with people who might know nothing about computers and therefor I can't have them download and save an image in a specific directory etc..)
set bat_empty_icon to "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAA3XAAAN1wFCKJt4AAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgpMwidZAAALzUlEQVR4Ae3dv69lVRUH8IdMDAxQTYjAWFAQEwsrAWNCYkFoJsgQO7UxYvQPoFWgMDYWxEYrbfzVAoUNgcRkEg2MFcWEhIIYYGhomOFXjOD6jjnkcmfemzez7ptz9r2fnay59915+9y1P/vsNeec+2P29jQCBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQINAXuKm/iUtbuLX+fLjioYqTFfes3N5R9zUCowpcqMTfqXh75fZM3X+p4qOKoVunAJyokZ+ueKzikYrjFRqBXRH4sAb6YsULFc9XvFexE+22GuVTFamMnwkG9oFLayFrImtja9vNNbKfVpyvsPAZ2Acu3weyNrJGslaGaIc9Bcg5/XMVDwwxKkkSmFfg1Xr6xyty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DwCxgDgCzgDkAzALmADALmAPALGAOALOAOQDMAuYAMAuYA8AsYA4As4A5AMwC5gAwC5gDwCxgDgCzgDkAzALmADALmAPALGAOALOAOQDMAuYAMAuYA8AsYA4As4A5AMwC5gAwC5gDwCxgDgCzgDkAzALmADALmAPALGAOALOA/R+GatypVlYrzAAAAABJRU5ErkJggg=="
set chargeState to do shell script "pmset -g batt | awk '{printf \"%s %s\\n\", $4,$5;exit}'"
set percentLeft to do shell script "pmset -g batt | egrep -ow '([0-9]{1,3})[%]'" as text
set percentcheck to (item 1 of words of percentLeft as integer)
on new_icon(base64Code)
set percentLeft to do shell script "pmset -g batt | egrep -ow '([0-9]{1,3})[%]'" as text
tell application "BetterTouchTool"
update_touch_bar_widget "482F2657-A978-4D25-B9D6-EABFAD7E3B0A" text percentLeft icon_data base64Code
end tell
end new_icon
if (chargeState contains "AC") then
my new_icon(bat_charging_icon)
else if percentcheck ≥ 85 then
my new_icon(bat_full_icon)
else if (percentcheck < 85) and (percentcheck ≥ 65) then
my new_icon(bat_three_quarters_icon)
else if (percentcheck < 65) and (percentcheck ≥ 31) then
my new_icon(bat_three_quarters_icon)
else if percentcheck < 31 then
my new_icon(bat_low_icon)
else if percentcheck ≤ 10 then
my new_icon(bat_empty_icon)
end if
Your first step should be to increase the intervals at which you run the script. There is no need to have it run every 3 seconds (!). Even once a minute would be sufficient but I, personally, would set it to something such as once every ten minutes, since the battery level doesn't tends to only change once within a ten minute window. Even if it changed twice (e.g. dropping from 97% to 96% then to 95%), there would be no negative consequences from your script registering the level going from 97% straight down to 95% in a ten minute interval.
The next thing you can do is store those base 64 strings in properties rather than variables. Properties are set once and stored between subsequent runs of a script. If the values of the properties aren't altered, then the script doesn't need to read a new set of values each time it executes. As they are set at compile time, the overhead is reduced at run time.
The next thing you can do is get rid of the do shell script commands. They incur a lot of overhead. Instead, you can use AppleScriptObjC calls to obtain the information you need. There is still a slight overhead in implementing AppleScriptObjC compared to vanilla AppleScript, but it won't be as great as the cost of creating multiple shell processes:
property bat_empty_icon : "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAA3XAAAN1wFCKJt4AAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgpMwidZAAALzUlEQVR4Ae3dv69lVRUH8IdMDAxQTYjAWFAQEwsrAWNCYkFoJsgQO7UxYvQPoFWgMDYWxEYrbfzVAoUNgcRkEg2MFcWEhIIYYGhomOFXjOD6jjnkcmfemzez7ptz9r2fnay59915+9y1P/vsNeec+2P29jQCBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAA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F5Fq/meQu9Rqd+nSr3utSRTqVQy38fkLOA6NPS3Dm2ssj3rQiTF369icwBMI4cAeAvaZXkvOt+tnxwPjojL369icwBMI4cA6EHt/wEKsG98XP5+FZsDwCxgPtjTLGAOALOAOQDMAuYAMAuYA8AsYA4As4A5AMwC5gAwC5gDwCxgDgCzgDkAzALmADALmAPALGAOALOAOQDMAuYAMAuYA8AsYA4As4A5AMwC5gAwC5gDwCxgDgCzgDkAzALmADALmAPALGAOALOAOQDMAuYAMAuYA8AsYA4As4A5AMwC5gAwC5gDwCxgDgCzgDkAzALmADALmAPALGAOALOAOQDMAuYAMAuYA8AsYA4As4A5AMwC5gAwC5gDwCxgDgCzgDkAzALmADALmAPALGAOALOA/R+GatypVlYrzAAAAABJRU5ErkJggg=="
global percentage
set [percentage, powersource] to [|current capacity|, ¬
|power source state|] of battery's info()
if powersource contains "AC" then
new_icon(bat_charging_icon)
else if percentage ≥ 85 then
new_icon(bat_full_icon)
else if percentage ≥ 65 then
new_icon(bat_three_quarters_icon)
else if percentage ≥ 31 then
new_icon(bat_three_quarters_icon)
else if percentage ≥ 11 then
new_icon(bat_low_icon)
else
new_icon(bat_empty_icon)
end if
on new_icon(base64Code)
global percentage
tell application "BetterTouchTool"
update_touch_bar_widget ¬
"482F2657-A978-4D25-B9D6-EABFAD7E3B0A" text ¬
"" & percentage & "%" icon_data base64Code
end tell
end new_icon
script battery
use framework "IOKit"
on info()
current application's IOPSCopyPowerSourcesInfo() as record
end info
end script
Additionally, I tidied up the if...then...else block so it doesn't do more number comparisons than necessary.

unable to merge large files in r

I have run into a problem.
I have 10 large separate files, file type File without column headers, which are in total near 4GB which are require merging. I have been told they are text files and pipe delimited, so I added the file extension txt on each files, which I hope is not the problem. R Studio is crashing when I use the following code...
multmerge = function(mypath){
filenames=list.files(path=mypath, full.names=TRUE)
datalist = lapply(filenames, function(x){read.csv(file=x,header=F, sep
= "|")})
Reduce(function(x,y) {merge(x,y, all=T)}, datalist)}
mymergeddata = multmerge("C://FolderName//FolderName")
or when I try to do something like this...
temp1 <- read.csv(file="filename.txt", sep="|")
:
temp10 <- read.csv(file="filename.txt", sep="|")
SomeData = Reduce(function(x, y) merge(x, y), list(temp1...,
temp10))
I seeing errors such as
"Error: C stack usage is too close to the limit r" and
"In scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
Reached total allocation of 8183Mb: see help(memory.size)"
Then I saw a someone asked a question on SO as I am writing this question,
here, so I was wondering if SQL command can used in R Studio or SSMS to merge these large files? If they can how can it be merged to. If it can be done please can you advise me how to do this. I will looking around on the net.
If it can't then what is the best method to merge these rather large files. Can this be achieved in R Studio or is there open source?
I am working on a PC which has 64bit Windows with 8GB RAMS. I have included R and SQL Tags to see what options there are.
Thanks in advance if anyone can help me.
Your machine doesn't have enough memory for your selected operations.
You have 10 files ~ 4GB in total.
When you merge the 10 files you create another object which is also about 4GB, putting you very close to your machine's limit.
Your operating system and R and whatever else you're running also consume RAM so it's no surprise you run out of RAM.
I'd suggest taking a stepwise approach if you don't have access to a bigger maching:
- take the first two files and merge them.
- delete the file objects from R and keep only the merged one.
- load the third object and merge it with the earlier merger.
Repeat until done.

Fortran: reading input

I am trying to run a really large FORTRAN model, so I can't give all the code that's involved but I hope I can give enough information for this to make sense.
The code compiled fine (using Intel 2016.0.109 compiler, OpenMPI 1.10.2 and HDF5 1.8.17).
When I try to run it though, it tells me that two of my inputs (called NZG and NZS) are set to -999, hence it fails.
> >>>> opspec_grid error! in your namelist!
> ---> Reason: Too few soil layers. Set it to at least 2. Your nzg is currently set to -999...
> ---> Reason: Too few maximum # of snow layers. Set it to at least 1. Your nzs is currently set to -999.
However, in the input file, they are really specified as
NL%NZG = 9
NL%NZS = 1
I went through all the modules that somehow have something to do with these variables and cannot find anywhere where this should go off the rails.
So I am starting to think now that maybe there is something wrong with the way the values are read in. The input file is a text file. The variables are specified as integers in the module that reads them in, FYI.
Should I check for special characters or something? I know Fortran can be picky with inputs...
EDIT: Below the code sequence tracing back the error
1) The main module opens the namelist
write (unit=*,fmt='(a)') 'Reading namelist information'
call read_nl(trim(name_name))
read_nl is
subroutine read_nl(namelist_name)
use ename_coms, only : nl & ! intent(inout)
, init_ename_vars ! ! subroutine
implicit none
!----- Arguments. ----------------------------------------------------------------------!
character(len=*), intent(in) :: namelist_name
!----- Local variables. ----------------------------------------------------------------!
logical :: fexists
!----- Name lists. ---------------------------------------------------------------------!
namelist /ED_NL/ nl
!---------------------------------------------------------------------------------------!
!----- Open the namelist file. ---------------------------------------------------------!
inquire (file=trim(namelist_name),exist=fexists)
if (.not. fexists) then
call fatal_error('The namelist file '//trim(namelist_name)//' is missing.' &
,'read_nl','ed_load_namelist.f90')
end if
!----- Initialise the name list with absurd, undefined values. -------------------------!
call init_ename_vars(nl)
!----- Read grid point and options information from the namelist. ----------------------!
open (unit=10, status='OLD', file=namelist_name)
read (unit=10, nml=ED_NL)
close(unit=10)
return
end subroutine read_nl
2) Then there are specifics about how (what variables) to read from the namelist (the input)
write (unit=*,fmt='(a)') 'Copying namelist'
call copy_nl('ALL_CASES')
if (runtype == 'HISTORY') then
call copy_nl('HISTORY')
else
call copy_nl('NOT_HISTORY')
end if
My simulation is 'NOT_HISTORY': copy_nl('ALL_CASES') is specified so it reads a number of the namelist variables, including the variable 'runtype' - which is then used in that if-else statement.
3) Then copy_nl('NOT_HISTORY') is the following, this is where nzg and nzs are defined.
subroutine copy_nl(copy_type)
use grid_coms , only : time & ! intent(out)
, centlon & ! intent(out)
, centlat & ! intent(out)
, deltax & ! intent(out)
, deltay & ! intent(out)
, nnxp & ! intent(out)
, nnyp & ! intent(out)
, nstratx & ! intent(out)
, nstraty & ! intent(out)
, polelat & ! intent(out)
, polelon & ! intent(out)
, ngrids & ! intent(out)
, timmax & ! intent(out)
, time & ! intent(out)
, nzg & ! intent(out)
, nzs ! ! intent(out)
implicit none
!----- Arguments. ----------------------------------------------------------------------!
character(len=*), intent(in) :: copy_type
!----- Internal variables. -------------------------------------------------------------!
integer :: ifm
!---------------------------------------------------------------------------------------!
!---------------------------------------------------------------------------------------!
! Here we decide which variables we should copy based on the input variable. !
!---------------------------------------------------------------------------------------!
select case (trim(copy_type))
case ('NOT_HISTORY')
itimea = nl%itimea
idatea = nl%idatea
imontha = nl%imontha
iyeara = nl%iyeara
nzg = nl%nzg
nzs = nl%nzs
slz(1:nzgmax) = nl%slz(1:nzgmax)
current_time%year = iyeara
current_time%month = imontha
current_time%date = idatea
current_time%time = real(int(real(itimea) * 0.01)) * hr_sec &
+ (real(itimea) * 0.01 - real(int(real(itimea)*0.01))) &
* 100.0 * min_sec
time = 0.0d0
NOTE that I have not put all the modules and variables in use, otherwise this post would become insanely long.
FYI the module grid_coms specifies the type the variable is. See below the relevant part (the whole module is a list of variables, nothing else)
module grid_coms
integer :: nzg ! Number of soil levels
integer :: nzs ! Number of snow/surface water levels
end module grid_coms
4) Back to the main module, this then calls ed_opspec_grid to check that the variables make sense, and this is where things go wrong. Again, with use the variables are initialized at the start, I'm leaving that out here.
subroutine ed_opspec_grid
!---------------------------------------------------------------------------------------!
! Check whether soil layers are reasonable, i.e, enough layers, sorted from the !
! deepest to the shallowest. !
!---------------------------------------------------------------------------------------!
if (nzg < 2) then
write (reason,'(a,1x,i4,a)') &
'Too few soil layers. Set it to at least 2. Your nzg is currently set to' &
,nzg,'...'
call opspec_fatal(reason,'opspec_grid')
ifaterr=ifaterr+1
elseif (nzg > nzgmax) then
write (reason,'(2(a,1x,i5,a))') &
'The number of soil layers cannot be greater than ',nzgmax,'.' &
,' Your nzg is currently set to',nzg,'.'
call opspec_fatal(reason,'opspec_grid')
ifaterr=ifaterr+1
end if
do k=1,nzg
if (slz(k) > -.001) then
write (reason,'(a,1x,i4,1x,a,1x,es14.7,a)') &
'Your soil level #',k,'is not enough below ground. It is currently set to' &
,slz(k),', make it deeper than -0.001...'
call opspec_fatal(reason,'opspec_grid')
ifaterr=ifaterr+1
end if
end do
do k=1,nzg-1
if (slz(k)-slz(k+1) > .001) then
write (reason,'(2(a,1x,i4,1x),a,2x,a,1x,es14.7,1x,a,1x,es14.7,a)') &
'Soil layers #',k,'and',k+1,'are not enough apart (i.e. > 0.001).' &
,'They are currently set as ',slz(k),'and',slz(k+1),'...'
call opspec_fatal(reason,'opspec_grid')
ifaterr=ifaterr+1
end if
end do
end subroutine ed_opspec_grid
NOTE that this is not the first check in this subroutine. Other variables are checked before this part (I left those out), but this is the first error message. Which makes me think that maybe part of the input is read okay and some is not.
Finally, let me stress again that this is a very large project, I really cannot show all the code, which is why I framed the question very simply: are there any (text) input requirements for Fortran that I might have missed (special characters, returns, maybe different for different systems?).
Plus, this code is used by a lot of researchers, on different platforms, so I doubt it very much there is something wrong with the code itself... (but let me know if I'm wrong).
You are not giving us enough data to pinpoint the issue, so I'll just tell you two of the issues that I have come across using namelists:
If you read several (even different) namelists from the same file, the order counts: If in the file namelist a preceeds namelist b, but the code reads b first, then it won't find a unless you rewind the file.
If the namelist in the data file does not include one or more values, these values will simply stay the same. It is quite likely that in the code these variables are set to -999 specifically so that their absence would be noted. So double-check that the data file is correct. Look for stray / characters that might end the namelist prematurely
All in all, in order to correctly assess what's happening, we'd need at least 3 things:
The declaration block, including all the variables that form part of this namelist, and the namelist /.../ ...,...,... specification
The part of the namelist file that declares this specific namelist, and
Whether any other namelists are also in the same file and whether they're before or after this namelist (both in the file, and in the code)

Why doesn't io:write() write to the output file?

I'm writing a short script in Lua to replicate Search/Replace functionality. The goal is to enter a search term and a replacement term, and it will comb through all the files of a given extension (not input-determined yet) and replace the Search term with the Replacement term.
Everything seems to do what it's supposed to, except the files are not actually written to. My Lua interpreter (compiled by myself in Pelles-C) does not throw any errors or exit abnormally; the script completes as if it worked.
At first I didn't have i:flush(), but I added it after reading that it is supposed to save any written data to the file (see LUA docs). It didn't change anything, and files are still not written to.
I think it might have something to do with how I'm opening the file to edit it, since the "w" option works (but overwrites everything in my test files).
Source:
io.write("Enter your search term:")
term = io.read()
io.write("Enter your replace term:")
replacement = io.read()
io.stdin:read()
t = {}
for z in io.popen('dir /b /a-d'):lines() do
if string.match(string.lower(z), "%.txt$") then
print(z)
table.insert(t, z)
end
end
print("Second loop")
for _, w in pairs(t) do
print(w)
i = io.open(w, "r+")
print(i)
--i:seek("set", 6)
--i:write("cheese")
--i:flush()
for y in i:lines() do
print(y)
p, count = string.gsub(y, term, replacement, 1)
print(p)
i:write(p)
i:flush()
io.stdin:read()
end
i:close()
end
This is the output I get (which is what I want to happen), but in reality isn't being written to the file:
There was one time where it wrote output to a file, but it only output to one file and after that write my script crashed with the message: No error. The line number was at the for y in i:lines() do line, but I don't know why it broke there. I've noticed file:lines() will break if the file itself has nothing in it and give an odd/gibberish error, but there are things in my text files.
Edit1
I tried do this in my for loop:
for y in i:lines() do
print(y)
p, count = string.gsub(y, term, replacement, 1)
print(p)
i:write(p)
i:seek("set", 3) --New
i:write("TESTESTTEST") --New
i:flush()
io.stdin:read()
end
in order to see if I could force it to write regular text. It does but then it crashes with No error and still doesn't write the replacement string (just TESTESTTEST). I don't know what the problem could be.
I guess, one can't write to file while traversing its lines
for y in i:lines() do
i:write(p)
i:flush()
end