<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I find it strange that in the documentation of MatGetArrayF90 you
write:<br>
<br>
Synopsis<br>
<i>MatGetArrayF90(Mat x,{Scalar, pointer :: xx_v(:)},integer ierr)</i><br>
<br>
Which doesn't compile:<br>
<i>Error 1 Error: The shape matching rules of actual
arguments and dummy arguments have been violated. [xx_v]</i><br>
<br>
What really works is<br>
<i>MatGetArrayF90(Mat x,{Scalar, pointer :: xx_v(:,:)},integer ierr)</i><br>
<br>
On 17.06.2011 12:50, Alexander Grayver wrote:
<blockquote cite="mid:4DFB317B.4050206@gfz-potsdam.de" type="cite">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
Sorry Jed, t was my fault. <br>
I had to include:<br>
#include "finclude/petscvec.h90"<br>
#include "finclude/petscmat.h90"<br>
<br>
I read about that in documentation 3 months ago and forgot to do
that in new module. <br>
<br>
On 17.06.2011 12:23, Jed Brown wrote:
<blockquote
cite="mid:BANLkTim3jY04U_hYAgHXUJKwW3g9vdxCSg@mail.gmail.com"
type="cite">
<div class="gmail_quote">On Fri, Jun 17, 2011 at 12:05,
Alexander Grayver <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:agrayver@gfz-potsdam.de">agrayver@gfz-potsdam.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">What is ABI?</div>
</blockquote>
<div><br>
</div>
<div><br>
</div>
<div>Application Binary Interface, basically the
assembly-level calling semantics. If the tests run
successfully, then this is not the problem.</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"> Both examples work
without crashing. Pretty weird...<br>
</div>
</blockquote>
<div><br>
</div>
<div>One more to try: mat/examples/tests/ex16f90.F</div>
<div> </div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"> I can tell more. I
found place in my code, just different fortran module,
where VecGetArrayF90 works both on seq and mpi vectors.</div>
</blockquote>
<div><br>
</div>
<div>This call works from one Fortran module, but not from
another? I suspect stack corruption, perhaps from something
as simple as the wrong number of arguments to an earlier
call. (Fortran having nearly worthless type checking.)</div>
<div> </div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
<div class="im">What API do you mean exactly?</div>
</div>
</blockquote>
</div>
<br>
<div>The non-F90 VecGetArray() and MatGetArray(). But if
MatGetArrayF90() is working when called in a different
context, then this shouldn't be necessary.</div>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>