[petsc-users] Calling DMCompositeCreate() in Fortran
Barry Smith
bsmith at mcs.anl.gov
Fri Nov 6 13:33:44 CST 2015
When something crashes it is time to run in the debugger and determine what is causing the crash. The code looks ok and we could only speculate wildly why it crashes. Running in the debugger will likely revel the problem in less than 3 minutes.
Barry
> On Nov 6, 2015, at 12:39 PM, Bay, Yong Yi <ybay2 at illinois.edu> wrote:
>
> 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
More information about the petsc-users
mailing list