소스 검색

Allows FT api functions have an empty definition the STARPU_USE_MPI_FT is ndef.

Romain LION 4 년 전
부모
커밋
47f5ca3332
2개의 변경된 파일12개의 추가작업 그리고 2개의 파일을 삭제
  1. 0 2
      mpi/include/starpu_mpi.h
  2. 12 0
      mpi/include/starpu_mpi_ft.h

+ 0 - 2
mpi/include/starpu_mpi.h

@@ -24,9 +24,7 @@
 #include <mpi.h>
 #include <stdint.h>
 
-#if defined(STARPU_USE_MPI_FT)
 #include <starpu_mpi_ft.h>
-#endif
 
 #ifdef __cplusplus
 extern "C"

+ 12 - 0
mpi/include/starpu_mpi_ft.h

@@ -42,6 +42,8 @@ typedef struct _starpu_mpi_checkpoint_template* starpu_mpi_checkpoint_template_t
  * <li> The argument list must be ended by the value 0.
  * </ul>
  */
+
+#ifdef STARPU_USE_MPI_FT
 int starpu_mpi_checkpoint_template_register(starpu_mpi_checkpoint_template_t* cp_template, int cp_id, int cp_domain, ...);
 int starpu_mpi_checkpoint_template_create(starpu_mpi_checkpoint_template_t* cp_template, int cp_id, int cp_domain);
 int starpu_mpi_checkpoint_template_add_entry(starpu_mpi_checkpoint_template_t* cp_template, ...);
@@ -50,6 +52,16 @@ int starpu_mpi_submit_checkpoint_template(starpu_mpi_checkpoint_template_t cp_te
 int starpu_mpi_ft_turn_on(void);
 int starpu_mpi_ft_turn_off(void);
 int _starpu_mpi_checkpoint_template_print(starpu_mpi_checkpoint_template_t cp_template);
+#else STARPU_USE_MPI_FT
+int starpu_mpi_checkpoint_template_register(starpu_mpi_checkpoint_template_t* cp_template, int cp_id, int cp_domain, ...) {return 0;}
+int starpu_mpi_checkpoint_template_create(starpu_mpi_checkpoint_template_t* cp_template, int cp_id, int cp_domain) {return 0;}
+int starpu_mpi_checkpoint_template_add_entry(starpu_mpi_checkpoint_template_t* cp_template, ...) {return 0;}
+int starpu_mpi_checkpoint_template_freeze(starpu_mpi_checkpoint_template_t* cp_template) {return 0;}
+int starpu_mpi_submit_checkpoint_template(starpu_mpi_checkpoint_template_t cp_template) {return 0;}
+int starpu_mpi_ft_turn_on(void) {return 0;}
+int starpu_mpi_ft_turn_off(void) {return 0;}
+int _starpu_mpi_checkpoint_template_print(starpu_mpi_checkpoint_template_t cp_template) {return 0;}
+#endif
 
 #ifdef __cplusplus
 }