<p>Don't declare as pointers. What is the complete error message? Is I really a Vec?</p>
<div class="gmail_quote">On Oct 25, 2011 4:39 AM, "PEREZ CERQUERA MANUEL RICARDO" <<a href="mailto:manuel.perezcerquera@polito.it">manuel.perezcerquera@polito.it</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
I'm Trying to use VecScatterCreateToAll in FORTRAN so I'm doing:<br>
<br>
VecScatter ctx<br>
Vec AllCurrentValues<br>
<br>
CALL VecScatterCreateToAll(I,ctx,<u></u>AllCurrentValues,ierr)<br>
CALL VecScatterBegin(ctx,I,<u></u>AllCurrentValues,INSERT_<u></u>VALUES,SCATTER_FORWARD,ierr)<br>
CALL VecScatterEnd(ctx,I,<u></u>AllCurrentValues,INSERT_<u></u>VALUES,SCATTER_FORWARD,ierr)<br>
<br>
I is al MPIVector previously created, initialized and assembled, However when I call VecScatterCreateToAll I got thid error message:<br>
<br>
[0]PETSC ERROR: Invalid argument!<br>
[0]PETSC ERROR: Wrong type of object: Parameter # 1!<br>
[0]PETSC ERROR: ------------------------------<u></u>------------------------------<u></u>----<br>
--------<br>
[0]PETSC ERROR: Petsc Release Version 3.2.0, Patch 2, Fri Sep 16 10:10:45 CDT 20<br>
11<br>
[0]PETSC ERROR: See docs/changes/index.html for recent updates.<br>
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>
[0]PETSC ERROR: See docs/index.html for manual pages.<br>
[0]PETSC ERROR: ------------------------------<u></u>------------------------------<u></u>----<br>
<br>
Then I tried to Declare ctx and Vec as pointers ,in this way:<br>
<br>
VecScatter,pointer :: ctx<br>
Vec,pointer :: AllCurrentValues<br>
<br>
But It didn't work, I obtained this other error message:<br>
[0]PETSC ERROR: Null argument, when expecting valid pointer!<br>
[0]PETSC ERROR: Null Object: Parameter # 1!<br>
[0]PETSC ERROR: ------------------------------<u></u>------------------------------<u></u>----<br>
--------<br>
[0]PETSC ERROR: Petsc Release Version 3.2.0, Patch 2, Fri Sep 16 10:10:45 CDT 20<br>
11<br>
[0]PETSC ERROR: See docs/changes/index.html for recent updates.<br>
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>
[0]PETSC ERROR: See docs/index.html for manual pages.<br>
[0]PETSC ERROR: ------------------------------<u></u>------------------------------<u></u>----<br>
<br>
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!<br>
<br>
Manuel.<br>
<br>
Eng. Manuel Ricardo Perez Cerquera. MSc. Ph.D student<br>
Antenna and EMC Lab (LACE)<br>
Istituto Superiore Mario Boella (ISMB)<br>
Politecnico di Torino<br>
Via Pier Carlo Boggio 61, Torino 10138, Italy<br>
Email: <a href="mailto:manuel.perezcerquera@polito.it" target="_blank">manuel.perezcerquera@polito.it</a><br>
Phone: <a href="tel:%2B39%200112276704" value="+390112276704" target="_blank">+39 0112276704</a><br>
Fax: <a href="tel:%2B39%20011%202276%20299" value="+390112276299" target="_blank">+39 011 2276 299</a><br>
</blockquote></div>