if (comm == MPI_COMM_UNINITIALIZED)
comm = smpi_process_comm_world();
return smpi_comm_group(comm)->getsize();
+ return smpi_comm_group(this)->size();
}
int smpi_comm_rank(MPI_Comm comm)
if(origin != MPI_GROUP_NULL
&& origin != MPI_GROUP_EMPTY)
{
- m_size = origin->getsize();
+ m_size = origin->size();
m_rank_to_index_map = xbt_new(int, m_size);
m_index_to_rank_map = xbt_dict_new_homogeneous(xbt_free_f);
m_refcount = 1;
return m_refcount;
}
-int Group::getsize()
+int Group::size()
{
return m_size;
}
int i, index, rank, sz;
result = MPI_IDENT;
- if (m_size != group2->getsize()) {
+ if (m_size != group2->size()) {
result = MPI_UNEQUAL;
} else {
- sz = group2->getsize();
+ sz = group2->size();
for (i = 0; i < sz; i++) {
index = this->index(i);
rank = group2->rank(index);
int Group::group_union(MPI_Group group2, MPI_Group* newgroup)
{
int size1 = m_size;
- int size2 = group2->getsize();
+ int size2 = group2->size();
for (int i = 0; i < size2; i++) {
int proc2 = group2->index(i);
int proc1 = this->rank(proc2);
*newgroup = MPI_GROUP_EMPTY;
} else {
*newgroup = new simgrid::SMPI::Group(size1);
- size2 = this->getsize();
+ size2 = this->size();
for (int i = 0; i < size2; i++) {
int proc1 = this->index(i);
(*newgroup)->set_mapping(proc1, i);
int Group::intersection(MPI_Group group2, MPI_Group* newgroup)
{
- int size2 = group2->getsize();
+ int size2 = group2->size();
for (int i = 0; i < size2; i++) {
int proc2 = group2->index(i);
int proc1 = this->rank(proc2);
} else {
*newgroup = new simgrid::SMPI::Group(size2);
int j=0;
- for (int i = 0; i < group2->getsize(); i++) {
+ for (int i = 0; i < group2->size(); i++) {
int proc2 = group2->index(i);
int proc1 = this->rank(proc2);
if (proc1 != MPI_UNDEFINED) {
int rank(int index);
int use();
int unuse();
- int getsize();
+ int size();
int compare(MPI_Group group2);
int incl(int n, int* ranks, MPI_Group* newgroup);
int excl(int n, int *ranks, MPI_Group * newgroup);
} else if (size == nullptr) {
return MPI_ERR_ARG;
} else {
- *size = group->getsize();
+ *size = group->size();
return MPI_SUCCESS;
}
}
&& group != smpi_comm_group(MPI_COMM_SELF) && group != MPI_GROUP_EMPTY)
group->use();
return MPI_SUCCESS;
- } else if (n == group->getsize()) {
+ } else if (n == group->size()) {
*newgroup = MPI_GROUP_EMPTY;
return MPI_SUCCESS;
} else {
} else if (src == MPI_PROC_NULL) {
*request = MPI_REQUEST_NULL;
retval = MPI_SUCCESS;
- } else if (src!=MPI_ANY_SOURCE && (src >= smpi_comm_group(comm)->getsize() || src <0)){
+ } else if (src!=MPI_ANY_SOURCE && (src >= smpi_comm_group(comm)->size() || src <0)){
retval = MPI_ERR_RANK;
} else if ((count < 0) || (buf==nullptr && count > 0)) {
retval = MPI_ERR_COUNT;
} else if (dst == MPI_PROC_NULL) {
*request = MPI_REQUEST_NULL;
retval = MPI_SUCCESS;
- } else if (dst >= smpi_comm_group(comm)->getsize() || dst <0){
+ } else if (dst >= smpi_comm_group(comm)->size() || dst <0){
retval = MPI_ERR_RANK;
} else if ((count < 0) || (buf==nullptr && count > 0)) {
retval = MPI_ERR_COUNT;
} else if (dst == MPI_PROC_NULL) {
*request = MPI_REQUEST_NULL;
retval = MPI_SUCCESS;
- } else if (dst >= smpi_comm_group(comm)->getsize() || dst <0){
+ } else if (dst >= smpi_comm_group(comm)->size() || dst <0){
retval = MPI_ERR_RANK;
} else if ((count < 0)|| (buf==nullptr && count > 0)) {
retval = MPI_ERR_COUNT;
smpi_empty_status(status);
status->MPI_SOURCE = MPI_PROC_NULL;
retval = MPI_SUCCESS;
- } else if (src!=MPI_ANY_SOURCE && (src >= smpi_comm_group(comm)->getsize() || src <0)){
+ } else if (src!=MPI_ANY_SOURCE && (src >= smpi_comm_group(comm)->size() || src <0)){
retval = MPI_ERR_RANK;
} else if ((count < 0) || (buf==nullptr && count > 0)) {
retval = MPI_ERR_COUNT;
retval = MPI_ERR_COMM;
} else if (dst == MPI_PROC_NULL) {
retval = MPI_SUCCESS;
- } else if (dst >= smpi_comm_group(comm)->getsize() || dst <0){
+ } else if (dst >= smpi_comm_group(comm)->size() || dst <0){
retval = MPI_ERR_RANK;
} else if ((count < 0) || (buf == nullptr && count > 0)) {
retval = MPI_ERR_COUNT;
retval = MPI_ERR_COMM;
} else if (dst == MPI_PROC_NULL) {
retval = MPI_SUCCESS;
- } else if (dst >= smpi_comm_group(comm)->getsize() || dst <0){
+ } else if (dst >= smpi_comm_group(comm)->size() || dst <0){
retval = MPI_ERR_RANK;
} else if ((count < 0) || (buf==nullptr && count > 0)) {
retval = MPI_ERR_COUNT;
smpi_empty_status(status);
status->MPI_SOURCE = MPI_PROC_NULL;
retval = MPI_SUCCESS;
- }else if (dst >= smpi_comm_group(comm)->getsize() || dst <0 ||
- (src!=MPI_ANY_SOURCE && (src >= smpi_comm_group(comm)->getsize() || src <0))){
+ }else if (dst >= smpi_comm_group(comm)->size() || dst <0 ||
+ (src!=MPI_ANY_SOURCE && (src >= smpi_comm_group(comm)->size() || src <0))){
retval = MPI_ERR_RANK;
} else if ((sendcount < 0 || recvcount<0) ||
(sendbuf==nullptr && sendcount > 0) || (recvbuf==nullptr && recvcount>0)) {
//naive, blocking implementation.
int i = 0;
int j = 0;
- int size = group->getsize();
+ int size = group->size();
MPI_Request* reqs = xbt_new0(MPI_Request, size);
while (j != size) {
//let's make a synchronous send here
int i = 0;
int j = 0;
- int size = group->getsize();
+ int size = group->size();
MPI_Request* reqs = xbt_new0(MPI_Request, size);
while(j!=size){
XBT_DEBUG("Entering MPI_Win_Complete");
int i = 0;
int j = 0;
- int size = win->group->getsize();
+ int size = win->group->size();
MPI_Request* reqs = xbt_new0(MPI_Request, size);
while(j!=size){
//naive, blocking implementation.
XBT_DEBUG("Entering MPI_Win_Wait");
int i=0,j=0;
- int size = win->group->getsize();
+ int size = win->group->size();
MPI_Request* reqs = xbt_new0(MPI_Request, size);
while(j!=size){