/* StarPU --- Runtime system for heterogeneous multicore architectures. * * Copyright (C) 2013-2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria * * StarPU is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or (at * your option) any later version. * * StarPU is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU Lesser General Public License in COPYING.LGPL for more details. */ #include #include "helper.h" int main(int argc, char* argv[]) { starpu_data_handle_t h; starpu_mpi_checkpoint_template cp_template; int val = 42; int val2 = 1234; int ret; struct starpu_conf conf; starpu_conf_init(&conf); conf.nmic = 0; conf.nmpi_ms = 0; FPRINTF(stderr, "Go\n"); ret = starpu_init(&conf); if (STARPU_UNLIKELY(ret == -ENODEV)) { return 77; } STARPU_CHECK_RETURN_VALUE(ret, "starpu_init"); if (starpu_cpu_worker_get_count() < 1) { FPRINTF(stderr, "This application requires at least 1 cpu worker\n"); starpu_shutdown(); return 77; } FPRINTF(stderr, "init\n"); starpu_variable_data_register(&h, STARPU_MAIN_RAM, (uintptr_t)&val2, sizeof(int)); FPRINTF(stderr, "registered\n"); starpu_mpi_checkpoint_template_register(&cp_template, STARPU_VALUE, &val, sizeof(int), 1, STARPU_R, &h, 1, 0); starpu_mpi_checkpoint_template_print(cp_template); return 0; }