<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hello,<br><br><br> I am developing Fortran90 code with PETSc. Several Modules are defined in the code. Such as<br><br> Module MyParameter<br> Implicit none<br>#include "finclude/petscsys.h"<br>#include "finclude/petscvec.h"<br>#include "finclude/petscmat.h"<br>#include "finclude/petscpc.h"<br>#include "finclude/petscksp.h"<br>#include "finclude/petscvec.h90"<br>#include "finclude/petscmat.h90"<br> <br> Integer:: ... ...<br> Real:: ... ...<br> <br><br> End Module MyParameter<br><br> Module MySub<br> Use Myparameter<br> Contains<br> ... ...<br> Call MatSetType(A_Mat, MATAIJ, ierr)<br> ... ...<br> EndModule MySub<br><br> <br> Main Program<br> Use MyParameter<br> Use MySub<br> ... ...<br> ... ...<br> End <br><br> If I put all the modules in a single .F90 file, the compilation can be done successfully. However, If I put the modules in separated files, the following error information comes out:<br><br> Error: Symbol 'mataij' at (1) has no IMPLICIT type.<br><br> In addition, if I use PetscInt, PetscErrorCode to declare variables in Module MySub, the similar errors come out. How declare the variable with PETSc type in separate files? Thanks.<br><br> <br><br> <br><br><br> <br> </div></body>
</html>