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

2013-10-28 Thread Hossein Talebi
Well, when dealing with Fortran I also often encounter software which cannot be changed or upgraded to a more modern style. 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

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

2013-10-28 Thread Jed Brown
Hossein Talebi talebi.hoss...@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

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

2013-10-28 Thread Hossein Talebi
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.

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

2013-10-28 Thread Jed Brown
Hossein Talebi talebi.hoss...@gmail.com writes: 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

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

2013-10-28 Thread Hossein Talebi
1. You really need to profile. Copying a vector is cheap. You are right. Maybe I make a big thing for this copy in/out and it is not that problematic or slow even for the whole 2D matrix. I have to test it with a large one to see. 2. If you make your functions (to evaluate residuals, etc)

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

2013-10-27 Thread Hossein Talebi
Hello All, I am trying to use petsc with Fortran. The initial mechanism to use petsc with FORTRAN77 that works fine. However, I found the Fortran 90 interfaces difficult to work with. The very first issue is one has to recompile petsc with the Fortran compiler in case different to the one which

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

2013-10-27 Thread Matthew Knepley
On Sun, Oct 27, 2013 at 6:16 AM, Hossein Talebi talebi.hoss...@gmail.comwrote: Hello All, I am trying to use petsc with Fortran. The initial mechanism to use petsc with FORTRAN77 that works fine. However, I found the Fortran 90 interfaces difficult to work with. The very first issue is one

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

2013-10-27 Thread Satish Balay
On Sun, 27 Oct 2013, Matthew Knepley wrote: On Sun, Oct 27, 2013 at 6:16 AM, Hossein Talebi talebi.hoss...@gmail.comwrote: Hello All, I am trying to use petsc with Fortran. The initial mechanism to use petsc with FORTRAN77 that works fine. However, I found the Fortran 90 interfaces

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

2013-10-27 Thread Hossein Talebi
Thank you for your answer. It is not true that F2003 support is that limited: Gfortran, Intel Fortran, Cray Fortran, IBM Fortran and PGI Fortran all support nearly full F2003. Some other ones support the C portability of F2003 although not supporting the rest. * I can contribute on creating this