[petsc-users] Using VecScatterCreateToAll Errors

PEREZ CERQUERA MANUEL RICARDO manuel.perezcerquera at polito.it
Tue Oct 25 04:39:05 CDT 2011


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


More information about the petsc-users mailing list