[petsc-users] DMCreateGlobalVector in Fortran with petsc 3.8

Chi huijun qhjun at live.com
Mon Nov 6 08:25:31 CST 2017


Hi. I have one questions.

I use DMCreateGlobalVector to creat a global vec by this
...
DM::datotv
Vec:ptotveq
...
call DMDACreate1d(MPI_COMM_WORLD,DM_BOUNDARY_NONE,globalnode*cdofn,1,1,PETSC_NULL_INTEGER,datotv,ierr)
call DMCreateGlobalVector(datotv,ptotveq,ierr)

it gives the wrong code

[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Null argument, when expecting valid pointer
[0]PETSC ERROR: Null Object: Parameter # 2
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.8.1, unknown
[0]PETSC ERROR: /mnt/NFSwork/GeHoMadrid_Petsc/EXEC/GeHoMadrid on a arch-linux2-c-debug named linux-2euo by hstarlinux Mon Nov  6 22:21:50 2017
[0]PETSC ERROR: Configure options --download-fblaslapack --download-metis --download-mpich --download-mumps --download-parmetis --download-scalapack PETSC_ARCH=arch-linux2-c-debug
[0]PETSC ERROR: #1 VecSetLocalToGlobalMapping() line 78 in /home/hstarlinux/work/petsc/src/vec/vec/interface/vector.c
[0]PETSC ERROR: #2 DMCreateGlobalVector_DA() line 41 in /home/hstarlinux/work/petsc/src/dm/impls/da/dadist.c
[0]PETSC ERROR: #3 DMCreateGlobalVector() line 844 in /home/hstarlinux/work/petsc/src/dm/interface/dm.c

The code run well with PETSc 3.6

I haven't find the Fortran example code of DMCreateGlobalVector. So how to use it correctly in fortran?

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171106/a55a2591/attachment.html>


More information about the petsc-users mailing list