- Posts: 19
- Thank you received: 0
If you run into troubles, it is always a good habit to report the following information:
as well as the value of the relevant environmental variables, such OMP_NUM_THREADS, etc.
This information helps us a lot when figuring out what is going on with your compilation
- the way build.mrcc was invoked
- the output of build.mrcc
- compiler version (for example: ifort -V, gfortran -v)
- blas/lapack versions
- as well as gcc and glibc versions
as well as the value of the relevant environmental variables, such OMP_NUM_THREADS, etc.
This information helps us a lot when figuring out what is going on with your compilation
Probable illegal memory access in semint_shc.f
- TiborGY
- Topic Author
- Offline
- New Member
Less
More
3 years 10 months ago - 3 years 10 months ago #1045
by TiborGY
Probable illegal memory access in semint_shc.f was created by TiborGY
Dear developers,
One of the warnings emmitted by the newest Intel compiler has lead me to believe that there are a number of lines in semint_shc.f, where the program is performing an illegal memory access (reading past the end of the array).
For example at line 200 of semint_shc.f:
where coef seems to be the 2 element array defined in line 163:
Since coef is defined with indexes 0 to 1, reading at index 2 is illegal, and results in undefined behaviour.
There are a number of other locations where similar illegal memory access is performed, mostly in semint_shc.f, nucint_shc.f, onein1_shc.f, nuceq1_shc.f and nucat1_shc.f, all of them seem to be related to a "coef" array.
Here is the relevant part of the build log, for semint_shc.f:
One of the warnings emmitted by the newest Intel compiler has lead me to believe that there are a number of lines in semint_shc.f, where the program is performing an illegal memory access (reading past the end of the array).
For example at line 200 of semint_shc.f:
Code:
ss(3)=coef(2)*tt
Code:
real*8 coord(3,*),coef(0:1),ptol,atchg(ncent),arg
There are a number of other locations where similar illegal memory access is performed, mostly in semint_shc.f, nucint_shc.f, onein1_shc.f, nuceq1_shc.f and nucat1_shc.f, all of them seem to be related to a "coef" array.
Here is the relevant part of the build log, for semint_shc.f:
Warning: Spoiler!
Code:
semint_shc.f(200): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(324): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(425): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(427): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(586): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(588): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(590): error #5560: Subscript #1 of the array COEF has value 4 which is greater than the upper bound of 1
ss(5)=coef(4)*tt
------------------^
semint_shc.f(845): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(847): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(972): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(974): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(976): error #5560: Subscript #1 of the array COEF has value 4 which is greater than the upper bound of 1
ss(5)=coef(4)*tt
------------------^
semint_shc.f(1186): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(1188): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(1190): error #5560: Subscript #1 of the array COEF has value 4 which is greater than the upper bound of 1
ss(5)=coef(4)*tt
------------------^
semint_shc.f(1192): error #5560: Subscript #1 of the array COEF has value 5 which is greater than the upper bound of 1
ss(6)=coef(5)*tt
------------------^
semint_shc.f(1561): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(1563): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(1565): error #5560: Subscript #1 of the array COEF has value 4 which is greater than the upper bound of 1
ss(5)=coef(4)*tt
------------------^
semint_shc.f(1567): error #5560: Subscript #1 of the array COEF has value 5 which is greater than the upper bound of 1
ss(6)=coef(5)*tt
------------------^
semint_shc.f(1569): error #5560: Subscript #1 of the array COEF has value 6 which is greater than the upper bound of 1
ss(7)=coef(6)*tt
------------------^
semint_shc.f(2242): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(2244): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(2246): error #5560: Subscript #1 of the array COEF has value 4 which is greater than the upper bound of 1
ss(5)=coef(4)*tt
------------------^
semint_shc.f(2410): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(2412): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(2414): error #5560: Subscript #1 of the array COEF has value 4 which is greater than the upper bound of 1
ss(5)=coef(4)*tt
------------------^
semint_shc.f(2416): error #5560: Subscript #1 of the array COEF has value 5 which is greater than the upper bound of 1
ss(6)=coef(5)*tt
------------------^
semint_shc.f(2701): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(2703): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(2705): error #5560: Subscript #1 of the array COEF has value 4 which is greater than the upper bound of 1
ss(5)=coef(4)*tt
------------------^
semint_shc.f(2707): error #5560: Subscript #1 of the array COEF has value 5 which is greater than the upper bound of 1
ss(6)=coef(5)*tt
------------------^
semint_shc.f(2709): error #5560: Subscript #1 of the array COEF has value 6 which is greater than the upper bound of 1
ss(7)=coef(6)*tt
------------------^
semint_shc.f(3228): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(3230): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(3232): error #5560: Subscript #1 of the array COEF has value 4 which is greater than the upper bound of 1
ss(5)=coef(4)*tt
------------------^
semint_shc.f(3234): error #5560: Subscript #1 of the array COEF has value 5 which is greater than the upper bound of 1
ss(6)=coef(5)*tt
------------------^
semint_shc.f(3236): error #5560: Subscript #1 of the array COEF has value 6 which is greater than the upper bound of 1
ss(7)=coef(6)*tt
------------------^
semint_shc.f(3238): error #5560: Subscript #1 of the array COEF has value 7 which is greater than the upper bound of 1
ss(8)=coef(7)*tt
------------------^
semint_shc.f(4205): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(4207): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(4209): error #5560: Subscript #1 of the array COEF has value 4 which is greater than the upper bound of 1
ss(5)=coef(4)*tt
------------------^
semint_shc.f(4211): error #5560: Subscript #1 of the array COEF has value 5 which is greater than the upper bound of 1
ss(6)=coef(5)*tt
------------------^
semint_shc.f(4213): error #5560: Subscript #1 of the array COEF has value 6 which is greater than the upper bound of 1
ss(7)=coef(6)*tt
------------------^
semint_shc.f(4215): error #5560: Subscript #1 of the array COEF has value 7 which is greater than the upper bound of 1
ss(8)=coef(7)*tt
------------------^
semint_shc.f(4217): error #5560: Subscript #1 of the array COEF has value 8 which is greater than the upper bound of 1
ss(9)=coef(8)*tt
------------------^
semint_shc.f(5945): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(5947): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(5949): error #5560: Subscript #1 of the array COEF has value 4 which is greater than the upper bound of 1
ss(5)=coef(4)*tt
------------------^
semint_shc.f(5951): error #5560: Subscript #1 of the array COEF has value 5 which is greater than the upper bound of 1
ss(6)=coef(5)*tt
------------------^
semint_shc.f(6175): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(6177): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(6179): error #5560: Subscript #1 of the array COEF has value 4 which is greater than the upper bound of 1
ss(5)=coef(4)*tt
------------------^
semint_shc.f(6181): error #5560: Subscript #1 of the array COEF has value 5 which is greater than the upper bound of 1
ss(6)=coef(5)*tt
------------------^
semint_shc.f(6183): error #5560: Subscript #1 of the array COEF has value 6 which is greater than the upper bound of 1
ss(7)=coef(6)*tt
------------------^
semint_shc.f(6574): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(6576): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(6578): error #5560: Subscript #1 of the array COEF has value 4 which is greater than the upper bound of 1
ss(5)=coef(4)*tt
------------------^
semint_shc.f(6580): error #5560: Subscript #1 of the array COEF has value 5 which is greater than the upper bound of 1
ss(6)=coef(5)*tt
------------------^
semint_shc.f(6582): error #5560: Subscript #1 of the array COEF has value 6 which is greater than the upper bound of 1
ss(7)=coef(6)*tt
------------------^
semint_shc.f(6584): error #5560: Subscript #1 of the array COEF has value 7 which is greater than the upper bound of 1
ss(8)=coef(7)*tt
------------------^
semint_shc.f(7301): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(7303): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(7305): error #5560: Subscript #1 of the array COEF has value 4 which is greater than the upper bound of 1
ss(5)=coef(4)*tt
------------------^
semint_shc.f(7307): error #5560: Subscript #1 of the array COEF has value 5 which is greater than the upper bound of 1
ss(6)=coef(5)*tt
------------------^
semint_shc.f(7309): error #5560: Subscript #1 of the array COEF has value 6 which is greater than the upper bound of 1
ss(7)=coef(6)*tt
------------------^
semint_shc.f(7311): error #5560: Subscript #1 of the array COEF has value 7 which is greater than the upper bound of 1
ss(8)=coef(7)*tt
------------------^
semint_shc.f(7313): error #5560: Subscript #1 of the array COEF has value 8 which is greater than the upper bound of 1
ss(9)=coef(8)*tt
------------------^
semint_shc.f(8644): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(8646): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(8648): error #5560: Subscript #1 of the array COEF has value 4 which is greater than the upper bound of 1
ss(5)=coef(4)*tt
------------------^
semint_shc.f(8650): error #5560: Subscript #1 of the array COEF has value 5 which is greater than the upper bound of 1
ss(6)=coef(5)*tt
------------------^
semint_shc.f(8652): error #5560: Subscript #1 of the array COEF has value 6 which is greater than the upper bound of 1
ss(7)=coef(6)*tt
------------------^
semint_shc.f(8654): error #5560: Subscript #1 of the array COEF has value 7 which is greater than the upper bound of 1
ss(8)=coef(7)*tt
------------------^
semint_shc.f(8656): error #5560: Subscript #1 of the array COEF has value 8 which is greater than the upper bound of 1
ss(9)=coef(8)*tt
------------------^
semint_shc.f(8658): error #5560: Subscript #1 of the array COEF has value 9 which is greater than the upper bound of 1
ss(10)=coef(9)*tt
-------------------^
semint_shc.f(11033): error #5560: Subscript #1 of the array COEF has value 2 which is greater than the upper bound of 1
ss(3)=coef(2)*tt
------------------^
semint_shc.f(11035): error #5560: Subscript #1 of the array COEF has value 3 which is greater than the upper bound of 1
ss(4)=coef(3)*tt
------------------^
semint_shc.f(11037): error #5560: Subscript #1 of the array COEF has value 4 which is greater than the upper bound of 1
ss(5)=coef(4)*tt
------------------^
semint_shc.f(11039): error #5560: Subscript #1 of the array COEF has value 5 which is greater than the upper bound of 1
ss(6)=coef(5)*tt
------------------^
semint_shc.f(11041): error #5560: Subscript #1 of the array COEF has value 6 which is greater than the upper bound of 1
ss(7)=coef(6)*tt
------------------^
semint_shc.f(11043): error #5560: Subscript #1 of the array COEF has value 7 which is greater than the upper bound of 1
ss(8)=coef(7)*tt
------------------^
semint_shc.f(11045): error #5560: Subscript #1 of the array COEF has value 8 which is greater than the upper bound of 1
ss(9)=coef(8)*tt
------------------^
semint_shc.f(11047): error #5560: Subscript #1 of the array COEF has value 9 which is greater than the upper bound of 1
ss(10)=coef(9)*tt
-------------------^
semint_shc.f(11049): error #5560: Subscript #1 of the array COEF has value 10 which is greater than the upper bound of 1
ss(11)=coef(10)*tt
-------------------^
Last edit: 3 years 10 months ago by TiborGY.
Please Log in or Create an account to join the conversation.
Time to create page: 0.045 seconds