fortran 90 program with PETSc

Satish Balay balay at mcs.anl.gov
Wed Jun 24 16:59:43 CDT 2009


On Wed, 24 Jun 2009, tsjb00 wrote:

> 
> Hi!

>  I am trying to parallelize a fortran 90 program with PETSc. The
> original program uses a lot of global variables defined using
> fortran 90 modules.

>  My question is: Can I use 'include PETSc include file' and 'use
> MyModule' in the program at the same time?

yes.

> If so, in what sequence should I put 'include XXX', 'use XXX' and
> 'implicit' statements?

The following should work.

use foo
#include "finclude/petsc.h"
implicit none


> Another general question is whether I can use fortran 90 features
> such as 'module' and dynamic allocation on a parallel system of
> MPI-1 standard? Any reference on such programming work will be also
> appreciated.

I don't see why not. f90 issues you mentioned are unrelated to MPI

Satish

> Many thanks in advance!
> 
> 
> _________________________________________________________________
> 约会说不清地方?来试试微软地图最新msn互动功能!
> http://ditu.live.com/?form=TL&swm=1


More information about the petsc-users mailing list