<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
compiling passed if:<br>&nbsp;&nbsp;&nbsp;&nbsp; use parm<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; implicit real*8 (a-h,o-z)<br>#include "finclude/petsc.h"<br><br>Is this ok? Many thanks!<br><hr id="stopSpelling">From: tsjb00@hotmail.com<br>To: petsc-users@mcs.anl.gov<br>Subject: RE: fortran 90 program with PETSc<br>Date: Wed, 24 Jun 2009 22:59:06 +0000<br><br>



<style>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</style>


Many thanks for your help! I've tried the method in your email .<br>In the main program called driver.F, it is coded:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; program main<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use parm<br>#include "finclude/petsc.h"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; implicit real*8 (a-h,o-z)<br>.................................<br>I got the following error information :<br><br>&nbsp;In file driver.F:280<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; implicit none&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1<br>&nbsp;In file /home/jinbei/Soft/petsc-3.0.0-p5/include/finclude/petsc.h:209<br><br>&nbsp;&nbsp;&nbsp;&nbsp; Included at driver.F:279<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2<br>Error: IMPLICIT NONE statement at (1) cannot follow data declaration statement at (2)<br><br>Would you please tell me what might be wrong?<br><br>Many thanks in advance!<br><br><br><br>&gt; Date: Wed, 24 Jun 2009 16:59:43 -0500<br>&gt; From: balay@mcs.anl.gov<br>&gt; To: petsc-users@mcs.anl.gov<br>&gt; Subject: Re: fortran 90 program with PETSc<br>&gt; <br>&gt; On Wed, 24 Jun 2009, tsjb00 wrote:<br>&gt; <br>&gt; &gt; <br>&gt; &gt; Hi!<br>&gt; <br>&gt; &gt;  I am trying to parallelize a fortran 90 program with PETSc. The<br>&gt; &gt; original program uses a lot of global variables defined using<br>&gt; &gt; fortran 90 modules.<br>&gt; <br>&gt; &gt;  My question is: Can I use 'include PETSc include file' and 'use<br>&gt; &gt; MyModule' in the program at the same time?<br>&gt; <br>&gt; yes.<br>&gt; <br>&gt; &gt; If so, in what sequence should I put 'include XXX', 'use XXX' and<br>&gt; &gt; 'implicit' statements?<br>&gt; <br>&gt; The following should work.<br>&gt; <br>&gt; use foo<br>&gt; #include "finclude/petsc.h"<br>&gt; implicit none<br>&gt; <br>&gt; <br>&gt; &gt; Another general question is whether I can use fortran 90 features<br>&gt; &gt; such as 'module' and dynamic allocation on a parallel system of<br>&gt; &gt; MPI-1 standard? Any reference on such programming work will be also<br>&gt; &gt; appreciated.<br>&gt; <br>&gt; I don't see why not. f90 issues you mentioned are unrelated to MPI<br>&gt; <br>&gt; Satish<br>&gt; <br>&gt; &gt; Many thanks in advance!<br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt; _________________________________________________________________<br>&gt; &gt; 约会说不清地方?来试试微软地图最新msn互动功能!<br>&gt; &gt; http://ditu.live.com/?form=TL&amp;swm=1<br><br><hr>立刻下载 MSN 保护盾,保障Messenger 安全稳定! <a href="http://im.live.cn/safe/">现在就下载!</a><br /><hr />立刻下载 MSN 保护盾,保障Messenger 安全稳定! <a href='http://im.live.cn/safe/' target='_new'>现在就下载!</a></body>
</html>