Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merging changes done by Steven, Samuel and Luka, regarding simulation of StarPU-MPI
[simgrid.git] / include / smpi / smpi.h
index 73c7525..16e95d6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2014. The SimGrid Team.
+/* Copyright (c) 2007-2015. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -7,9 +7,15 @@
 #ifndef SMPI_H
 #define SMPI_H
 
+#include <simgrid_config.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#include <stddef.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
+#endif
+
+#include <stddef.h>
 #include <xbt/misc.h>
 #include <xbt/function_types.h>
 
@@ -129,12 +135,19 @@ SG_BEGIN_DECL()
 #define MPI_SIMILAR   1
 #define MPI_UNEQUAL   2
 #define MPI_CONGRUENT 3
-#define MPI_WTIME_IS_GLOBAL 1
-#define MPI_TAG_UB           1000000
-#define MPI_HOST             0
-#define MPI_IO               0
+
+
 #define MPI_BSEND_OVERHEAD   0
 
+/* Attribute keys */
+#define MPI_IO               -1
+#define MPI_HOST             -2
+#define MPI_WTIME_IS_GLOBAL  -3
+#define MPI_APPNUM           -4
+#define MPI_TAG_UB           -5
+#define MPI_TAG_LB           -6
+#define MPI_UNIVERSE_SIZE    -7
+#define MPI_LASTUSEDCODE     -8
 
 #define MPI_MODE_NOSTORE 0x1
 #define MPI_MODE_NOPUT 0x2
@@ -142,12 +155,9 @@ SG_BEGIN_DECL()
 #define MPI_MODE_NOSUCCEED 0x8
 #define MPI_MODE_NOCHECK 0x10
 
-
 #define MPI_KEYVAL_INVALID 0
 #define MPI_NULL_COPY_FN NULL
 #define MPI_NULL_DELETE_FN NULL
-#define MPI_APPNUM 0
-#define MPI_LASTUSEDCODE MPI_SUCCESS
 #define MPI_ERR_LASTCODE 74
 
 #define MPI_CXX_BOOL MPI_DATATYPE_NULL
@@ -168,7 +178,7 @@ SG_BEGIN_DECL()
 #define MPI_ROOT 0
 #define MPI_INFO_NULL NULL
 #define MPI_COMM_TYPE_SHARED    1
-#define MPI_WIN_NULL NULL
+#define MPI_WIN_NULL ((MPI_Win)NULL)
 
 #define MPI_VERSION 1
 #define MPI_SUBVERSION 1
@@ -356,7 +366,6 @@ typedef struct s_smpi_mpi_communicator *MPI_Comm;
 
 #define MPI_COMM_NULL ((MPI_Comm)NULL)
 XBT_PUBLIC_DATA( MPI_Comm ) MPI_COMM_WORLD;
-XBT_PUBLIC_DATA( int ) MPI_UNIVERSE_SIZE;
 #define MPI_COMM_SELF smpi_process_comm_self()
 
 struct s_smpi_mpi_request;
@@ -821,6 +830,8 @@ MPI_CALL(XBT_PUBLIC(int),  MPI_Win_wait,(MPI_Win win));
 // smpi functions
 XBT_PUBLIC(int) smpi_global_size(void);
 XBT_PUBLIC(MPI_Comm) smpi_process_comm_self(void);
+XBT_PUBLIC(void*) smpi_process_get_user_data(void);
+XBT_PUBLIC(void) smpi_process_set_user_data(void *);
 /*
 XBT_PUBLIC(void) smpi_exit(int);
 */
@@ -831,7 +842,9 @@ XBT_PUBLIC(void) smpi_execute(double duration);
 XBT_PUBLIC(double) smpi_get_host_power_peak_at(int pstate_index);
 XBT_PUBLIC(double) smpi_get_host_current_power_peak(void);
 XBT_PUBLIC(int) smpi_get_host_nb_pstates(void);
-XBT_PUBLIC(void) smpi_set_host_power_peak_at(int pstate_index);
+XBT_PUBLIC(void) smpi_set_host_pstate(int pstate_index);
+XBT_PUBLIC(int)  smpi_get_host_pstate(void);
+
 XBT_PUBLIC(double) smpi_get_host_consumed_energy(void);
 
 XBT_PUBLIC(int) smpi_usleep(useconds_t usecs);
@@ -879,9 +892,7 @@ XBT_PUBLIC(int) smpi_process_index(void);
 XBT_PUBLIC(void) smpi_process_init(int *argc, char ***argv);
 
 /* Trace replay specific stuff */
-XBT_PUBLIC(void) smpi_replay_init(int *argc, char***argv);
-XBT_PUBLIC(void) smpi_action_trace_run(char *);
-XBT_PUBLIC(int) smpi_replay_finalize(void);
+XBT_PUBLIC(void) smpi_replay_run(int *argc, char***argv);
 
 XBT_PUBLIC(void) SMPI_app_instance_register(const char *name, xbt_main_func_t code, int num_processes);
 XBT_PUBLIC(void) SMPI_init(void);