int PMPI_Get_library_version (char *version,int *len){
int retval = MPI_SUCCESS;
smpi_bench_end();
- snprintf(version,MPI_MAX_LIBRARY_VERSION_STRING,"SMPI Version %d.%d. Copyright The Simgrid Team 2007-2013",SIMGRID_VERSION_MAJOR,
+ snprintf(version,MPI_MAX_LIBRARY_VERSION_STRING,"SMPI Version %d.%d. Copyright The Simgrid Team 2007-2014",SIMGRID_VERSION_MAJOR,
SIMGRID_VERSION_MINOR);
*len = strlen(version) > MPI_MAX_LIBRARY_VERSION_STRING ? MPI_MAX_LIBRARY_VERSION_STRING : strlen(version);
smpi_bench_begin();
{
int retval = 0;
- smpi_bench_end();
if (provided == NULL) {
retval = MPI_ERR_ARG;
} else {
*provided = MPI_THREAD_MULTIPLE;
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (flag == NULL) {
retval = MPI_ERR_ARG;
} else {
*flag = smpi_process_index() == 0;
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (!address) {
retval = MPI_ERR_ARG;
} else {
*address = (MPI_Aint) location;
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (!datatype) {
retval = MPI_ERR_ARG;
} else {
smpi_datatype_free(datatype);
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (datatype == MPI_DATATYPE_NULL) {
retval = MPI_ERR_TYPE;
} else if (size == NULL) {
*size = (int) smpi_datatype_size(datatype);
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (datatype == MPI_DATATYPE_NULL) {
retval = MPI_ERR_TYPE;
} else if (lb == NULL || extent == NULL) {
} else {
retval = smpi_datatype_extent(datatype, lb, extent);
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (datatype == MPI_DATATYPE_NULL) {
retval = MPI_ERR_TYPE;
} else if (extent == NULL) {
*extent = smpi_datatype_get_extent(datatype);
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (datatype == MPI_DATATYPE_NULL) {
retval = MPI_ERR_TYPE;
} else if (disp == NULL) {
*disp = smpi_datatype_lb(datatype);
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (datatype == MPI_DATATYPE_NULL) {
retval = MPI_ERR_TYPE;
} else if (disp == NULL) {
*disp = smpi_datatype_ub(datatype);
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (function == NULL || op == NULL) {
retval = MPI_ERR_ARG;
} else {
*op = smpi_op_new(function, commute);
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (op == NULL) {
retval = MPI_ERR_ARG;
} else if (*op == MPI_OP_NULL) {
*op = MPI_OP_NULL;
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (group == NULL) {
retval = MPI_ERR_ARG;
} else {
*group = MPI_GROUP_NULL;
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (group == MPI_GROUP_NULL) {
retval = MPI_ERR_GROUP;
} else if (size == NULL) {
*size = smpi_group_size(group);
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (group == MPI_GROUP_NULL) {
retval = MPI_ERR_GROUP;
} else if (rank == NULL) {
*rank = smpi_group_rank(group, smpi_process_index());
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
MPI_Group group2, int *ranks2)
{
int retval, i, index;
- smpi_bench_end();
if (group1 == MPI_GROUP_NULL || group2 == MPI_GROUP_NULL) {
retval = MPI_ERR_GROUP;
} else {
}
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (group1 == MPI_GROUP_NULL || group2 == MPI_GROUP_NULL) {
retval = MPI_ERR_GROUP;
} else if (result == NULL) {
*result = smpi_group_compare(group1, group2);
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval, i, proc1, proc2, size, size2;
- smpi_bench_end();
if (group1 == MPI_GROUP_NULL || group2 == MPI_GROUP_NULL) {
retval = MPI_ERR_GROUP;
} else if (newgroup == NULL) {
}
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval, i, proc1, proc2, size;
- smpi_bench_end();
if (group1 == MPI_GROUP_NULL || group2 == MPI_GROUP_NULL) {
retval = MPI_ERR_GROUP;
} else if (newgroup == NULL) {
}
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval, i, proc1, proc2, size, size2;
- smpi_bench_end();
if (group1 == MPI_GROUP_NULL || group2 == MPI_GROUP_NULL) {
retval = MPI_ERR_GROUP;
} else if (newgroup == NULL) {
}
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval, i, index;
- smpi_bench_end();
if (group == MPI_GROUP_NULL) {
retval = MPI_ERR_GROUP;
} else if (newgroup == NULL) {
}
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval, i, j, newsize, oldsize, index;
- smpi_bench_end();
if (group == MPI_GROUP_NULL) {
retval = MPI_ERR_GROUP;
} else if (newgroup == NULL) {
}
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval, i, j, rank, size, index;
- smpi_bench_end();
if (group == MPI_GROUP_NULL) {
retval = MPI_ERR_GROUP;
} else if (newgroup == NULL) {
}
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval, i, rank, newrank,oldrank, size, index, add;
- smpi_bench_end();
if (group == MPI_GROUP_NULL) {
retval = MPI_ERR_GROUP;
} else if (newgroup == NULL) {
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
int PMPI_Comm_rank(MPI_Comm comm, int *rank)
{
int retval = 0;
-
- smpi_bench_end();
if (comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
} else if (rank == NULL) {
*rank = smpi_comm_rank(comm);
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
int PMPI_Comm_size(MPI_Comm comm, int *size)
{
int retval = 0;
-
- smpi_bench_end();
if (comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
} else if (size == NULL) {
*size = smpi_comm_size(comm);
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
} else if (name == NULL || len == NULL) {
smpi_comm_get_name(comm, name, len);
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
} else if (group == NULL) {
smpi_group_use(*group);
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (comm1 == MPI_COMM_NULL || comm2 == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
} else if (result == NULL) {
}
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
} else if (newcomm == NULL) {
*newcomm = smpi_comm_new(smpi_comm_group(comm));
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (comm == MPI_COMM_NULL) {
retval = MPI_ERR_COMM;
} else if (group == MPI_GROUP_NULL) {
*newcomm = smpi_comm_new(group);
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
{
int retval = 0;
- smpi_bench_end();
if (comm == NULL) {
retval = MPI_ERR_ARG;
} else if (*comm == MPI_COMM_NULL) {
*comm = MPI_COMM_NULL;
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
/* TODO: wait until all communication in comm are done */
int retval = 0;
- smpi_bench_end();
if (comm == NULL) {
retval = MPI_ERR_ARG;
} else if (*comm == MPI_COMM_NULL) {
*comm = MPI_COMM_NULL;
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
int PMPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm* comm_out)
{
int retval = 0;
-
smpi_bench_end();
+
if (comm_out == NULL) {
retval = MPI_ERR_ARG;
} else if (comm == MPI_COMM_NULL) {
retval = MPI_SUCCESS;
}
smpi_bench_begin();
+
return retval;
}
if (*request == MPI_REQUEST_NULL) {
retval = MPI_ERR_ARG;
} else {
- if((*request)->flags & PERSISTENT)(*request)->refcount--;
smpi_mpi_request_free(request);
retval = MPI_SUCCESS;
}
{
int retval = MPI_SUCCESS;
- smpi_bench_end();
strncpy(name, SIMIX_host_get_name(SIMIX_host_self()),
strlen(SIMIX_host_get_name(SIMIX_host_self())) < MPI_MAX_PROCESSOR_NAME - 1 ?
strlen(SIMIX_host_get_name(SIMIX_host_self())) +1 :
strlen(name) >
MPI_MAX_PROCESSOR_NAME ? MPI_MAX_PROCESSOR_NAME : strlen(name);
- smpi_bench_begin();
return retval;
}
int retval = MPI_SUCCESS;
size_t size;
- smpi_bench_end();
if (status == NULL || count == NULL) {
retval = MPI_ERR_ARG;
} else if (datatype == MPI_DATATYPE_NULL) {
*count = smpi_mpi_get_count(status, datatype);
}
}
- smpi_bench_begin();
return retval;
}
int PMPI_Type_contiguous(int count, MPI_Datatype old_type, MPI_Datatype* new_type) {
int retval = 0;
- smpi_bench_end();
if (old_type == MPI_DATATYPE_NULL) {
retval = MPI_ERR_TYPE;
} else if (count<0){
} else {
retval = smpi_datatype_contiguous(count, old_type, new_type, 0);
}
- smpi_bench_begin();
return retval;
}
int PMPI_Type_commit(MPI_Datatype* datatype) {
int retval = 0;
- smpi_bench_end();
if (datatype == NULL || *datatype == MPI_DATATYPE_NULL) {
retval = MPI_ERR_TYPE;
} else {
smpi_datatype_commit(datatype);
retval = MPI_SUCCESS;
}
- smpi_bench_begin();
return retval;
}
int PMPI_Type_vector(int count, int blocklen, int stride, MPI_Datatype old_type, MPI_Datatype* new_type) {
int retval = 0;
- smpi_bench_end();
if (old_type == MPI_DATATYPE_NULL) {
retval = MPI_ERR_TYPE;
} else if (count<0 || blocklen<0){
} else {
retval = smpi_datatype_vector(count, blocklen, stride, old_type, new_type);
}
- smpi_bench_begin();
return retval;
}
int PMPI_Type_hvector(int count, int blocklen, MPI_Aint stride, MPI_Datatype old_type, MPI_Datatype* new_type) {
int retval = 0;
- smpi_bench_end();
if (old_type == MPI_DATATYPE_NULL) {
retval = MPI_ERR_TYPE;
} else if (count<0 || blocklen<0){
} else {
retval = smpi_datatype_hvector(count, blocklen, stride, old_type, new_type);
}
- smpi_bench_begin();
return retval;
}
int PMPI_Type_indexed(int count, int* blocklens, int* indices, MPI_Datatype old_type, MPI_Datatype* new_type) {
int retval = 0;
- smpi_bench_end();
if (old_type == MPI_DATATYPE_NULL) {
retval = MPI_ERR_TYPE;
} else if (count<0){
} else {
retval = smpi_datatype_indexed(count, blocklens, indices, old_type, new_type);
}
- smpi_bench_begin();
return retval;
}
int PMPI_Type_create_indexed(int count, int* blocklens, int* indices, MPI_Datatype old_type, MPI_Datatype* new_type) {
int retval = 0;
- smpi_bench_end();
if (old_type == MPI_DATATYPE_NULL) {
retval = MPI_ERR_TYPE;
} else if (count<0){
} else {
retval = smpi_datatype_indexed(count, blocklens, indices, old_type, new_type);
}
- smpi_bench_begin();
return retval;
}
int PMPI_Type_create_indexed_block(int count, int blocklength, int* indices, MPI_Datatype old_type, MPI_Datatype* new_type) {
int retval,i;
- smpi_bench_end();
if (old_type == MPI_DATATYPE_NULL) {
retval = MPI_ERR_TYPE;
} else if (count<0){
retval = smpi_datatype_indexed(count, blocklens, indices, old_type, new_type);
xbt_free(blocklens);
}
- smpi_bench_begin();
return retval;
}
int PMPI_Type_hindexed(int count, int* blocklens, MPI_Aint* indices, MPI_Datatype old_type, MPI_Datatype* new_type) {
int retval = 0;
- smpi_bench_end();
if (old_type == MPI_DATATYPE_NULL) {
retval = MPI_ERR_TYPE;
} else if (count<0){
} else {
retval = smpi_datatype_hindexed(count, blocklens, indices, old_type, new_type);
}
- smpi_bench_begin();
return retval;
}
int PMPI_Type_create_hindexed_block(int count, int blocklength, MPI_Aint* indices, MPI_Datatype old_type, MPI_Datatype* new_type) {
int retval,i;
- smpi_bench_end();
if (old_type == MPI_DATATYPE_NULL) {
retval = MPI_ERR_TYPE;
} else if (count<0){
retval = smpi_datatype_hindexed(count, blocklens, indices, old_type, new_type);
xbt_free(blocklens);
}
- smpi_bench_begin();
return retval;
}
int PMPI_Type_struct(int count, int* blocklens, MPI_Aint* indices, MPI_Datatype* old_types, MPI_Datatype* new_type) {
int retval = 0;
- smpi_bench_end();
if (count<0){
retval = MPI_ERR_COUNT;
} else {
retval = smpi_datatype_struct(count, blocklens, indices, old_types, new_type);
}
- smpi_bench_begin();
return retval;
}