NOAA-EMC / NCEPLIBS-grib_util

This is a collection of NCEP GRIB related utilities.
Other
19 stars 11 forks source link

code warnings for copygb #131

Closed edwardhartnett closed 6 months ago

edwardhartnett commented 2 years ago
cd /home/ed/NCEPLIBS-grib_util/b/src/copygb && /usr/bin/gfortran  -I/usr/local/NCEPLIBS-bacio-2.5.0/include -I/usr/local/NCEPLIBS-w3emc-2.9.2/include_d -I/usr/local/NCEPLIBS-ip-3.3.3/include_d -I/usr/local/NCEPLIBS-sp-2.3.3/include_d -g -fdefault-real-8 -g -O0 -Wall -O3 -g -fdefault-real-8 -g -O0 -Wall -c /home/ed/NCEPLIBS-grib_util/src/copygb/copygb.F90 -o CMakeFiles/copygb.dir/copygb.F90.o
/home/ed/NCEPLIBS-grib_util/src/copygb/copygb.F90:584:23:

  584 |   CHARACTER CBUF1(MBUF),CBUFB(MBUF),CBUFM(MBUF)
      |                       1
Warning: Array ‘cbuf1’ 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]
/home/ed/NCEPLIBS-grib_util/src/copygb/copygb.F90:584:35:

  584 |   CHARACTER CBUF1(MBUF),CBUFB(MBUF),CBUFM(MBUF)
      |                                   1
Warning: Array ‘cbufb’ 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]
/home/ed/NCEPLIBS-grib_util/src/copygb/copygb.F90:584:47:

  584 |   CHARACTER CBUF1(MBUF),CBUFB(MBUF),CBUFM(MBUF)
      |                                               1
Warning: Array ‘cbufm’ 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]
/home/ed/NCEPLIBS-grib_util/src/copygb/copygb.F90:169:16:

  169 |   REAL RARG(100)
      |                1
Warning: Unused variable ‘rarg’ declared at (1) [-Wunused-variable]
edwardhartnett commented 6 months ago

At least for now, we are not going to work on GRIB1 any longer unless absolutely necessary.