line stack became mis aligned
The attached fails in different ways depending on the compiler and OS. The OP was a problem with the linear algebra which came from the Na I atomic data set and was fixed by limiting the data to the lowest 142 levels.
It fails when the number of lines in the line stack increases after memory is allocated. The failures are:
Ubuntu 20, gcc (Ubuntu 10-20200411-0ubuntu1) 10.0.1 20200411
DISASTER number of lines in LineSave.nsum changed between pass 0 and 1 - this is impossible
DISASTER LineSave.nsum is 853755 and nLineSave is 853260
MacOS gcc (Homebrew GCC 8.4.0_1) 8.4.0
terminate called after throwing an instance of 'bad_signal'
MacOS Apple clang version 11.0.3 (clang-1103.0.32.62)
DISASTER number of lines in LineSave.nsum changed between pass 0 and 1 - this is impossible
DISASTER LineSave.nsum is 853755 and nLineSave is 853260
cloud9 centos gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2)
PROBLEM ConvFail 1, Temp not converged itr 1 zone 726 fnzone 730.93 Te=5.5087e+03 Htot=2.537e+00 Ctot=2.754e+00 rel err=-8.554e-02 rel tol:5.000e-03
DISASTER number of lines in LineSave.nsum changed between pass 0 and 1 - this is impossible
DISASTER LineSave.nsum is 853755 and nLineSave is 853260
cloud9 gcc valgrind
==6029==
==6029== Invalid read of size 8
==6029== at 0x56A1B2: SumLineAdd (lines.h:255)
==6029== by 0x56A1B2: lincom (lines_service.cpp:333)
==6029== by 0x56A1B2: lindst1 (lines_service.cpp:583)
==6029== by 0x56A1B2: lindst (lines_service.cpp:649)
==6029== by 0x56A1B2: lindst(double, float, char const*, long, char, bool, char const*) (lines_service.cpp:626)
==6029== by 0x56FB5C: lines() (prt_lines.cpp:433)
==6029== by 0x5E4004: cloudy() (cloudy.cpp:239)
==6029== by 0x4D61C9: cdDrive() (cddrive.cpp:149)
==6029== by 0x44C1D4: cdMain(int, char const**) (maincl.cpp:493)
==6029== by 0x43E009: main (maincl.cpp:116)
==6029== Address 0x620e1830 is 136,521,712 bytes inside a block of size 136,523,680 in arena "client"
This is a show stopper because the stack because misaligned. Had it become smaller rather than larger the memory error would not have occurred and the line intensities would be corrupt.