Blame test/mpi/errors/comm/comm_group_nullarg.c
|
Packit Service |
c5cf8c |
#include <mpi.h>
|
|
Packit Service |
c5cf8c |
#include <stdio.h>
|
|
Packit Service |
c5cf8c |
#include "mpitest.h"
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
int main(int argc, char *argv[])
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int errs = 0, errclass, mpi_errno;
|
|
Packit Service |
c5cf8c |
int rank, size;
|
|
Packit Service |
c5cf8c |
MPI_Comm dup_comm;
|
|
Packit Service |
c5cf8c |
MPI_Group group;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
MTest_Init(&argc, &argv);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
MPI_Comm_rank(MPI_COMM_WORLD, &rank;;
|
|
Packit Service |
c5cf8c |
MPI_Comm_size(MPI_COMM_WORLD, &size);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
|
|
Packit Service |
c5cf8c |
MPI_Comm_dup(MPI_COMM_WORLD, &dup_comm);
|
|
Packit Service |
c5cf8c |
MPI_Comm_group(dup_comm, &group);
|
|
Packit Service |
c5cf8c |
MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/*test comm_group for NULL variable */
|
|
Packit Service |
c5cf8c |
mpi_errno = MPI_Comm_group(dup_comm, NULL);
|
|
Packit Service |
c5cf8c |
MPI_Error_class(mpi_errno, &errclass);
|
|
Packit Service |
c5cf8c |
if (errclass != MPI_ERR_ARG)
|
|
Packit Service |
c5cf8c |
++errs;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
MPI_Comm_free(&dup_comm);
|
|
Packit Service |
c5cf8c |
MPI_Group_free(&group);
|
|
Packit Service |
c5cf8c |
MTest_Finalize(errs);
|
|
Packit Service |
c5cf8c |
return 0;
|
|
Packit Service |
c5cf8c |
}
|