//allocate a single buffer for all sends, growing it if needed
void* smpi_get_tmp_sendbuffer(int size)
{
- if (!smpi_process()->replaying())
+ if (not smpi_process()->replaying())
return xbt_malloc(size);
if (sendbuffer_size<size){
sendbuffer=static_cast<char*>(xbt_realloc(sendbuffer,size));
//allocate a single buffer for all recv
void* smpi_get_tmp_recvbuffer(int size){
- if (!smpi_process()->replaying())
+ if (not smpi_process()->replaying())
return xbt_malloc(size);
if (recvbuffer_size<size){
recvbuffer=static_cast<char*>(xbt_realloc(recvbuffer,size));
}
void smpi_free_tmp_buffer(void* buf){
- if (!smpi_process()->replaying())
+ if (not smpi_process()->replaying())
xbt_free(buf);
}
{
XBT_DEBUG("Initialize the counters");
CHECK_ACTION_PARAMS(action, 0, 1)
- if(action[2])
- MPI_DEFAULT_TYPE=MPI_DOUBLE; // default MPE dataype
+ if(action[2])
+ MPI_DEFAULT_TYPE=MPI_DOUBLE; // default MPE dataype
else MPI_DEFAULT_TYPE= MPI_BYTE; // default TAU datatype
/* start a simulated timer */
extra->dst = dst_traced;
extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, nullptr);
TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);
- if (!TRACE_smpi_view_internals())
+ if (not TRACE_smpi_view_internals())
TRACE_smpi_send(rank, rank, dst_traced, 0, size*MPI_CURRENT_TYPE->size());
Request::send(nullptr, size, MPI_CURRENT_TYPE, to , 0, MPI_COMM_WORLD);
double size=parse_double(action[3]);
double clock = smpi_process()->simulated_elapsed();
- if(action[4])
+ if(action[4])
MPI_CURRENT_TYPE=decode_datatype(action[4]);
- else
+ else
MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
int rank = smpi_process()->index();
extra->dst = dst_traced;
extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, nullptr);
TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);
- if (!TRACE_smpi_view_internals())
+ if (not TRACE_smpi_view_internals())
TRACE_smpi_send(rank, rank, dst_traced, 0, size*MPI_CURRENT_TYPE->size());
MPI_Request request = Request::isend(nullptr, size, MPI_CURRENT_TYPE, to, 0,MPI_COMM_WORLD);
double clock = smpi_process()->simulated_elapsed();
MPI_Status status;
- if(action[4])
+ if(action[4])
MPI_CURRENT_TYPE=decode_datatype(action[4]);
- else
+ else
MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
int rank = smpi_process()->index();
Request::recv(nullptr, size, MPI_CURRENT_TYPE, from, 0, MPI_COMM_WORLD, &status);
TRACE_smpi_ptp_out(rank, src_traced, rank, __FUNCTION__);
- if (!TRACE_smpi_view_internals()) {
+ if (not TRACE_smpi_view_internals()) {
TRACE_smpi_recv(rank, src_traced, rank, 0);
}
double size=parse_double(action[3]);
double clock = smpi_process()->simulated_elapsed();
- if(action[4])
+ if(action[4])
MPI_CURRENT_TYPE=decode_datatype(action[4]);
- else
+ else
MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
int rank = smpi_process()->index();
MPI_Request request = get_reqq_self()->back();
get_reqq_self()->pop_back();
- //if request is null here, this may mean that a previous test has succeeded
- //Different times in traced application and replayed version may lead to this
+ //if request is null here, this may mean that a previous test has succeeded
+ //Different times in traced application and replayed version may lead to this
//In this case, ignore the extra calls.
if(request!=nullptr){
int rank = smpi_process()->index();
double clock = smpi_process()->simulated_elapsed();
int root=0;
/* Initialize MPI_CURRENT_TYPE in order to decrease the number of the checks */
- MPI_CURRENT_TYPE= MPI_DEFAULT_TYPE;
+ 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=decode_datatype(action[4]);
}
int rank = smpi_process()->index();
double clock = smpi_process()->simulated_elapsed();
CHECK_ACTION_PARAMS(action, 2, 2)
- int sendcount=atoi(action[2]);
- int recvcount=atoi(action[3]);
+ int sendcount=atoi(action[2]);
+ int recvcount=atoi(action[3]);
MPI_Datatype MPI_CURRENT_TYPE2 = MPI_DEFAULT_TYPE;
/* and now, finalize everything */
/* One active process will stop. Decrease the counter*/
XBT_DEBUG("There are %zu elements in reqq[*]", get_reqq_self()->size());
- if (!get_reqq_self()->empty()){
+ if (not get_reqq_self()->empty()) {
unsigned int count_requests=get_reqq_self()->size();
MPI_Request requests[count_requests];
MPI_Status status[count_requests];