gnu compiler on KNL thinks gmi has issues
[ 13%] Building C object gmi/CMakeFiles/gmi.dir/gmi_mesh.c.o /home/kjansen/SCOREC-core/core/gmi/gmi_analytic.c: In function 'reparam': /home/kjansen/SCOREC-core/core/gmi/gmi_analytic.c:127:3: error: array subscript 7 is above array bounds of 'struct agm_use[4]' [-Werror=array-bounds] reparam_path(m, path + 1, pathlen - 1, tmp, to_p);
I got it to compile by commenting out the line which will probably be ok for the cases I am running right now but obviously this is not the real solution to the problem
@KennethEJansen I was able to compile this with gcc without any problems. Can you tell me your gcc version?
@KennethEJansen is using
$ gcc --version
gcc (GCC) 8.3.0 20190222 (Cray Inc.)
and the core branch addNFath
https://github.com/cwsmith/core/blob/7afeab7305e6ce47b50c8bab37db8e517dd5be13/gmi/gmi_analytic.c
I get the same error.
The error can be reproduced with the following Dockerfile:
FROM debian:stable-slim
RUN apt-get update \
&& apt-get install -y wget bzip2 gcc g++ gfortran cmake libopenmpi-dev git
RUN cd /tmp \
&& git clone https://github.com/SCOREC/core.git
RUN cd /tmp \
&& cd core \
&& mkdir build && cd build \
&& cmake .. -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_BUILD_TYPE=Release \
&& make -j4 && make install
WORKDIR /home
@uphoffc Thank you. I was able to reproduce the error. For the record, docker used GCC 8.3.0.