Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

change default value of MPI_Datatype from NULL to 0

  • Loading branch information...
commit a47521894bbf5c0412d0bac7f431ffbc26c5f650 1 parent 39d25d4
Seiya Nishizawa authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 ext/mpi/mpi.c
6 ext/mpi/mpi.c
View
@@ -372,7 +372,7 @@ rb_comm_gather(VALUE self, VALUE rb_sendbuf, VALUE rb_recvbuf, VALUE rb_root)
{
void *sendbuf, *recvbuf = NULL;
int sendcount, recvcount = 0;
- MPI_Datatype sendtype, recvtype = NULL;
+ MPI_Datatype sendtype, recvtype = 0;
int root, rank, size;
struct _Comm *comm;
OBJ2C(rb_sendbuf, sendcount, sendbuf, sendtype);
@@ -427,7 +427,7 @@ rb_comm_scatter(VALUE self, VALUE rb_sendbuf, VALUE rb_recvbuf, VALUE rb_root)
{
void *sendbuf = NULL, *recvbuf;
int sendcount = 0, recvcount;
- MPI_Datatype sendtype = NULL, recvtype;
+ MPI_Datatype sendtype = 0, recvtype;
int root, rank, size;
struct _Comm *comm;
OBJ2C(rb_recvbuf, recvcount, recvbuf, recvtype);
@@ -491,7 +491,7 @@ rb_comm_reduce(VALUE self, VALUE rb_sendbuf, VALUE rb_recvbuf, VALUE rb_op, VALU
{
void *sendbuf, *recvbuf = NULL;
int sendcount, recvcount = 0;
- MPI_Datatype sendtype, recvtype = NULL;
+ MPI_Datatype sendtype, recvtype = 0;
int root, rank, size;
struct _Comm *comm;
struct _Op *op;
Please sign in to comment.
Something went wrong with that request. Please try again.