data partition with registered data with home_node==-1 and GPU
Steps to reproduce
Modify examples/filters/fmatrix.c as in this patch:
diff --git a/examples/filters/fmatrix.c b/examples/filters/fmatrix.c
index c3767362f..9f8f5ccbb 100644
--- a/examples/filters/fmatrix.c
+++ b/examples/filters/fmatrix.c
@@ -40,6 +40,22 @@ extern void matrix_hip_func(void *buffers[], void *cl_arg);
extern void generate_matrix_data(int *matrix, int nx, int ny, unsigned ld);
extern void print_matrix_data(starpu_data_handle_t matrix_handle);
+void matrix_init_cpu_func(void *buffers[], void *cl_arg)
+{
+ int i, j;
+ int *factor = (int *) cl_arg;
+
+ /* length of the matrix */
+ int nx = (int)STARPU_MATRIX_GET_NX(buffers[0]);
+ int ny = (int)STARPU_MATRIX_GET_NY(buffers[0]);
+ unsigned ld = STARPU_MATRIX_GET_LD(buffers[0]);
+ /* local copy of the matrix pointer */
+ int *matrix = (int *)STARPU_MATRIX_GET_PTR(buffers[0]);
+
+ generate_matrix_data(matrix, nx, ny, ld);
+}
+
+
int main(void)
{
unsigned j;
@@ -65,16 +81,32 @@ int main(void)
.name = "matrix_scal"
};
+ struct starpu_codelet cl_init =
+ {
+ .cpu_funcs = {matrix_init_cpu_func},
+ .cpu_funcs_name = {"matrix_init_cpu_func"},
+ .nbuffers = 1,
+ .modes = {STARPU_W},
+ .name = "matrix_init"
+ };
+
ret = starpu_init(NULL);
if (ret == -ENODEV)
exit(77);
STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
- starpu_malloc((void **)&matrix, NX*NY*sizeof(int));
- generate_matrix_data(matrix, NX, NY, NX);
+ //starpu_malloc((void **)&matrix, NX*NY*sizeof(int));
+ //generate_matrix_data(matrix, NX, NY, NX);
/* Declare data to StarPU */
- starpu_matrix_data_register(&handle, STARPU_MAIN_RAM, (uintptr_t)matrix, NX, NX, NY, sizeof(matrix[0]));
+ starpu_matrix_data_register(&handle, -1 , (uintptr_t)NULL, NX, NX, NY, sizeof(int));
+ struct starpu_task *task_init = starpu_task_create();
+ task_init->handles[0] = handle;//starpu_data_get_sub_data(handle, 1, i);
+ task_init->cl = &cl_init;
+ task_init->synchronous = 1;
+
+ ret = starpu_task_submit(task_init);
+
FPRINTF(stderr,"IN Matrix: \n");
print_matrix_data(handle);
Obtained behavior
Code crashes with [starpu][g400][starpu_cuda_report_error] Error: oops in _starpu_free_flags_on_node (/home_nfs/blacostex/chameleon/starpu/src/datawizard/malloc.c:621)... 1: invalid argument
Sorry could not run it in gdb it tells me the fmatrix file is not an exec file...
Expected behavior
Runs as if the example was not modified.
Configuration
/home_nfs/blacostex/chameleon/starpu/configure --prefix=/home_nfs/blacostex/chameleon/starpu-install-intel18_cuda11.7_hpcx --disable-build-doc --disable-build-tests --disable-starpufft --disable-mlr --disable-hdf5 --disable-fortran --disable-opencl --enable-icc --with-mpicc=mpicc --enable-cuda --enable-fxt --enable-maxnumanodes=9 --enable-max-sched-ctxs=32 --with-cuda-include-dir=/software/cuda_toolkits/cuda-11.7/include --with-cuda-lib-dir=/software/cuda_toolkits/cuda-11.7/lib64 --disable-parallel-worker --disable-simgrid --disable-build-examples CC=icc CXX=icpc FC=ifort --no-create --no-recursion
Configuration result
Please attach the config.log
file from the build tree.
Distribution
RHEL 8.6
Version of StarPU
git 8014f91e
Version of GPU drivers
Driver Version: 525.105.17 CUDA Version: 12.0