[Pvfs2-cvs] commit by pw in pvfs2/test/posix: openg-mpi.c
CVS commit program
cvs at parl.clemson.edu
Thu Dec 7 16:47:22 EST 2006
Update of /projects/cvsroot/pvfs2/test/posix
In directory parlweb1:/tmp/cvs-serv3878/test/posix
Modified Files:
openg-mpi.c
Log Message:
gcc does not like type punned pointers
Index: openg-mpi.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/posix/openg-mpi.c,v
diff -u -p -p -u -r1.3 -r1.4
--- openg-mpi.c 3 Dec 2006 03:54:42 -0000 1.3
+++ openg-mpi.c 7 Dec 2006 21:47:22 -0000 1.4
@@ -103,7 +103,6 @@ int main(int argc, char *argv[])
{
int c, fd, err;
int i, rank, np, do_unlink = 0, do_create = 0;
- size_t len;
char opt[] = "n:f:cu", *fname = NULL;
double begin_openg, end_openg, begin_openfh, end_openfh, begin_total, end_total;
double openg_total = 0.0, openfh_total = 0.0, time_total = 0.0;
@@ -177,8 +176,9 @@ int main(int argc, char *argv[])
/* Broadcast the handle buffer to everyone */
if ((err = MPI_Bcast(&hb, 1, d, 0, MPI_COMM_WORLD)) != MPI_SUCCESS) {
char str[256];
- len = 256;
- MPI_Error_string(err, str, (int *) &len);
+ int len = sizeof(str);
+
+ MPI_Error_string(err, str, &len);
fprintf(stderr, "MPI_Bcast failed: %s\n", str);
MPI_Finalize();
exit(1);
More information about the Pvfs2-cvs
mailing list