[petsc-users] Calling DMCompositeCreate() in Fortran

Bay, Yong Yi ybay2 at illinois.edu
Fri Nov 6 12:39:19 CST 2015


Hi,

I noticed that DMCompositeCreate() does not exist in fortran format. What would be the best way to call this function if my code is written in Fortran? I tried using iso_c_binding as follows and it compiles but crashes on execution.

interface
    subroutine DMCompositeCreate(comm, dm) bind(C,name="DMCompositeCreate")
         import
         integer(c_int), value      :: comm
         integer(c_long), value   :: dm
    end subroutine DMCompositeCreate
end interface
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20151106/a423fcf8/attachment.html>


More information about the petsc-users mailing list