Open partofthething opened 2 years ago
Looks like this was fixed upstream with https://github.com/boostorg/hana/commit/9cd5744df7517138a50f238c4b26232e65ba3121
Quick question: which compiler are you using? I have never seen this error pop up before on any of the ones I test on from time to time.
A repeat of what I put on the hana-adapter PR to make sure this information also appears here.
I forgot to mention this: deprecation warnings get turned into errors due to the -Werror flag while compiling. You can actually switch that off in the NJOY21 CMakeLists.txt file. Removing the -Werror will revert to warnings again, and allow for compilation to continue. Either way, I'm testing ENDFtk right now with gcc 11.2 and I do see that deprecation warning so I will have to address it there.
@whaeck Also getting this error. Trace:
/opt/njoy21/bin$ make
[ 1%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/locale.f90.o
[ 2%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/mainio.f90.o
[ 4%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/util.f90.o
[ 5%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/endf.f90.o
[ 7%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/mathm.f90.o
[ 8%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/phys.f90.o
[ 10%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/acecm.f90.o
[ 11%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/acedo.f90.o
[ 12%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/acefc.f90.o
/opt/njoy21/bin/_deps/njoy-src/src/acefc.f90:6964:46:
6959 | do ki=1,js
| 2
......
6964 | +renorm*yys(ki)*(xxs(ki)-xxs(ki-1))
| 1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2) [-Wdo-subscript]
/opt/njoy21/bin/_deps/njoy-src/src/acefc.f90:6966:57:
6959 | do ki=1,js
| 2
......
6966 | xss(ki+2*js-1+nexd)+renorm*(yys(ki)+yys(ki-1))&
| 1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2) [-Wdo-subscript]
/opt/njoy21/bin/_deps/njoy-src/src/acefc.f90:6967:31:
6959 | do ki=1,js
| 2
......
6967 | *(xxs(ki)-xxs(ki-1))/2
| 1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2) [-Wdo-subscript]
/opt/njoy21/bin/_deps/njoy-src/src/acefc.f90:15054:23:
15054 | real(kr)::ee(pltumx),s0(pltumx),s1(pltumx),s2(pltumx)
| 1
Warning: Array ‘ee’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/acefc.f90:15054:34:
15054 | real(kr)::ee(pltumx),s0(pltumx),s1(pltumx),s2(pltumx)
| 1
Warning: Array ‘s0’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/acefc.f90:15054:45:
15054 | real(kr)::ee(pltumx),s0(pltumx),s1(pltumx),s2(pltumx)
| 1
Warning: Array ‘s1’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/acefc.f90:15054:56:
15054 | real(kr)::ee(pltumx),s0(pltumx),s1(pltumx),s2(pltumx)
| 1
Warning: Array ‘s2’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/acefc.f90:3343:21:
3343 | real(kr)::a(namax)
| 1
Warning: Array ‘a’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
[ 14%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/acepa.f90.o
[ 15%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/acepn.f90.o
[ 17%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/aceth.f90.o
[ 18%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/acer.f90.o
[ 20%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/broadr.f90.o
/opt/njoy21/bin/_deps/njoy-src/src/broadr.f90:1407:11:
1407 | em.gt.sigfig(es(is-1),ndig,-1)) go to 150
| 1
Warning: Impure function ‘sigfig’ at (1) might not be evaluated [-Wfunction-elimination]
[ 21%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/ccccr.f90.o
/opt/njoy21/bin/_deps/njoy-src/src/ccccr.f90:945:34:
935 | do i=1,ngps
| 2
......
945 | ispec=nint(spec(i-1)*ichid)+ispec-1
| 1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2) [-Wdo-subscript]
[ 22%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/covr.f90.o
[ 24%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/dtfr.f90.o
/opt/njoy21/bin/_deps/njoy-src/src/dtfr.f90:290:23:
289 | do i=1,nwsmax
| 2
290 | if (i.le.n3) ids(i)=0
| 1
Warning: Array reference at (1) out of bounds (500000 > 53) in loop beginning at (2) [-Wdo-subscript]
[ 25%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/groupr.f90.o
/opt/njoy21/bin/_deps/njoy-src/src/groupr.f90:4413:25:
4413 | egn(ig)=eg24(ig)
| ^
Warning: iteration 282 invokes undefined behavior [-Waggressive-loop-optimizations]
/opt/njoy21/bin/_deps/njoy-src/src/groupr.f90:4412:12:
4412 | do ig=1,ngp
| ^
note: within this loop
/opt/njoy21/bin/_deps/njoy-src/src/groupr.f90:4422:25:
4422 | egn(ig)=eg25(ig)
| ^
Warning: iteration 296 invokes undefined behavior [-Waggressive-loop-optimizations]
/opt/njoy21/bin/_deps/njoy-src/src/groupr.f90:4421:12:
4421 | do ig=1,ngp
| ^
note: within this loop
/opt/njoy21/bin/_deps/njoy-src/src/groupr.f90:4431:25:
4431 | egn(ig)=eg26(ig)
| ^
Warning: iteration 362 invokes undefined behavior [-Waggressive-loop-optimizations]
/opt/njoy21/bin/_deps/njoy-src/src/groupr.f90:4430:12:
4430 | do ig=1,ngp
| ^
note: within this loop
/opt/njoy21/bin/_deps/njoy-src/src/groupr.f90:4440:25:
4440 | egn(ig)=eg27(ig)
| ^
Warning: iteration 316 invokes undefined behavior [-Waggressive-loop-optimizations]
/opt/njoy21/bin/_deps/njoy-src/src/groupr.f90:4439:12:
4439 | do ig=1,ngp
| ^
note: within this loop
/opt/njoy21/bin/_deps/njoy-src/src/groupr.f90:4449:25:
4449 | egn(ig)=eg28(ig)
| ^
Warning: iteration 90 invokes undefined behavior [-Waggressive-loop-optimizations]
/opt/njoy21/bin/_deps/njoy-src/src/groupr.f90:4448:12:
4448 | do ig=1,ngp
| ^
note: within this loop
[ 27%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/samm.f90.o
/opt/njoy21/bin/_deps/njoy-src/src/samm.f90:4518:38:
4515 | do n=1,100
| 2
......
4518 | a(n)=-(delta*(xn-1)*(xn-2)*a(n-1)+&
| 1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2) [-Wdo-subscript]
/opt/njoy21/bin/_deps/njoy-src/src/samm.f90:4519:37:
4515 | do n=1,100
| 2
......
4519 | (rhoi-2*eta)*(delta**2)*a(n-2)+(delta**3)*a(n-3))/&
| 1
Warning: Array reference at (1) out of bounds (-1 < 1) in loop beginning at (2) [-Wdo-subscript]
/opt/njoy21/bin/_deps/njoy-src/src/samm.f90:4519:55:
4515 | do n=1,100
| 2
......
4519 | (rhoi-2*eta)*(delta**2)*a(n-2)+(delta**3)*a(n-3))/&
| 1
Warning: Array reference at (1) out of bounds (-2 < 1) in loop beginning at (2) [-Wdo-subscript]
[ 28%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/errorr.f90.o
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:10158:35:
10144 | do il=1,nl
| 2
......
10158 | flux(iz,il)=flux(iz,il-1)/(1+tot(iz)/sigz(iz))
| 1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2) [-Wdo-subscript]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:4726:51:
4726 | real(kr)::sens(4,mxnpar,2501),cov(mxnpar,mxnpar)
| 1
Warning: Array ‘cov’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:4725:40:
4725 | real(kr)::gsigr(4,2501),gsigp(4,2501)
| 1
Warning: Array ‘gsigp’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:4725:26:
4725 | real(kr)::gsigr(4,2501),gsigp(4,2501)
| 1
Warning: Array ‘gsigr’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:4726:32:
4726 | real(kr)::sens(4,mxnpar,2501),cov(mxnpar,mxnpar)
| 1
Warning: Array ‘sens’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:4724:24:
4724 | real(kr)::sig(maxe,5),sig1(4)
| 1
Warning: Array ‘sig’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:4078:20:
4078 | real(kr)::b(maxb)
| 1
Warning: Array ‘b’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:4081:31:
4081 | real(kr)::cov(mxnpar,mxnpar)
| 1
Warning: Array ‘cov’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:4079:51:
4079 | real(kr)::sigr(maxe,5),sigp(maxe,5),gsig(4,2501)
| 1
Warning: Array ‘gsig’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:4082:26:
4082 | real(kr)::pneorg(10000)
| 1
Warning: Array ‘pneorg’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:4080:32:
4080 | real(kr)::sens(4,mxnpar,2501)
| 1
Warning: Array ‘sens’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:4079:38:
4079 | real(kr)::sigr(maxe,5),sigp(maxe,5),gsig(4,2501)
| 1
Warning: Array ‘sigp’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:4079:25:
4079 | real(kr)::sigr(maxe,5),sigp(maxe,5),gsig(4,2501)
| 1
Warning: Array ‘sigr’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:3715:39:
3715 | real(kr)::sig(maxe,5),gsig(4,2501,6),sig1(4)
| 1
Warning: Array ‘gsig’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:3716:27:
3716 | real(kr)::sens(4,6,2501),cov(5,5)
| 1
Warning: Array ‘sens’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:3715:24:
3715 | real(kr)::sig(maxe,5),gsig(4,2501,6),sig1(4)
| 1
Warning: Array ‘sig’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:3247:20:
3247 | real(kr)::b(maxb)
| 1
Warning: Array ‘b’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:3245:26:
3245 | real(kr)::enode(nodmax)
| 1
Warning: Array ‘enode’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/errorr.f90:2518:19:
2518 | real(kr)::b(nnw)
| 1
Warning: Array ‘b’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
[ 30%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/gaminr.f90.o
[ 31%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/gaspr.f90.o
/opt/njoy21/bin/_deps/njoy-src/src/gaspr.f90:45:21:
45 | real(kr)::a(10000)
| 1
Warning: Array ‘a’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
[ 32%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/graph.f90.o
[ 34%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/heatr.f90.o
/opt/njoy21/bin/_deps/njoy-src/src/heatr.f90:798:50:
795 | do i=1,i6t
| 2
......
798 | if (mt6(i).gt.18 .and. i6.ne.i6t) mt6(i-1)=mt6(i)
| 1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2) [-Wdo-subscript]
[ 35%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/leapr.f90.o
/opt/njoy21/bin/_deps/njoy-src/src/leapr.f90:535:32:
533 | do i=1,nbeta
| 2
534 | if (i.gt.1) then
535 | if (maxt(i).gt.maxt(i-1)) maxt(i)=maxt(i-1)
| 1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2) [-Wdo-subscript]
/opt/njoy21/bin/_deps/njoy-src/src/leapr.f90:535:51:
533 | do i=1,nbeta
| 2
534 | if (i.gt.1) then
535 | if (maxt(i).gt.maxt(i-1)) maxt(i)=maxt(i-1)
| 1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2) [-Wdo-subscript]
[ 37%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/matxsr.f90.o
/opt/njoy21/bin/_deps/njoy-src/src/matxsr.f90:2140:20:
2140 | real(kr)::b(maxb)
| 1
Warning: Array ‘b’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/matxsr.f90:2042:20:
2042 | real(kr)::b(maxb)
| 1
Warning: Array ‘b’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
/opt/njoy21/bin/_deps/njoy-src/src/matxsr.f90:1555:20:
1555 | real(kr)::b(maxb)
| 1
Warning: Array ‘b’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
[ 38%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/mixr.f90.o
/opt/njoy21/bin/_deps/njoy-src/src/mixr.f90:78:31:
78 | real(kr),dimension(mxlna)::a
| 1
Warning: Array ‘a’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
[ 40%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/moder.f90.o
[ 41%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/plotr.f90.o
/opt/njoy21/bin/_deps/njoy-src/src/plotr.f90:389:32:
389 | real(kr),dimension(nwamax)::a
| 1
Warning: Array ‘a’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
[ 42%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/powr.f90.o
[ 44%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/purr.f90.o
/opt/njoy21/bin/_deps/njoy-src/src/purr.f90:2293:38:
2281 | do i=1,nbin-1
| 2
......
2293 | if (tval(i,itemp).le.tval(i-1,itemp))&
| 1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2) [-Wdo-subscript]
/opt/njoy21/bin/_deps/njoy-src/src/purr.f90:2294:33:
2281 | do i=1,nbin-1
| 2
......
2294 | tval(i,itemp)=tval(i-1,itemp)+tval(i-1,itemp)/20
| 1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2) [-Wdo-subscript]
/opt/njoy21/bin/_deps/njoy-src/src/purr.f90:2294:49:
2281 | do i=1,nbin-1
| 2
......
2294 | tval(i,itemp)=tval(i-1,itemp)+tval(i-1,itemp)/20
| 1
Warning: Array reference at (1) out of bounds (0 < 1) in loop beginning at (2) [-Wdo-subscript]
[ 45%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/reconr.f90.o
/opt/njoy21/bin/_deps/njoy-src/src/reconr.f90:2345:11:
2345 | xm.lt.sigfig(x(i-1),ndig,-1)) go to 135
| 1
Warning: Impure function ‘sigfig’ at (1) might not be evaluated [-Wfunction-elimination]
/opt/njoy21/bin/_deps/njoy-src/src/reconr.f90:2350:11:
2350 | xm.lt.sigfig(x(i-1),7,-1)) then
| 1
Warning: Impure function ‘sigfig’ at (1) might not be evaluated [-Wfunction-elimination]
[ 47%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/resxsr.f90.o
[ 48%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/thermr.f90.o
/opt/njoy21/bin/_deps/njoy-src/src/thermr.f90:1517:33:
1517 | real(kr)::yy(imax),yu(2*nemax)
| 1
Warning: Array ‘yu’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’, moved from stack to static storage. This makes the procedure unsafe when called recursively, or concurrently from multiple threads. Consider increasing the ‘-fmax-stack-var-size=’ limit (or use ‘-frecursive’, which implies unlimited ‘-fmax-stack-var-size’) - or change the code to use an ALLOCATABLE array. If the variable is never accessed concurrently, this warning can be ignored, and the variable could also be declared with the SAVE attribute. [-Wsurprising]
[ 50%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/unresr.f90.o
[ 51%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/vers.f90.o
[ 52%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/viewr.f90.o
[ 54%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/wimsr.f90.o
[ 55%] Building Fortran object _deps/njoy-build/CMakeFiles/njoy.dir/src/main.f90.o
[ 57%] Linking Fortran shared library libnjoy.so
[ 57%] Built target njoy
[ 58%] Building Fortran object _deps/njoy_c_bindings-build/CMakeFiles/njoy_c_bindings.dir/src/njoy_c_bindings.f90.o
[ 60%] Building Fortran object _deps/njoy_c_bindings-build/CMakeFiles/njoy_c_bindings.dir/src/njoy_c_helpers.f90.o
[ 61%] Linking Fortran static library libnjoy_c_bindings.a
[ 61%] Built target njoy_c_bindings
[ 62%] Building CXX object _deps/utility-build/CMakeFiles/utility.dir/src/utility/stream/src/getBool.cpp.o
[ 64%] Building CXX object _deps/utility-build/CMakeFiles/utility.dir/src/utility/stream/src/getEnergy.cpp.o
[ 65%] Building CXX object _deps/utility-build/CMakeFiles/utility.dir/src/utility/stream/src/getIntInRange.cpp.o
[ 67%] Building CXX object _deps/utility-build/CMakeFiles/utility.dir/src/utility/stream/src/getIntWithLBound.cpp.o
[ 68%] Building CXX object _deps/utility-build/CMakeFiles/utility.dir/src/utility/stream/src/getInteger.cpp.o
[ 70%] Building CXX object _deps/utility-build/CMakeFiles/utility.dir/src/utility/stream/src/getLine.cpp.o
[ 71%] Building CXX object _deps/utility-build/CMakeFiles/utility.dir/src/utility/stream/src/getRealNumber.cpp.o
[ 72%] Building CXX object _deps/utility-build/CMakeFiles/utility.dir/src/utility/stream/src/getRealWithLBound.cpp.o
[ 74%] Building CXX object _deps/utility-build/CMakeFiles/utility.dir/src/utility/stream/src/getStringArg.cpp.o
[ 75%] Building CXX object _deps/utility-build/CMakeFiles/utility.dir/src/utility/stream/src/getTemperature.cpp.o
[ 77%] Building CXX object _deps/utility-build/CMakeFiles/utility.dir/src/utility/stream/src/readString.cpp.o
[ 78%] Building CXX object _deps/utility-build/CMakeFiles/utility.dir/src/utility/string/src/split.cpp.o
[ 80%] Building CXX object _deps/utility-build/CMakeFiles/utility.dir/src/utility/string/src/toDouble.cpp.o
[ 81%] Building CXX object _deps/utility-build/CMakeFiles/utility.dir/src/utility/string/src/trim.cpp.o
[ 82%] Linking CXX static library libutility.a
[ 82%] Built target utility
[ 84%] Building CXX object CMakeFiles/njoy21.dir/src/main.cpp.o
In file included from /opt/njoy21/bin/_deps/hana-adapter-src/src/include/boost/hana.hpp:191,
from /opt/njoy21/bin/_deps/endftk-src/src/ENDFtk/section/6.hpp:8,
from /opt/njoy21/bin/_deps/endftk-src/src/ENDFtk.hpp:19,
from /opt/njoy21/src/njoy21.hpp:14,
from /opt/njoy21/src/main.cpp:1:
/opt/njoy21/bin/_deps/hana-adapter-src/src/include/boost/hana/traits.hpp:71:62: warning: ‘template<class _Tp> struct std::is_literal_type’ is deprecated [-Wdeprecated-declarations]
71 | constexpr auto is_literal_type = detail::hana_trait<std::is_literal_type>{};
| ^~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/variant:37,
from /opt/njoy21/src/njoy21.hpp:4:
/usr/include/c++/12/type_traits:771:5: note: declared here
771 | is_literal_type
| ^~~~~~~~~~~~~~~
[ 85%] Linking CXX executable njoy21
/usr/bin/ld: CMakeFiles/njoy21.dir/src/main.cpp.o: in function `njoy::njoy21::Driver::Factory::Factory(int, char**)':
main.cpp:(.text._ZN4njoy6njoy216Driver7FactoryC2EiPPc[_ZN4njoy6njoy216Driver7FactoryC5EiPPc]+0x5d8): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
[ 85%] Built target njoy21
[ 87%] Building CXX object src/njoy21/CommandLine/test/CMakeFiles/njoy21.CommandLine.test.dir/CommandLine.test.cpp.o
In file included from /usr/include/signal.h:328,
from /opt/njoy21/bin/_deps/catch-adapter-src/src/single_include/catch.hpp:6520,
from /opt/njoy21/src/njoy21/CommandLine/test/CommandLine.test.cpp:2:
/opt/njoy21/bin/_deps/catch-adapter-src/src/single_include/catch.hpp:6543:33: error: size of array ‘altStackMem’ is not an integral constant-expression
6543 | static char altStackMem[SIGSTKSZ];
| ^~~~~~~~
/opt/njoy21/bin/_deps/catch-adapter-src/src/single_include/catch.hpp:6594:45: error: size of array ‘altStackMem’ is not an integral constant-expression
6594 | char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
| ^~~~~~~~
In file included from /opt/njoy21/bin/_deps/hana-adapter-src/src/include/boost/hana.hpp:191,
from /opt/njoy21/bin/_deps/endftk-src/src/ENDFtk/section/6.hpp:8,
from /opt/njoy21/bin/_deps/endftk-src/src/ENDFtk.hpp:19,
from /opt/njoy21/src/njoy21.hpp:14,
from /opt/njoy21/src/njoy21/CommandLine/test/CommandLine.test.cpp:4:
/opt/njoy21/bin/_deps/hana-adapter-src/src/include/boost/hana/traits.hpp:71:62: warning: ‘template<class _Tp> struct std::is_literal_type’ is deprecated [-Wdeprecated-declarations]
71 | constexpr auto is_literal_type = detail::hana_trait<std::is_literal_type>{};
| ^~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/bits/move.h:57,
from /usr/include/c++/12/bits/exception_ptr.h:43,
from /usr/include/c++/12/exception:168,
from /usr/include/c++/12/ios:39,
from /usr/include/c++/12/istream:38,
from /usr/include/c++/12/sstream:38,
from /opt/njoy21/bin/_deps/catch-adapter-src/src/single_include/catch.hpp:384:
/usr/include/c++/12/type_traits:771:5: note: declared here
771 | is_literal_type
| ^~~~~~~~~~~~~~~
make[2]: *** [src/njoy21/CommandLine/test/CMakeFiles/njoy21.CommandLine.test.dir/build.make:76: src/njoy21/CommandLine/test/CMakeFiles/njoy21.CommandLine.test.dir/CommandLine.test.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2376: src/njoy21/CommandLine/test/CMakeFiles/njoy21.CommandLine.test.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
As mentioned above, you can switch off the -Werror flag in the NJOY21 CMakeLists.txt file. This error is actually not an "error", just us being too thorough.
We have looked into replacing the hana adapter with a direct dependency on the boost repository for this library but we have not pushed this change through over the entirety of the NJOY repositories. Updating the hana version removes the deprecation warning we are seeing here. However, on newer Mac systems the new hana version causes other warning that we also need to get rid off as well.
Another solution would be to use NJOY2016 instead (NJOY21 uses NJOY2916 under the hood anyway, and that one actually compiles properly).
@whaeck Should I need to do anything else beyond commenting this line:
set( strict_flags "-Werror" "-Wno-unknown-warning-option" )
because that alone results in the same build error
Following build instructions on Ubuntu 22.04 LTS gives:
This was deprecated in C++17 (ref)
This comes from the hana dependency