[petsc-users] [Fortran] subroutines inside modules?

Leo van Kampenhout lvankampenhout at gmail.com
Thu Sep 30 09:31:49 CDT 2010


Hi all,

since it is mandatory to declare all subroutines as "external" in Fortran,
is it possible for Modules to have subroutines? I'm unable to declare the
subroutine external inside the module itself, nor in the program which is
using it. Not declaring it external at all results in the following
compilation error:

/net/users/csg/csg4035/master/workdir/src/main.F:97: undefined reference to
`__grid_MOD_readgrid'

(the module is here is named "grid", the subroutine "readgrid" )

Thanks,
Leo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100930/e93458c0/attachment.htm>


More information about the petsc-users mailing list