Commit d4488bec authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

update f90 interface

parent 9979d60b
...@@ -90,12 +90,12 @@ module morse ...@@ -90,12 +90,12 @@ module morse
integer, parameter :: dp = kind(0.0d0) integer, parameter :: dp = kind(0.0d0)
interface interface
function MORSE_Init_c(cores) & function MORSE_Init_c(cpus, gpus) &
& bind(c, name='MORSE_Init') & bind(c, name='MORSE_Init')
use iso_c_binding use iso_c_binding
implicit none implicit none
integer(kind=c_int) :: MORSE_Init_c integer(kind=c_int) :: MORSE_Init_c
integer(kind=c_int), value :: cores integer(kind=c_int), value :: cpus, gpus
end function MORSE_Init_c end function MORSE_Init_c
end interface end interface
...@@ -209,11 +209,11 @@ module morse ...@@ -209,11 +209,11 @@ module morse
end interface end interface
interface interface
function MORSE_Init_Affinity_c(cores,bindtab) & function MORSE_Init_Affinity_c(cores,gpus,bindtab) &
& bind(c, name='MORSE_Init_Affinity') & bind(c, name='MORSE_Init_Affinity')
use iso_c_binding use iso_c_binding
integer(kind=c_int) :: MORSE_Init_Affinity_c integer(kind=c_int) :: MORSE_Init_Affinity_c
integer(kind=c_int), value :: cores integer(kind=c_int), value :: cores, gpus
type(c_ptr), value :: bindtab type(c_ptr), value :: bindtab
end function MORSE_Init_Affinity_c end function MORSE_Init_Affinity_c
end interface end interface
...@@ -296,12 +296,12 @@ module morse ...@@ -296,12 +296,12 @@ module morse
contains contains
subroutine morse_init(ncores,info) subroutine morse_init(cores,gpus,info)
use iso_c_binding use iso_c_binding
implicit none implicit none
integer(kind=c_int), intent(in) :: ncores integer(kind=c_int), intent(in) :: cores, gpus
integer(kind=c_int), intent(out) :: info integer(kind=c_int), intent(out) :: info
info = morse_init_c(ncores) info = morse_init_c(cores,gpus)
morse_initialized = .true. morse_initialized = .true.
end subroutine morse_init end subroutine morse_init
......
...@@ -65,6 +65,7 @@ add_custom_target(chameleon_include ALL SOURCES ${CHAMELEON_HDRS}) ...@@ -65,6 +65,7 @@ add_custom_target(chameleon_include ALL SOURCES ${CHAMELEON_HDRS})
set(HDR_INSTALL set(HDR_INSTALL
morse_constants.h morse_constants.h
morse_fortran.h
morse_kernels.h morse_kernels.h
morse_simulate.h morse_simulate.h
morse_struct.h morse_struct.h
......
...@@ -164,12 +164,13 @@ ...@@ -164,12 +164,13 @@
! State machine switches ! State machine switches
! !
integer MORSE_WARNINGS, MORSE_ERRORS, MORSE_AUTOTUNING integer MORSE_WARNINGS, MORSE_ERRORS, MORSE_AUTOTUNING
integer MORSE_DAG integer MORSE_DAG, MORSE_PROFILING_MODE, MORSE_PARALLEL_MODE
integer MORSE_BOUND
parameter ( MORSE_WARNINGS = 1 ) parameter ( MORSE_WARNINGS = 1 )
parameter ( MORSE_ERRORS = 2 ) parameter ( MORSE_ERRORS = 2 )
parameter ( MORSE_AUTOTUNING = 3 ) parameter ( MORSE_AUTOTUNING = 3 )
parameter ( MORSE_DAG = 4 ) parameter ( MORSE_DAG = 4 )
parameter ( MORSE_PROFILING_MOSE = 5 ) parameter ( MORSE_PROFILING_MODE = 5 )
parameter ( MORSE_PARALLEL_MODE = 6 ) parameter ( MORSE_PARALLEL_MODE = 6 )
parameter ( MORSE_BOUND = 7 ) parameter ( MORSE_BOUND = 7 )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment