From 827e3efdc82fb182ac1554b92f07d6f8e648e6ed Mon Sep 17 00:00:00 2001 From: Wei Wu Date: Fri, 5 Oct 2018 12:24:07 -0600 Subject: [PATCH] fix fortran due to the change of C API --- runtime/legion/legion_f_c_interface.f90 | 4 +++- tutorial-c/00_hello_world/Makefile | 2 +- tutorial-c/00_hello_world/hello_world.c | 6 ++++-- tutorial-c/02_index_tasks/Makefile | 2 +- tutorial-c/02_index_tasks/index_tasks.c | 6 ++++-- .../c_with_fortran/06_privileges/privileges.cc | 9 ++++++--- .../07_partitioning_fortran_task/Makefile | 2 +- .../07_partitioning_fortran_task/partitioning.cc | 7 ++++--- .../fortran/00_hello_world/hello_world.f90 | 4 +++- tutorial-fortran/fortran/02_index_tasks/Makefile | 2 +- .../fortran/02_index_tasks/index_tasks.f90 | 6 ++++-- .../fortran/06_privileges_2d_accessor/privileges.f90 | 10 +++++++--- .../fortran/06_privileges_accessor/privileges.f90 | 10 +++++++--- .../fortran/06_privileges_raw_rect_ptr/privileges.f90 | 10 +++++++--- .../fortran/07_partitioning/partitioning.f90 | 8 ++++++-- tutorial-fortran/fortran/attach_file/attach_file.f90 | 10 +++++++--- 16 files changed, 66 insertions(+), 32 deletions(-) diff --git a/runtime/legion/legion_f_c_interface.f90 b/runtime/legion/legion_f_c_interface.f90 index 420129fe2a..a7f976dcd3 100644 --- a/runtime/legion/legion_f_c_interface.f90 +++ b/runtime/legion/legion_f_c_interface.f90 @@ -49,6 +49,7 @@ function legion_task_layout_constraint_set_create_f() & ! Legion::Runtime::preregister_task_variant() function legion_runtime_preregister_task_variant_fnptr_f(id, task_name, & + variant_name, & execution_constraints, & layout_constraints, & options, & @@ -64,6 +65,7 @@ function legion_runtime_preregister_task_variant_fnptr_f(id, task_name, & integer(c_int) :: legion_runtime_preregister_task_variant_fnptr_f character(kind=c_char), intent(in) :: task_name(*) + character(kind=c_char), intent(in) :: variant_name(*) integer(c_int), value, intent(in) :: id type(legion_execution_constraint_set_f_t), value, intent(in) :: execution_constraints type(legion_task_layout_constraint_set_f_t), value, intent(in) :: layout_constraints @@ -1224,4 +1226,4 @@ subroutine legion_convert_1d_to_2d_column_major_c(src, dst, offset, num_columns) integer(c_int), value, intent(in) :: num_columns end subroutine end interface -end module \ No newline at end of file +end module diff --git a/tutorial-c/00_hello_world/Makefile b/tutorial-c/00_hello_world/Makefile index 90ead9bb05..21f087deba 100644 --- a/tutorial-c/00_hello_world/Makefile +++ b/tutorial-c/00_hello_world/Makefile @@ -34,7 +34,7 @@ GEN_GPU_SRC ?= # .cu files # You can modify these variables, some will be appended to by the runtime makefile INC_FLAGS ?= -CC_FLAGS ?= +CC_FLAGS ?= -I/$(LG_RT_DIR)/legion NVCC_FLAGS ?= GASNET_FLAGS ?= LD_FLAGS ?= diff --git a/tutorial-c/00_hello_world/hello_world.c b/tutorial-c/00_hello_world/hello_world.c index 290a003d53..5d3f6646c0 100644 --- a/tutorial-c/00_hello_world/hello_world.c +++ b/tutorial-c/00_hello_world/hello_world.c @@ -28,7 +28,7 @@ enum TaskID { }; void hello_world_task(const void *data, size_t datalen, - const void *userdata, size_t userlen, legion_lowlevel_id_t p) + const void *userdata, size_t userlen, realm_id_t p) { // assert(task->arglen == sizeof(int)); // int rank = *(const int*)task->args; @@ -52,7 +52,7 @@ void hello_world_task(const void *data, size_t datalen, void top_level_task(const void *data, size_t datalen, - const void *userdata, size_t userlen, legion_lowlevel_id_t p) + const void *userdata, size_t userlen, realm_id_t p) { legion_task_t task; const legion_physical_region_t *regions; @@ -116,6 +116,7 @@ int main(int argc, char **argv) legion_task_config_options_t config_options = {.leaf = false, .inner = false, .idempotent = false}; legion_runtime_preregister_task_variant_fnptr(TOP_LEVEL_TASK_ID, "top_leve_task", + "cpu_variant", execution_constraints, layout_constraints, config_options, @@ -125,6 +126,7 @@ int main(int argc, char **argv) legion_runtime_preregister_task_variant_fnptr(HELLO_WORLD_TASK_ID, "hello_world_task", + "cpu_variant", execution_constraints, layout_constraints, config_options, diff --git a/tutorial-c/02_index_tasks/Makefile b/tutorial-c/02_index_tasks/Makefile index cab36558b4..d843788cba 100644 --- a/tutorial-c/02_index_tasks/Makefile +++ b/tutorial-c/02_index_tasks/Makefile @@ -34,7 +34,7 @@ GEN_GPU_SRC ?= # .cu files # You can modify these variables, some will be appended to by the runtime makefile INC_FLAGS ?= -CC_FLAGS ?= +CC_FLAGS ?= -I/$(LG_RT_DIR)/legion NVCC_FLAGS ?= GASNET_FLAGS ?= LD_FLAGS ?= diff --git a/tutorial-c/02_index_tasks/index_tasks.c b/tutorial-c/02_index_tasks/index_tasks.c index 41e4f14960..f1a172803b 100644 --- a/tutorial-c/02_index_tasks/index_tasks.c +++ b/tutorial-c/02_index_tasks/index_tasks.c @@ -28,7 +28,7 @@ enum TaskID { }; void hello_world_task(const void *data, size_t datalen, - const void *userdata, size_t userlen, legion_lowlevel_id_t p) + const void *userdata, size_t userlen, realm_id_t p) { // assert(task->arglen == sizeof(int)); // int rank = *(const int*)task->args; @@ -55,7 +55,7 @@ void hello_world_task(const void *data, size_t datalen, void top_level_task(const void *data, size_t datalen, - const void *userdata, size_t userlen, legion_lowlevel_id_t p) + const void *userdata, size_t userlen, realm_id_t p) { legion_task_t task; const legion_physical_region_t *regions; @@ -126,6 +126,7 @@ int main(int argc, char **argv) legion_task_config_options_t config_options = {.leaf = false, .inner = false, .idempotent = false}; legion_runtime_preregister_task_variant_fnptr(TOP_LEVEL_TASK_ID, "top_leve_task", + "cpu_variant", execution_constraints, layout_constraints, config_options, @@ -135,6 +136,7 @@ int main(int argc, char **argv) legion_runtime_preregister_task_variant_fnptr(HELLO_WORLD_TASK_ID, "hello_world_task", + "cpu_variant", execution_constraints, layout_constraints, config_options, diff --git a/tutorial-fortran/c_with_fortran/06_privileges/privileges.cc b/tutorial-fortran/c_with_fortran/06_privileges/privileges.cc index dc5affb660..1ca94203b5 100644 --- a/tutorial-fortran/c_with_fortran/06_privileges/privileges.cc +++ b/tutorial-fortran/c_with_fortran/06_privileges/privileges.cc @@ -230,9 +230,12 @@ void daxpy_task(const Task *task, LogicalRegion lr = regions[0].get_logical_region(); IndexSpace id = lr.get_index_space(); Rect<1> rect = runtime->get_index_space_domain(ctx, id); - const FieldAccessor acc_x(regions[0], FID_X); - const FieldAccessor acc_y(regions[0], FID_Y); - const FieldAccessor acc_z(regions[1], FID_Z); + const FieldAccessor > acc_x(regions[0], FID_X); + const FieldAccessor > acc_y(regions[0], FID_Y); + const FieldAccessor > acc_z(regions[1], FID_Z); // Get dense pointers for use with thrust diff --git a/tutorial-fortran/c_with_fortran/07_partitioning_fortran_task/Makefile b/tutorial-fortran/c_with_fortran/07_partitioning_fortran_task/Makefile index a0c6b648ba..f2e496856f 100644 --- a/tutorial-fortran/c_with_fortran/07_partitioning_fortran_task/Makefile +++ b/tutorial-fortran/c_with_fortran/07_partitioning_fortran_task/Makefile @@ -37,7 +37,7 @@ GEN_FORTRAN_SRC ?= daxpy_task_f.f90 # You can modify these variables, some will be appended to by the runtime makefile INC_FLAGS ?= -CC_FLAGS ?= +CC_FLAGS ?= -I/$(LG_RT_DIR)/legion NVCC_FLAGS ?= GASNET_FLAGS ?= LD_FLAGS ?= diff --git a/tutorial-fortran/c_with_fortran/07_partitioning_fortran_task/partitioning.cc b/tutorial-fortran/c_with_fortran/07_partitioning_fortran_task/partitioning.cc index ee3281831a..9f6cddc1ca 100644 --- a/tutorial-fortran/c_with_fortran/07_partitioning_fortran_task/partitioning.cc +++ b/tutorial-fortran/c_with_fortran/07_partitioning_fortran_task/partitioning.cc @@ -36,7 +36,7 @@ enum FieldIDs { #ifdef __cplusplus extern "C" { -void daxpy_task_f(const void *data, size_t datalen, const void *userdata, size_t userlen, legion_lowlevel_id_t p); +void daxpy_task_f(const void *data, size_t datalen, const void *userdata, size_t userlen, realm_id_t p); } #endif @@ -257,7 +257,7 @@ void init_field_task(const Task *task, -void daxpy_task(const void *data, size_t datalen, const void *userdata, size_t userlen, legion_lowlevel_id_t p) +void daxpy_task(const void *data, size_t datalen, const void *userdata, size_t userlen, realm_id_t p) { printf("daxpy task C\n"); daxpy_task_f(data, datalen, userdata, userlen, p); @@ -320,6 +320,7 @@ int main(int argc, char **argv) legion_task_config_options_t config_options = {.leaf = false, .inner = false, .idempotent = false}; legion_runtime_preregister_task_variant_fnptr(DAXPY_TASK_ID, "daxpy", + "cpu_variant", execution_constraints, layout_constraints, config_options, @@ -335,4 +336,4 @@ int main(int argc, char **argv) } return Runtime::start(argc, argv); -} \ No newline at end of file +} diff --git a/tutorial-fortran/fortran/00_hello_world/hello_world.f90 b/tutorial-fortran/fortran/00_hello_world/hello_world.f90 index 3e4a986d29..5ea0d3a1e8 100644 --- a/tutorial-fortran/fortran/00_hello_world/hello_world.f90 +++ b/tutorial-fortran/fortran/00_hello_world/hello_world.f90 @@ -117,6 +117,7 @@ Program Hello c_func_ptr = c_funloc(top_level_task) task_id_1 = legion_runtime_preregister_task_variant_fnptr_f(TOP_LEVEL_TASK_ID, c_char_"top_level_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -127,6 +128,7 @@ Program Hello c_func_ptr = c_funloc(hello_world_task) task_id_2 = legion_runtime_preregister_task_variant_fnptr_f(HELLO_WORLD_TASK_ID, c_char_"hello_world_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -135,4 +137,4 @@ Program Hello userlen) runtime_start_rv = legion_runtime_start_f(0, c_null_ptr, background) -End Program Hello \ No newline at end of file +End Program Hello diff --git a/tutorial-fortran/fortran/02_index_tasks/Makefile b/tutorial-fortran/fortran/02_index_tasks/Makefile index 38e802fcd7..0d660bc9c9 100644 --- a/tutorial-fortran/fortran/02_index_tasks/Makefile +++ b/tutorial-fortran/fortran/02_index_tasks/Makefile @@ -23,7 +23,7 @@ DEBUG ?= 1 # Include debugging symbols OUTPUT_LEVEL ?= LEVEL_DEBUG # Compile time logging level USE_CUDA ?= 0 # Include CUDA support (requires CUDA) USE_GASNET ?= 0 # Include GASNet support (requires GASNet) -USE_HDF ?= 1 # Include HDF5 support (requires HDF5) +USE_HDF ?= 0 # Include HDF5 support (requires HDF5) ALT_MAPPERS ?= 0 # Include alternative mappers (not recommended) # Put the binary file name here diff --git a/tutorial-fortran/fortran/02_index_tasks/index_tasks.f90 b/tutorial-fortran/fortran/02_index_tasks/index_tasks.f90 index 39f7e66209..7ef62fda0e 100644 --- a/tutorial-fortran/fortran/02_index_tasks/index_tasks.f90 +++ b/tutorial-fortran/fortran/02_index_tasks/index_tasks.f90 @@ -102,7 +102,7 @@ function top_level_task(tdata, tdatalen, userdata, userlen, p) local_task_args(i)%args = c_loc(input) local_task_args(i)%arglen = c_sizeof(input) tmp_p%x(0) = i - dp = legion_domain_point_from_point_1d_f(tmp_p) + call legion_domain_point_from_point_1d_f(tmp_p, dp) call legion_argument_map_set_point_f(arg_map, dp, local_task_args(i), replace) end do @@ -151,6 +151,7 @@ Program Hello c_func_ptr = c_funloc(top_level_task) task_id_1 = legion_runtime_preregister_task_variant_fnptr_f(TOP_LEVEL_TASK_ID, c_char_"top_level_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -161,6 +162,7 @@ Program Hello c_func_ptr = c_funloc(hello_world_task) task_id_2 = legion_runtime_preregister_task_variant_fnptr_f(HELLO_WORLD_TASK_ID, c_char_"hello_world_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -169,4 +171,4 @@ Program Hello userlen) runtime_start_rv = legion_runtime_start_f(0, c_null_ptr, background) -End Program Hello \ No newline at end of file +End Program Hello diff --git a/tutorial-fortran/fortran/06_privileges_2d_accessor/privileges.f90 b/tutorial-fortran/fortran/06_privileges_2d_accessor/privileges.f90 index 24a8094ab2..83d6255b45 100644 --- a/tutorial-fortran/fortran/06_privileges_2d_accessor/privileges.f90 +++ b/tutorial-fortran/fortran/06_privileges_2d_accessor/privileges.f90 @@ -380,7 +380,7 @@ Program Hello type(legion_task_config_options_f_t) :: config_options integer(c_int) :: proc_kind = 2 integer(c_int) :: TOP_LEVEL_TASK_ID, INIT_TASK_ID, DAXPY_TASK_ID, CHECK_TASK_ID - integer(c_int) :: task_id_1, task_id_2, task_id_3 + integer(c_int) :: task_id_1, task_id_2, task_id_3, task_id_4 integer(c_size_t) :: userlen = 0 integer(c_int) :: runtime_start_rv logical(c_bool) :: background = .FALSE. @@ -410,6 +410,7 @@ Program Hello c_func_ptr = c_funloc(top_level_task) task_id_1 = legion_runtime_preregister_task_variant_fnptr_f(TOP_LEVEL_TASK_ID, c_char_"top_level_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -420,6 +421,7 @@ Program Hello c_func_ptr = c_funloc(init_task) task_id_2 = legion_runtime_preregister_task_variant_fnptr_f(INIT_TASK_ID, c_char_"init_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -430,6 +432,7 @@ Program Hello c_func_ptr = c_funloc(daxpy_task) task_id_3 = legion_runtime_preregister_task_variant_fnptr_f(DAXPY_TASK_ID, c_char_"daxpy_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -439,7 +442,8 @@ Program Hello c_func_ptr = c_funloc(check_task) - task_id_3 = legion_runtime_preregister_task_variant_fnptr_f(CHECK_TASK_ID, c_char_"check_task"//c_null_char, & + task_id_4 = legion_runtime_preregister_task_variant_fnptr_f(CHECK_TASK_ID, c_char_"check_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -447,4 +451,4 @@ Program Hello c_null_ptr, & userlen) runtime_start_rv = legion_runtime_start_f(0, c_null_ptr, background) -End Program Hello \ No newline at end of file +End Program Hello diff --git a/tutorial-fortran/fortran/06_privileges_accessor/privileges.f90 b/tutorial-fortran/fortran/06_privileges_accessor/privileges.f90 index 9701f38b1e..f62e3e3e0d 100644 --- a/tutorial-fortran/fortran/06_privileges_accessor/privileges.f90 +++ b/tutorial-fortran/fortran/06_privileges_accessor/privileges.f90 @@ -354,7 +354,7 @@ Program Hello type(legion_task_config_options_f_t) :: config_options integer(c_int) :: proc_kind = 2 integer(c_int) :: TOP_LEVEL_TASK_ID, INIT_TASK_ID, DAXPY_TASK_ID, CHECK_TASK_ID - integer(c_int) :: task_id_1, task_id_2, task_id_3 + integer(c_int) :: task_id_1, task_id_2, task_id_3, task_id_4 integer(c_size_t) :: userlen = 0 integer(c_int) :: runtime_start_rv logical(c_bool) :: background = .FALSE. @@ -384,6 +384,7 @@ Program Hello c_func_ptr = c_funloc(top_level_task) task_id_1 = legion_runtime_preregister_task_variant_fnptr_f(TOP_LEVEL_TASK_ID, c_char_"top_level_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -394,6 +395,7 @@ Program Hello c_func_ptr = c_funloc(init_task) task_id_2 = legion_runtime_preregister_task_variant_fnptr_f(INIT_TASK_ID, c_char_"init_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -404,6 +406,7 @@ Program Hello c_func_ptr = c_funloc(daxpy_task) task_id_3 = legion_runtime_preregister_task_variant_fnptr_f(DAXPY_TASK_ID, c_char_"daxpy_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -413,7 +416,8 @@ Program Hello c_func_ptr = c_funloc(check_task) - task_id_3 = legion_runtime_preregister_task_variant_fnptr_f(CHECK_TASK_ID, c_char_"check_task"//c_null_char, & + task_id_4 = legion_runtime_preregister_task_variant_fnptr_f(CHECK_TASK_ID, c_char_"check_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -421,4 +425,4 @@ Program Hello c_null_ptr, & userlen) runtime_start_rv = legion_runtime_start_f(0, c_null_ptr, background) -End Program Hello \ No newline at end of file +End Program Hello diff --git a/tutorial-fortran/fortran/06_privileges_raw_rect_ptr/privileges.f90 b/tutorial-fortran/fortran/06_privileges_raw_rect_ptr/privileges.f90 index 0871b38de5..c0fec7baf8 100644 --- a/tutorial-fortran/fortran/06_privileges_raw_rect_ptr/privileges.f90 +++ b/tutorial-fortran/fortran/06_privileges_raw_rect_ptr/privileges.f90 @@ -374,7 +374,7 @@ Program Hello type(legion_task_config_options_f_t) :: config_options integer(c_int) :: proc_kind = 2 integer(c_int) :: TOP_LEVEL_TASK_ID, INIT_TASK_ID, DAXPY_TASK_ID, CHECK_TASK_ID - integer(c_int) :: task_id_1, task_id_2, task_id_3 + integer(c_int) :: task_id_1, task_id_2, task_id_3, task_id_4 integer(c_size_t) :: userlen = 0 integer(c_int) :: runtime_start_rv logical(c_bool) :: background = .FALSE. @@ -404,6 +404,7 @@ Program Hello c_func_ptr = c_funloc(top_level_task) task_id_1 = legion_runtime_preregister_task_variant_fnptr_f(TOP_LEVEL_TASK_ID, c_char_"top_level_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -414,6 +415,7 @@ Program Hello c_func_ptr = c_funloc(init_task) task_id_2 = legion_runtime_preregister_task_variant_fnptr_f(INIT_TASK_ID, c_char_"init_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -424,6 +426,7 @@ Program Hello c_func_ptr = c_funloc(daxpy_task) task_id_3 = legion_runtime_preregister_task_variant_fnptr_f(DAXPY_TASK_ID, c_char_"daxpy_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -433,7 +436,8 @@ Program Hello c_func_ptr = c_funloc(check_task) - task_id_3 = legion_runtime_preregister_task_variant_fnptr_f(CHECK_TASK_ID, c_char_"check_task"//c_null_char, & + task_id_4 = legion_runtime_preregister_task_variant_fnptr_f(CHECK_TASK_ID, c_char_"check_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -441,4 +445,4 @@ Program Hello c_null_ptr, & userlen) runtime_start_rv = legion_runtime_start_f(0, c_null_ptr, background) -End Program Hello \ No newline at end of file +End Program Hello diff --git a/tutorial-fortran/fortran/07_partitioning/partitioning.f90 b/tutorial-fortran/fortran/07_partitioning/partitioning.f90 index 068e8c4afc..4ec43c42f9 100644 --- a/tutorial-fortran/fortran/07_partitioning/partitioning.f90 +++ b/tutorial-fortran/fortran/07_partitioning/partitioning.f90 @@ -420,7 +420,7 @@ Program Hello type(legion_task_config_options_f_t) :: config_options integer(c_int) :: proc_kind = 2 integer(c_int) :: TOP_LEVEL_TASK_ID, INIT_TASK_ID, DAXPY_TASK_ID, CHECK_TASK_ID - integer(c_int) :: task_id_1, task_id_2, task_id_3 + integer(c_int) :: task_id_1, task_id_2, task_id_3, task_id_4 integer(c_size_t) :: userlen = 0 integer(c_int) :: runtime_start_rv logical(c_bool) :: background = .FALSE. @@ -450,6 +450,7 @@ Program Hello c_func_ptr = c_funloc(top_level_task) task_id_1 = legion_runtime_preregister_task_variant_fnptr_f(TOP_LEVEL_TASK_ID, c_char_"top_level_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -461,6 +462,7 @@ Program Hello c_func_ptr = c_funloc(init_task) task_id_2 = legion_runtime_preregister_task_variant_fnptr_f(INIT_TASK_ID, c_char_"init_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -471,6 +473,7 @@ Program Hello c_func_ptr = c_funloc(daxpy_task) task_id_3 = legion_runtime_preregister_task_variant_fnptr_f(DAXPY_TASK_ID, c_char_"daxpy_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -480,7 +483,8 @@ Program Hello c_func_ptr = c_funloc(check_task) - task_id_3 = legion_runtime_preregister_task_variant_fnptr_f(CHECK_TASK_ID, c_char_"check_task"//c_null_char, & + task_id_4 = legion_runtime_preregister_task_variant_fnptr_f(CHECK_TASK_ID, c_char_"check_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & diff --git a/tutorial-fortran/fortran/attach_file/attach_file.f90 b/tutorial-fortran/fortran/attach_file/attach_file.f90 index bbb2760cae..21119dc76c 100644 --- a/tutorial-fortran/fortran/attach_file/attach_file.f90 +++ b/tutorial-fortran/fortran/attach_file/attach_file.f90 @@ -449,7 +449,7 @@ Program Hello type(legion_task_config_options_f_t) :: config_options integer(c_int) :: proc_kind = 2 integer(c_int) :: TOP_LEVEL_TASK_ID, INIT_TASK_ID, DAXPY_TASK_ID, CHECK_TASK_ID - integer(c_int) :: task_id_1, task_id_2, task_id_3 + integer(c_int) :: task_id_1, task_id_2, task_id_3, task_id_4 integer(c_size_t) :: userlen = 0 integer(c_int) :: runtime_start_rv logical(c_bool) :: background = .FALSE. @@ -479,6 +479,7 @@ Program Hello c_func_ptr = c_funloc(top_level_task) task_id_1 = legion_runtime_preregister_task_variant_fnptr_f(TOP_LEVEL_TASK_ID, c_char_"top_level_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -490,6 +491,7 @@ Program Hello c_func_ptr = c_funloc(init_task) task_id_2 = legion_runtime_preregister_task_variant_fnptr_f(INIT_TASK_ID, c_char_"init_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -500,6 +502,7 @@ Program Hello c_func_ptr = c_funloc(daxpy_task) task_id_3 = legion_runtime_preregister_task_variant_fnptr_f(DAXPY_TASK_ID, c_char_"daxpy_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -509,7 +512,8 @@ Program Hello c_func_ptr = c_funloc(check_task) - task_id_3 = legion_runtime_preregister_task_variant_fnptr_f(CHECK_TASK_ID, c_char_"check_task"//c_null_char, & + task_id_4 = legion_runtime_preregister_task_variant_fnptr_f(CHECK_TASK_ID, c_char_"check_task"//c_null_char, & + c_char_"cpu_variant"//c_null_char, & execution_constraints, & layout_constraints, & config_options, & @@ -517,4 +521,4 @@ Program Hello c_null_ptr, & userlen) runtime_start_rv = legion_runtime_start_f(0, c_null_ptr, background) -End Program Hello \ No newline at end of file +End Program Hello