double size=parse_double(action[3]);
double clock = smpi_process()->simulated_elapsed();
- if(action[4])
- MPI_CURRENT_TYPE=decode_datatype(action[4]);
- else
- MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
+ MPI_CURRENT_TYPE = (action[4]) ? decode_datatype(action[4]) : MPI_DEFAULT_TYPE;
int my_proc_id = Actor::self()->getPid();
int dst_traced = MPI_COMM_WORLD->group()->actor(to)->getPid();
double size=parse_double(action[3]);
double clock = smpi_process()->simulated_elapsed();
- if(action[4])
- MPI_CURRENT_TYPE=decode_datatype(action[4]);
- else
- MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
+ MPI_CURRENT_TYPE = (action[4]) ? decode_datatype(action[4]) : MPI_DEFAULT_TYPE;
int my_proc_id = Actor::self()->getPid();
int dst_traced = MPI_COMM_WORLD->group()->actor(to)->getPid();
double clock = smpi_process()->simulated_elapsed();
MPI_Status status;
- if(action[4])
- MPI_CURRENT_TYPE=decode_datatype(action[4]);
- else
- MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
+ MPI_CURRENT_TYPE = (action[4]) ? decode_datatype(action[4]) : MPI_DEFAULT_TYPE;
int my_proc_id = Actor::self()->getPid();
int src_traced = MPI_COMM_WORLD->group()->actor(from)->getPid();
double size=parse_double(action[3]);
double clock = smpi_process()->simulated_elapsed();
- if(action[4])
- MPI_CURRENT_TYPE=decode_datatype(action[4]);
- else
- MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
+ MPI_CURRENT_TYPE = (action[4]) ? decode_datatype(action[4]) : MPI_DEFAULT_TYPE;
int my_proc_id = Actor::self()->getPid();
TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
CHECK_ACTION_PARAMS(action, 1, 2)
double size = parse_double(action[2]);
double clock = smpi_process()->simulated_elapsed();
- int root=0;
+ int root = (action[3]) ? atoi(action[3]) : 0;
/* Initialize MPI_CURRENT_TYPE in order to decrease the number of the checks */
MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
- if(action[3]) {
- root= atoi(action[3]);
- if(action[4])
- MPI_CURRENT_TYPE=decode_datatype(action[4]);
- }
+ MPI_CURRENT_TYPE = (action[3] && action[4]) ? decode_datatype(action[4]) : MPI_DEFAULT_TYPE;
int my_proc_id = Actor::self()->getPid();
TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
double comm_size = parse_double(action[2]);
double comp_size = parse_double(action[3]);
double clock = smpi_process()->simulated_elapsed();
- int root=0;
- MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
+ int root = (action[4]) ? atoi(action[4]) : 0;
- if(action[4]) {
- root= atoi(action[4]);
- if(action[5])
- MPI_CURRENT_TYPE=decode_datatype(action[5]);
- }
+ MPI_CURRENT_TYPE = (action[4] && action[5]) ? decode_datatype(action[5]) : MPI_DEFAULT_TYPE;
int my_proc_id = Actor::self()->getPid();
TRACE_smpi_comm_in(my_proc_id, __FUNCTION__,
double comm_size = parse_double(action[2]);
double comp_size = parse_double(action[3]);
- if(action[4])
- MPI_CURRENT_TYPE=decode_datatype(action[4]);
- else
- MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
+ MPI_CURRENT_TYPE = (action[4]) ? decode_datatype(action[4]) : MPI_DEFAULT_TYPE;
double clock = smpi_process()->simulated_elapsed();
int my_proc_id = Actor::self()->getPid();
int comm_size = MPI_COMM_WORLD->size();
int send_size = parse_double(action[2]);
int recv_size = parse_double(action[3]);
- MPI_Datatype MPI_CURRENT_TYPE2 = MPI_DEFAULT_TYPE;
-
- if(action[4] && action[5]) {
- MPI_CURRENT_TYPE=decode_datatype(action[4]);
- MPI_CURRENT_TYPE2=decode_datatype(action[5]);
- }
- else
- MPI_CURRENT_TYPE=MPI_DEFAULT_TYPE;
+ MPI_CURRENT_TYPE = (action[4] && action[5]) ? decode_datatype(action[4]) : MPI_DEFAULT_TYPE;
+ MPI_Datatype MPI_CURRENT_TYPE2{(action[4] && action[5]) ? decode_datatype(action[5]) : MPI_DEFAULT_TYPE};
void *send = smpi_get_tmp_sendbuffer(send_size*comm_size* MPI_CURRENT_TYPE->size());
void *recv = smpi_get_tmp_recvbuffer(recv_size*comm_size* MPI_CURRENT_TYPE2->size());
int comm_size = MPI_COMM_WORLD->size();
int send_size = parse_double(action[2]);
int recv_size = parse_double(action[3]);
- MPI_Datatype MPI_CURRENT_TYPE2 = MPI_DEFAULT_TYPE;
- if(action[4] && action[5]) {
- MPI_CURRENT_TYPE=decode_datatype(action[5]);
- MPI_CURRENT_TYPE2=decode_datatype(action[6]);
- } else {
- MPI_CURRENT_TYPE=MPI_DEFAULT_TYPE;
- }
+ MPI_CURRENT_TYPE = (action[5] && action[6]) ? decode_datatype(action[5]) : MPI_DEFAULT_TYPE;
+ MPI_Datatype MPI_CURRENT_TYPE2{(action[5] && action[6]) ? decode_datatype(action[6]) : MPI_DEFAULT_TYPE};
+
void *send = smpi_get_tmp_sendbuffer(send_size* MPI_CURRENT_TYPE->size());
void *recv = nullptr;
- int root=0;
- if(action[4])
- root=atoi(action[4]);
+ int root = (action[4]) ? atoi(action[4]) : 0;
int rank = MPI_COMM_WORLD->rank();
if(rank==root)
int comm_size = MPI_COMM_WORLD->size();
int send_size = parse_double(action[2]);
int recv_size = parse_double(action[3]);
- MPI_Datatype MPI_CURRENT_TYPE2 = MPI_DEFAULT_TYPE;
- if (action[4] && action[5]) {
- MPI_CURRENT_TYPE = decode_datatype(action[5]);
- MPI_CURRENT_TYPE2 = decode_datatype(action[6]);
- } else {
- MPI_CURRENT_TYPE = MPI_DEFAULT_TYPE;
- }
+ MPI_CURRENT_TYPE = (action[5] && action[6]) ? decode_datatype(action[5]) : MPI_DEFAULT_TYPE;
+ MPI_Datatype MPI_CURRENT_TYPE2{(action[5] && action[6]) ? decode_datatype(action[6]) : MPI_DEFAULT_TYPE};
+
void* send = smpi_get_tmp_sendbuffer(send_size * MPI_CURRENT_TYPE->size());
void* recv = nullptr;
- int root = 0;
- if (action[4])
- root = atoi(action[4]);
+ int root = (action[4]) ? atoi(action[4]) : 0;
int rank = MPI_COMM_WORLD->rank();
if (rank == root)
int recvcounts[comm_size];
int recv_sum=0;
- MPI_Datatype MPI_CURRENT_TYPE2 = MPI_DEFAULT_TYPE;
- if(action[4+comm_size] && action[5+comm_size]) {
- MPI_CURRENT_TYPE=decode_datatype(action[4+comm_size]);
- MPI_CURRENT_TYPE2=decode_datatype(action[5+comm_size]);
- } else
- MPI_CURRENT_TYPE=MPI_DEFAULT_TYPE;
+ MPI_CURRENT_TYPE =
+ (action[4 + comm_size] && action[5 + comm_size]) ? decode_datatype(action[4 + comm_size]) : MPI_DEFAULT_TYPE;
+ MPI_Datatype MPI_CURRENT_TYPE2{
+ (action[4 + comm_size] && action[5 + comm_size]) ? decode_datatype(action[5 + comm_size]) : MPI_DEFAULT_TYPE};
void *send = smpi_get_tmp_sendbuffer(send_size* MPI_CURRENT_TYPE->size());
void *recv = nullptr;
disps[i]=0;
}
- int root=atoi(action[3+comm_size]);
+ int root = (action[3 + comm_size]) ? atoi(action[3 + comm_size]) : 0;
int rank = MPI_COMM_WORLD->rank();
if(rank==root)
int sendcounts[comm_size];
int send_sum = 0;
- MPI_Datatype MPI_CURRENT_TYPE2 = MPI_DEFAULT_TYPE;
- if (action[4 + comm_size] && action[5 + comm_size]) {
- MPI_CURRENT_TYPE = decode_datatype(action[4 + comm_size]);
- MPI_CURRENT_TYPE2 = decode_datatype(action[5 + comm_size]);
- } else
- MPI_CURRENT_TYPE = MPI_DEFAULT_TYPE;
+ MPI_CURRENT_TYPE =
+ (action[4 + comm_size] && action[5 + comm_size]) ? decode_datatype(action[4 + comm_size]) : MPI_DEFAULT_TYPE;
+ MPI_Datatype MPI_CURRENT_TYPE2{
+ (action[4 + comm_size] && action[5 + comm_size]) ? decode_datatype(action[5 + comm_size]) : MPI_DEFAULT_TYPE};
void* send = nullptr;
void* recv = smpi_get_tmp_recvbuffer(recv_size * MPI_CURRENT_TYPE->size());
disps[i] = 0;
}
- int root = atoi(action[3 + comm_size]);
+ int root = (action[3 + comm_size]) ? atoi(action[3 + comm_size]) : 0;
int rank = MPI_COMM_WORLD->rank();
if (rank == root)
int my_proc_id = Actor::self()->getPid();
int size = 0;
std::vector<int>* trace_recvcounts = new std::vector<int>;
- if(action[3+comm_size])
- MPI_CURRENT_TYPE=decode_datatype(action[3+comm_size]);
- else
- MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
+ MPI_CURRENT_TYPE = (action[3 + comm_size]) ? decode_datatype(action[3 + comm_size]) : MPI_DEFAULT_TYPE;
for(int i=0;i<comm_size;i++) {
recvcounts[i] = atoi(action[i+2]);
int sendcount=atoi(action[2]);
int recvcount=atoi(action[3]);
- MPI_Datatype MPI_CURRENT_TYPE2 = MPI_DEFAULT_TYPE;
-
- if(action[4] && action[5]) {
- MPI_CURRENT_TYPE = decode_datatype(action[4]);
- MPI_CURRENT_TYPE2 = decode_datatype(action[5]);
- } else
- MPI_CURRENT_TYPE = MPI_DEFAULT_TYPE;
+ MPI_CURRENT_TYPE = (action[4] && action[5]) ? decode_datatype(action[4]) : MPI_DEFAULT_TYPE;
+ MPI_Datatype MPI_CURRENT_TYPE2{(action[4] && action[5]) ? decode_datatype(action[5]) : MPI_DEFAULT_TYPE};
void *sendbuf = smpi_get_tmp_sendbuffer(sendcount* MPI_CURRENT_TYPE->size());
void *recvbuf = smpi_get_tmp_recvbuffer(recvcount* MPI_CURRENT_TYPE2->size());
int recvcounts[comm_size];
int disps[comm_size];
int recv_sum=0;
- MPI_Datatype MPI_CURRENT_TYPE2 = MPI_DEFAULT_TYPE;
- if(action[3+comm_size] && action[4+comm_size]) {
- MPI_CURRENT_TYPE = decode_datatype(action[3+comm_size]);
- MPI_CURRENT_TYPE2 = decode_datatype(action[4+comm_size]);
- } else
- MPI_CURRENT_TYPE = MPI_DEFAULT_TYPE;
+ MPI_CURRENT_TYPE =
+ (action[3 + comm_size] && action[4 + comm_size]) ? decode_datatype(action[3 + comm_size]) : MPI_DEFAULT_TYPE;
+ MPI_Datatype MPI_CURRENT_TYPE2{
+ (action[3 + comm_size] && action[4 + comm_size]) ? decode_datatype(action[4 + comm_size]) : MPI_DEFAULT_TYPE};
void *sendbuf = smpi_get_tmp_sendbuffer(sendcount* MPI_CURRENT_TYPE->size());
int senddisps[comm_size];
int recvdisps[comm_size];
- MPI_Datatype MPI_CURRENT_TYPE2 = MPI_DEFAULT_TYPE;
+ MPI_CURRENT_TYPE = (action[4 + 2 * comm_size] && action[5 + 2 * comm_size])
+ ? decode_datatype(action[4 + 2 * comm_size])
+ : MPI_DEFAULT_TYPE;
+ MPI_Datatype MPI_CURRENT_TYPE2{(action[4 + 2 * comm_size] && action[5 + 2 * comm_size])
+ ? decode_datatype(action[5 + 2 * comm_size])
+ : MPI_DEFAULT_TYPE};
int send_buf_size=parse_double(action[2]);
int recv_buf_size=parse_double(action[3+comm_size]);
- if(action[4+2*comm_size] && action[5+2*comm_size]) {
- MPI_CURRENT_TYPE=decode_datatype(action[4+2*comm_size]);
- MPI_CURRENT_TYPE2=decode_datatype(action[5+2*comm_size]);
- }
- else
- MPI_CURRENT_TYPE=MPI_DEFAULT_TYPE;
-
int my_proc_id = Actor::self()->getPid();
void *sendbuf = smpi_get_tmp_sendbuffer(send_buf_size* MPI_CURRENT_TYPE->size());
void *recvbuf = smpi_get_tmp_recvbuffer(recv_buf_size* MPI_CURRENT_TYPE2->size());