simple fortran里面调用C 语言写的UMFPACK 函数库
请问哪位大神知道如何在simple fortran里面调用C 语言写的UMFPACK 函数库,在suitesparse package ======================================================================! UMFPACK Fortran interface via the mUMFPACK module
! ======================================================================
! Version 1.0 (Apr 23, 2014) for UMFPACK version 5.6.2
! ======================================================================
! Compile with any Fortran compiler with support of iso_c_binding module
! and link with the UMFPACK C library:
! e.g., gfortran umfpack.f90 my_code.f90 -lumfpack
! ======================================================================
module mUMFPACK
! ======================================================================
use iso_c_binding
implicit none
! private size constants
integer,parameter,private :: i4=4, & ! size of default integer
i8=8, & ! size of long integer
ip=c_intptr_t, & ! size of pointers used in basic Fortran wrappers
r4=4, & ! size of single precision real/complex
r8=8 ! size of double precision real/complex
! default pointers to UMFPACK Symbolic and Numeric objects
type(c_ptr),private :: iSymbolic=c_null_ptr,iNumeric=c_null_ptr
! ======================================================================
! UMFPACK constants
! ======================================================================
! size of Info and Control arrays 我用这个来调用UMFPACK C library, 但是总是显示Fatal Error: Can't open module file 。。。
ps: 我是学经济的,刚上手Fortran不久,能大体看懂code, 并不懂makefile之类的:-dizzy:,求大神拯救。。
daniel1010 发表于 2019-1-4 15:51
我用这个来调用UMFPACK C library, 但是总是显示Fatal Error: Can't open module file 。。。
ps: 我是学 ...
果断放弃Fortran,为啥不用R或者Python?
页:
[1]