[petsc-users] Using VecScatterCreateToAll Errors

Jed Brown jedbrown at mcs.anl.gov
Tue Oct 25 06:58:33 CDT 2011


Don't declare as pointers. What is the complete error message? Is I really a
Vec?
On Oct 25, 2011 4:39 AM, "PEREZ CERQUERA MANUEL RICARDO" <
manuel.perezcerquera at polito.it> wrote:

> Hi all,
>
> I'm Trying to use VecScatterCreateToAll in FORTRAN so I'm doing:
>
>        VecScatter ctx
>        Vec AllCurrentValues
>
>        CALL VecScatterCreateToAll(I,ctx,**AllCurrentValues,ierr)
>        CALL VecScatterBegin(ctx,I,**AllCurrentValues,INSERT_**
> VALUES,SCATTER_FORWARD,ierr)
>        CALL VecScatterEnd(ctx,I,**AllCurrentValues,INSERT_**
> VALUES,SCATTER_FORWARD,ierr)
>
> I is al MPIVector previously created, initialized and assembled, However
> when I call  VecScatterCreateToAll I got thid error message:
>
> [0]PETSC ERROR: Invalid argument!
> [0]PETSC ERROR: Wrong type of object: Parameter # 1!
> [0]PETSC ERROR: ------------------------------**
> ------------------------------**----
> --------
> [0]PETSC ERROR: Petsc Release Version 3.2.0, Patch 2, Fri Sep 16 10:10:45
> CDT 20
> 11
> [0]PETSC ERROR: See docs/changes/index.html for recent updates.
> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
> [0]PETSC ERROR: See docs/index.html for manual pages.
> [0]PETSC ERROR: ------------------------------**
> ------------------------------**----
>
> Then I tried to Declare ctx and Vec as pointers ,in this way:
>
>        VecScatter,pointer :: ctx
>        Vec,pointer :: AllCurrentValues
>
> But It didn't work, I obtained this other error message:
> [0]PETSC ERROR: Null argument, when expecting valid pointer!
> [0]PETSC ERROR: Null Object: Parameter # 1!
> [0]PETSC ERROR: ------------------------------**
> ------------------------------**----
> --------
> [0]PETSC ERROR: Petsc Release Version 3.2.0, Patch 2, Fri Sep 16 10:10:45
> CDT 20
> 11
> [0]PETSC ERROR: See docs/changes/index.html for recent updates.
> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
> [0]PETSC ERROR: See docs/index.html for manual pages.
> [0]PETSC ERROR: ------------------------------**
> ------------------------------**----
>
> I really appreciate some help, because there is not FORTRAN examples with
> this directive, and I'm afraid I'm missing some change in the CALL respect
> to C calling. Thank you!
>
> Manuel.
>
> Eng. Manuel Ricardo Perez Cerquera. MSc. Ph.D student
> Antenna and EMC Lab (LACE)
> Istituto Superiore Mario Boella (ISMB)
> Politecnico di Torino
> Via Pier Carlo Boggio 61, Torino 10138, Italy
> Email: manuel.perezcerquera at polito.it
> Phone: +39 0112276704
> Fax: +39 011 2276 299
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111025/97bfa208/attachment.htm>


More information about the petsc-users mailing list