[petsc-users] Fortran interface -- low level access to petsc data

Hossein Talebi talebi.hossein at gmail.com
Mon Oct 28 08:28:04 CDT 2013


Exactly, I personally look for:

1) type checking during the function calls. This helps also not looking
into the manual for every single petsc function call.

2) low level access to petsc data structure. For example in my own code I
already have my own hadnling of parallel vectors and matrices. When I use
petsc, I have to always copy in/out all the data which is not optimal. So,
it would be great if I can share or be change the petsc data in my Fortran
code i.e. not through the petsc function calls. I understand this might be
dangerous or not duable etc. But, I see no other solution.

3) easy definitions of petsc namespace through the Fortran modules, so I
can choose what to import (using the Fortran 'only' statement).

There is no general automatic interface generation for Fortran, as much as
I'm aware of. The gtk-fortran project, they wrote a python script to
generate this interface automatically and it really works nicely. I could
not imagine writiing such nice GTK GUI with Fortran.




On Mon, Oct 28, 2013 at 2:15 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> Hossein Talebi <talebi.hossein at gmail.com> writes:
> > What was in my mind is to create an interface additional to what is
> already
> > there in petsc. So this should be compiled along with anyone's code if
> the
> > used ocmpiler supports F03 or the necessary features of F03.
>
> I don't think anyone will want to manually maintain the interface
> definitions for all of PETSc.  (F2003 users can call the C interface
> using the C types support now, but of course you'd rather have Fortran
> interfaces so that you can have type checking.)  It seems to me that the
> big win of F2003 is that it should be possible to automatically generate
> almost all these definitions.  But how would you manage callbacks?
>



-- 
Dr.-Ing. Hossein Talebi

Bauhaus-Universität Weimar
Graudate Research School 1462 "Evaluation of Coupled Numerical and
Experimental Partial Models in Structural Engineering "
Postdoctoral Researcher

Berkaer Str. 9
99425 Weimar
Tel.: +49/3643/58 41 03
Fax:  +49/3643/58 41 01
E-Mail: hossein.talebi at uni-weimar.de <maximilian.huber at uni-weimar.de>
www.uni-weimar.de/grk1462
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131028/b8c32b3e/attachment-0001.html>


More information about the petsc-users mailing list