double reference_speed;
// state vars
-
- smx_host_t *hosts;
- int host_count;
+ int process_count;
xbt_mallocator_t request_mallocator;
xbt_mallocator_t message_mallocator;
- // FIXME: request queues should be moved to host data...
- xbt_fifo_t *pending_send_request_queues;
- xbt_fifo_t *received_message_queues;
-
smx_process_t *main_processes;
- smx_process_t *sender_processes;
- smx_process_t *receiver_processes;
-
- int running_hosts_count;
xbt_os_timer_t timer;
smx_mutex_t timer_mutex;
smx_process_t sender;
smx_process_t receiver;
+ int finalize; /* so that main process stops its sender&receiver */
+
xbt_fifo_t pending_recv_request_queue;
-} s_smpi_host_data_t;
-typedef struct smpi_host_data_t *smpi_host_data_t;
+ xbt_fifo_t pending_send_request_queue;
+ xbt_fifo_t received_message_queue;
+} s_smpi_process_data_t;
+typedef struct smpi_host_data_t *smpi_process_data_t;
// function prototypes
-void smpi_process_init(void);
+void smpi_process_init(int *argc,char ***argv);
void smpi_process_finalize(void);
int smpi_mpi_comm_rank(smpi_mpi_communicator_t comm);
void smpi_global_init(void);
void smpi_global_destroy(void);
-int smpi_host_index(void);
-smx_mutex_t smpi_host_mutex(void);
-smx_cond_t smpi_host_cond(void);
+int smpi_process_index(void);
+smx_mutex_t smpi_process_mutex(void);
+smx_cond_t smpi_process_cond(void);
int smpi_run_simulation(int *argc, char **argv);
int smpi_create_request(void *buf, int count, smpi_mpi_datatype_t datatype,
int src, int dst, int tag,