guez
1
Hello. I am using:
$ nvfortran --version
nvfortran 21.9-0 64-bit target on x86-64 Linux -tp zen
NVIDIA Compilers and Tools
Here is my test code:
$ cat shapelib.f90
MODULE shapelib
USE, INTRINSIC:: ISO_C_BINDING
IMPLICIT NONE
TYPE shpobject
TYPE(c_ptr):: shpobject_orig = c_null_ptr
INTEGER, POINTER:: panpartstart(:) => NULL()
END TYPE shpobject
TYPE(shpobject):: shpobject_null = shpobject(c_null_ptr, NULL())
END MODULE shapelib
Compilation gives an error:
$ nvfortran -c shapelib.f90
NVFORTRAN-S-0066-Too few data constants in initialization statement (shapelib.f90: 8)
0 inform, 0 warnings, 1 severes, 0 fatal for shapelib
I think the code is correct and this is a bug of the compiler. Would you corrrect this?
Sincerely.
Hi guez,
This was a known issue that was fixed in our 22.5 release. Please update your compiler to our latest release which you can download at: NVIDIA HPC SDK Current Release Downloads | NVIDIA Developer
-Mat
% nvfortran shapelib.F90 -c -V21.9
NVFORTRAN-S-0066-Too few data constants in initialization statement (shapelib.F90: 8)
0 inform, 0 warnings, 1 severes, 0 fatal for shapelib
% nvfortran shapelib.F90 -c -V22.5
%
guez
3
Hello. Thank you. I have tried with a more recent version of your compiler and the compilation error on the test program above disappears, indeed.
However, I have the same compiler bug on a slightly more complicated version of the test (slightly closer to our real code):
$ nvfortran --version
nvfortran 23.1-0 64-bit target on x86-64 Linux -tp skylake-avx512
$ cat shapelib_2.f90
MODULE shapelib_2
USE,INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
TYPE shpobject
TYPE(c_ptr) :: shpobject_orig=c_null_ptr
INTEGER,POINTER :: panpartstart(:)=>NULL()
INTEGER,POINTER :: panparttype(:)=>NULL()
INTEGER :: nvertices
END TYPE shpobject
TYPE(shpobject),PARAMETER :: shpobject_null = shpobject(c_null_ptr, &
NULL(), NULL(), 0)
END MODULE shapelib_2
$ nvfortran -c shapelib_2.f90
NVFORTRAN-S-0066-Too few data constants in initialization statement (shapelib_2.f90: 10)
0 inform, 0 warnings, 1 severes, 0 fatal for shapelib_2
So it seems the fix in version 22.5 was incomplete.
So it seems the fix in version 22.5 was incomplete.
Indeed. I was able to reproduce the error and have filed an issue report, TPR#34022. We’ll have engineering investigate.
Thanks!
Mat