[petsc-users] Bug Report : Continue line fails when wrapped wtih PetscCall(A)
Zhao-Yi Yan
13971216897 at 163.com
Fri Mar 28 02:03:48 CDT 2025
Dear Developers,
I am a Fortran programmer, and find the continue line symbol "&" in fortran fails to work when I call the routine with PetscCallA, for example
The code like this
" PetscCallA DMDACreate3D(PETSC_COMM_WORLD,&
DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,&
DMDA_STENCIL_STAR,three,three,three,&
PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE,&
one,& ! number of degrees of freedom per node
one,& ! stencil width
PETSC_NULL_INTEGER_ARRAY,PETSC_NULL_INTEGER_ARRAY,PETSC_NULL_INTEGER_ARRAY,&
dm, & ! Output -- the resulting distributed array object
ierr)
"
could NOT pass the compiler, which would report error that
call DMDACreate3D(PETSC_COMM_WORLD, & DM_BOUNDARY_NONE,DM_BOUNDARY_NON
1
Error: Syntax error in argument list at (1)
A simple work-around method is to replace PetscCallA with a regular call, which means maybe there are something wrong within PetscCallA.
Related information:
Petsc Release Version 3.22.4
Linux mgt1 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Best regards,
| |
Zhao-Yi Yan
|
|
13971216897 at 163.com
|
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250328/a610b0cc/attachment.html>
More information about the petsc-users
mailing list