return retval;
}
+int PMPI_Type_size_x(MPI_Datatype datatype, MPI_Count *size)
+{
+ int retval = 0;
+
+ if (datatype == MPI_DATATYPE_NULL) {
+ retval = MPI_ERR_TYPE;
+ } else if (size == nullptr) {
+ retval = MPI_ERR_ARG;
+ } else {
+ *size = static_cast<MPI_Count>(smpi_datatype_size(datatype));
+ retval = MPI_SUCCESS;
+ }
+ return retval;
+}
+
int PMPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint * lb, MPI_Aint * extent)
{
int retval = 0;
} else {
if (n == 0) {
*newgroup = group;
- if(group!= smpi_comm_group(MPI_COMM_WORLD) && group != MPI_GROUP_NULL
+ if (group != smpi_comm_group(MPI_COMM_WORLD)
&& group != smpi_comm_group(MPI_COMM_SELF) && group != MPI_GROUP_EMPTY)
smpi_group_use(group);
} else if (n == smpi_group_size(group)) {
} else {
if (n == 0) {
*newgroup = group;
- if(group!= smpi_comm_group(MPI_COMM_WORLD) && group != MPI_GROUP_NULL
+ if (group!= smpi_comm_group(MPI_COMM_WORLD)
&& group != smpi_comm_group(MPI_COMM_SELF) && group != MPI_GROUP_EMPTY)
smpi_group_use(group);
} else {
smpi_empty_status(status);
retval = MPI_SUCCESS;
} else {
- int rank = (request!=nullptr && (*request)->comm != MPI_COMM_NULL) ? smpi_process_index() : -1;
+ int rank = ((*request)->comm != MPI_COMM_NULL) ? smpi_process_index() : -1;
instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
extra->type = TRACING_TEST;
if (comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
} else {
- int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
- instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
- extra->type = TRACING_BARRIER;
- TRACE_smpi_collective_in(rank, -1, __FUNCTION__, extra);
+ int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
+ instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
+ extra->type = TRACING_BARRIER;
+ TRACE_smpi_collective_in(rank, -1, __FUNCTION__, extra);
- mpi_coll_barrier_fun(comm);
- retval = MPI_SUCCESS;
+ mpi_coll_barrier_fun(comm);
+ retval = MPI_SUCCESS;
- TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
+ TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
}
smpi_bench_begin();