diff --git a/control/morse_f90.f90 b/control/morse_f90.f90 index 9c3b7b23882932ab03c33ded3e750082460936e7..198e0c8bbd1733c73bfa6b899cefb43251bee1fc 100644 --- a/control/morse_f90.f90 +++ b/control/morse_f90.f90 @@ -90,12 +90,12 @@ module morse integer, parameter :: dp = kind(0.0d0) interface - function MORSE_Init_c(cores) & + function MORSE_Init_c(cpus, gpus) & & bind(c, name='MORSE_Init') use iso_c_binding implicit none 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 interface @@ -209,11 +209,11 @@ module morse end interface interface - function MORSE_Init_Affinity_c(cores,bindtab) & + function MORSE_Init_Affinity_c(cores,gpus,bindtab) & & bind(c, name='MORSE_Init_Affinity') use iso_c_binding 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 end function MORSE_Init_Affinity_c end interface @@ -296,12 +296,12 @@ module morse contains - subroutine morse_init(ncores,info) + subroutine morse_init(cores,gpus,info) use iso_c_binding implicit none - integer(kind=c_int), intent(in) :: ncores + integer(kind=c_int), intent(in) :: cores, gpus integer(kind=c_int), intent(out) :: info - info = morse_init_c(ncores) + info = morse_init_c(cores,gpus) morse_initialized = .true. end subroutine morse_init diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index b982cae521961a037691740cd73e365df0013735..061af84bed03543137c31d25e8a7dea982594c2e 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -65,6 +65,7 @@ add_custom_target(chameleon_include ALL SOURCES ${CHAMELEON_HDRS}) set(HDR_INSTALL morse_constants.h + morse_fortran.h morse_kernels.h morse_simulate.h morse_struct.h diff --git a/include/morse_fortran.h b/include/morse_fortran.h index 2a12c8675c0718a92e754001244a3e715702e7f0..5cf58ae11509daf183e860396b822ed8b6eb2217 100644 --- a/include/morse_fortran.h +++ b/include/morse_fortran.h @@ -164,12 +164,13 @@ ! State machine switches ! 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_ERRORS = 2 ) parameter ( MORSE_AUTOTUNING = 3 ) parameter ( MORSE_DAG = 4 ) - parameter ( MORSE_PROFILING_MOSE = 5 ) + parameter ( MORSE_PROFILING_MODE = 5 ) parameter ( MORSE_PARALLEL_MODE = 6 ) parameter ( MORSE_BOUND = 7 )