Skip to content

Commit

Permalink
Fix bug to have enough space for MF1 comment cards in leapr scratch.
Browse files Browse the repository at this point in the history
  • Loading branch information
HunterBelanger committed Oct 19, 2023
1 parent 943c2fe commit 19994ab
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/leapr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,13 @@ subroutine leapr
isym=0
if (ncold.ne.0) isym=1
if (isabt.eq.1) isym=isym+2
mscr = max(8 + 2*nalpha, 8 + 2*nedge) ! Max needed length of scr based on endout

! Based on endout, to write the actual TSL data, the max number of entries
! needed in scr is either 8+2*nalpha, or 8+2*nedge. However, we have no way
! of knowing how many comment lines were added to the leaper input. The
! previous hard coded limit of 4000 is also used as a possible max as this
! has apparently been sufficient to hold all comments in the past.
mscr = max(8 + 2*nalpha, 8 + 2*nedge, 4000)
allocate(scr(mscr))
call endout(ntempr,bragg,nedge,maxb,scr,mscr,isym,ilog)

Expand Down

0 comments on commit 19994ab

Please sign in to comment.