[petsc-users] compilation error with latest petsc source

Barry Smith bsmith at petsc.dev
Fri Jul 19 11:42:11 CDT 2024


   We made some superficial changes to the Fortran API to better support Fortran and its error checking. See the bottom of https://urldefense.us/v3/__https://petsc.org/main/changes/dev/__;!!G_uCfscf7eWS!ZE1LvDb2DSdDMK8nW0mqRHwzlc2NYRl5HME44w0td8MbAimMxM27NcCtuq_2ENFLXVCmBo5lMqctZHYCvO4zHj8$ 
 <https://urldefense.us/v3/__https://petsc.org/main/changes/dev/__;!!G_uCfscf7eWS!ZE1LvDb2DSdDMK8nW0mqRHwzlc2NYRl5HME44w0td8MbAimMxM27NcCtuq_2ENFLXVCmBo5lMqctZHYCvO4zHj8$ >
   Basically, you have to respect Fortran's pickiness about passing the correct dimension (or lack of dimension) of arguments. In the error below, you need to pass PETSC_NULL_INTEGER_ARRAY





> On Jul 19, 2024, at 12:20 PM, Vanella, Marcos (Fed) via petsc-users <petsc-users at mcs.anl.gov> wrote:
> 
> This Message Is From an External Sender
> This message came from outside your organization.
> Hi, I did an update and compiled PETSc in Frontier with gnu compilers. When compiling my code with PETSc I see this new error pop up:
> 
> Building mpich_gnu_frontier
> ftn -c -m64 -O2 -g  -std=f2018 -frecursive -ffpe-summary=none -fall-intrinsics -cpp -DGITHASH_PP=\"FDS-6.9.1-894-g0b77ae0-FireX\" -DGITDATE_PP=\""Thu Jul 11 16:05:44 2024 -0400\"" -DBUILDDATE_PP=\""Jul 19, 2024  12:13:39\""   -DWITH_PETSC -I"/autofs/nccs-svm1_home1/vanellam/Software/petsc/include/" -I"/autofs/nccs-svm1_home1/vanellam/Software/petsc/arch-linux-frontier-opt-gcc2/include"  -fopenmp ../../Source/pres.f90
> ../../Source/pres.f90:2799:65:
> 
>  2799 | CALL MATCREATESEQAIJ(PETSC_COMM_SELF,ZM%NUNKH,ZM%NUNKH,NNZ_7PT_H,PETSC_NULL_INTEGER,ZM%PETSC_MZ%A_H,PETSC_IERR)
>       |                                                                 1
> Error: Rank mismatch in argument ‘e’ at (1) (rank-1 and scalar)
> 
> It seems the use of PETSC_NULL_INTEGER is causing an issue now. From the PETSc docs this entry is nnz which can be an array or NULL. Has there been any change on the API for this routine? 
> 
> Thanks,
> Marcos
> 
> PS: I see some other erros in calls to PETSc routines, same type.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240719/3c8902e7/attachment-0001.html>


More information about the petsc-users mailing list