A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
basic code in place, most compile errors gone, possible problem with simix.h
[simgrid.git]
/
src
/
smpi
/
include
/
smpi.h
diff --git
a/src/smpi/include/smpi.h
b/src/smpi/include/smpi.h
index
3a7426d
..
99a4643
100644
(file)
--- a/
src/smpi/include/smpi.h
+++ b/
src/smpi/include/smpi.h
@@
-1,4
+1,6
@@
#define SMPI_DEFAULT_SPEED 100
#define SMPI_DEFAULT_SPEED 100
+#define SMPI_REQUEST_MALLOCATOR_SIZE 100
+#define SMPI_MESSAGE_MALLOCATOR_SIZE 100
#define SMPI_RAND_SEED 5
#define SMPI_RAND_SEED 5
@@
-16,13
+18,14
@@
#define MPI_ERR_TAG 8
#include <stdlib.h>
#define MPI_ERR_TAG 8
#include <stdlib.h>
-
#include <simix/simix.h>
// MPI_Comm
struct smpi_mpi_communicator_t {
int size;
int barrier;
#include <simix/simix.h>
// MPI_Comm
struct smpi_mpi_communicator_t {
int size;
int barrier;
+ smx_mutex_t barrier_mutex;
+ smx_cond_t barrier_cond;
smx_host_t *hosts;
smx_process_t *processes;
};
smx_host_t *hosts;
smx_process_t *processes;
};
@@
-56,19
+59,31
@@
extern smpi_mpi_datatype_t smpi_mpi_double;
// MPI_Request
struct smpi_mpi_request_t {
// MPI_Request
struct smpi_mpi_request_t {
- void *buf;
- int count;
- smpi_mpi_datatype_t *datatype;
- int src;
- int dst;
- int tag;
- smpi_mpi_communicator_t *comm;
- short int completed;
- xbt_fifo_t waitlist;
+ smpi_mpi_communicator_t *comm;
+ int src;
+ int dst;
+ int tag;
+ void *buf;
+ int count;
+ smpi_mpi_datatype_t *datatype;
+ smx_mutex_t mutex;
+ smx_cond_t cond;
+ short int completed :1;
+ xbt_fifo_t waitlist;
};
typedef struct smpi_mpi_request_t smpi_mpi_request_t;
typedef smpi_mpi_request_t *MPI_Request;
};
typedef struct smpi_mpi_request_t smpi_mpi_request_t;
typedef smpi_mpi_request_t *MPI_Request;
+// smpi_received_message_t
+struct smpi_received_message_t {
+ smpi_mpi_communicator_t *comm;
+ int src;
+ int dst;
+ int tag;
+ void *buf;
+};
+typedef struct smpi_received_message_t smpi_received_message_t;
+
// MPI_Op
struct smpi_mpi_op_t {
void (*func)(void *x, void *y, void *z);
// MPI_Op
struct smpi_mpi_op_t {
void (*func)(void *x, void *y, void *z);
@@
-80,16
+95,6
@@
extern smpi_mpi_op_t smpi_mpi_land;
extern smpi_mpi_op_t smpi_mpi_sum;
#define MPI_SUM (&smpi_mpi_sum)
extern smpi_mpi_op_t smpi_mpi_sum;
#define MPI_SUM (&smpi_mpi_sum)
-// smpi_received_message_t
-struct smpi_received_message_t {
- smpi_mpi_communicator_t *comm;
- int src;
- int dst;
- int tag;
- void *data;
- int fwdthrough;
-};
-typedef struct smpi_received_message_t smpi_received_message_t;
// smpi functions
extern int smpi_simulated_main(int argc, char **argv);
// smpi functions
extern int smpi_simulated_main(int argc, char **argv);