Skip to content

Commit d729041

Browse files
committed
fix bad string passing to print_error
Signed-off-by: tomhers <tom.herschberg@gmail.com>
1 parent 640019a commit d729041

15 files changed

+99
-98
lines changed

sessions/sessions_test10.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,25 @@ int main (int argc, char *argv[])
3030

3131
rc = MPI_Session_create_errhandler (my_session_errhandler, &errhandler);
3232
if (MPI_SUCCESS != rc) {
33-
print_error("Error handler creation failed with rc = %d\n", rc);
33+
print_error("Error handler creation failed", rc);
3434
return -1;
3535
}
3636

3737
rc = MPI_Info_create (&info);
3838
if (MPI_SUCCESS != rc) {
39-
print_error("Info creation failed with rc = %d\n", rc);
39+
print_error("Info creation failed", rc);
4040
return -1;
4141
}
4242

4343
rc = MPI_Info_set(info, "mpi_thread_support_level", "MPI_THREAD_MULTIPLE");
4444
if (MPI_SUCCESS != rc) {
45-
print_error("Info key/val set failed with rc = %d\n", rc);
45+
print_error("Info key/val set failed", rc);
4646
return -1;
4747
}
4848

4949
rc = MPI_Session_init (info, errhandler, &session);
5050
if (MPI_SUCCESS != rc) {
51-
print_error("Session initialization failed with rc = %d\n", rc);
51+
print_error("Session initialization failed", rc);
5252
return -1;
5353
}
5454

@@ -62,7 +62,7 @@ int main (int argc, char *argv[])
6262

6363
rc = MPI_Group_from_session_pset (session, "mpi://WORLD", &group);
6464
if (MPI_SUCCESS != rc) {
65-
print_error("Could not get a group for mpi://WORLD. rc = %d\n", rc);
65+
print_error("Could not get a group for mpi://WORLD. ", rc);
6666
return -1;
6767
}
6868

sessions/sessions_test11.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,25 @@ int main (int argc, char *argv[])
3030

3131
rc = MPI_Session_create_errhandler (my_session_errhandler, &errhandler);
3232
if (MPI_SUCCESS != rc) {
33-
print_error("Error handler creation failed with rc = %d\n", rc);
33+
print_error("Error handler creation failed", rc);
3434
return -1;
3535
}
3636

3737
rc = MPI_Info_create (&info);
3838
if (MPI_SUCCESS != rc) {
39-
print_error("Info creation failed with rc = %d\n", rc);
39+
print_error("Info creation failed", rc);
4040
return -1;
4141
}
4242

4343
rc = MPI_Info_set(info, "mpi_thread_support_level", "MPI_THREAD_MULTIPLE");
4444
if (MPI_SUCCESS != rc) {
45-
print_error("Info key/val set failed with rc = %d\n", rc);
45+
print_error("Info key/val set failed", rc);
4646
return -1;
4747
}
4848

4949
rc = MPI_Session_init (info, errhandler, &session);
5050
if (MPI_SUCCESS != rc) {
51-
print_error("Session initialization failed with rc = %d\n", rc);
51+
print_error("Session initialization failed", rc);
5252
return -1;
5353
}
5454

@@ -62,7 +62,7 @@ int main (int argc, char *argv[])
6262

6363
rc = MPI_Group_from_session_pset (session, "mpi://WORLD", &group);
6464
if (MPI_SUCCESS != rc) {
65-
print_error("Could not get a group for mpi://WORLD. rc = %d\n", rc);
65+
print_error("Could not get a group for mpi://WORLD. ", rc);
6666
return -1;
6767
}
6868

sessions/sessions_test12.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,25 @@ int main (int argc, char *argv[])
2828

2929
rc = MPI_Session_create_errhandler (my_session_errhandler, &errhandler);
3030
if (MPI_SUCCESS != rc) {
31-
print_error("Error handler creation failed with rc = %d\n", rc);
31+
print_error("Error handler creation failed", rc);
3232
return -1;
3333
}
3434

3535
rc = MPI_Info_create (&info);
3636
if (MPI_SUCCESS != rc) {
37-
print_error("Info creation failed with rc = %d\n", rc);
37+
print_error("Info creation failed", rc);
3838
return -1;
3939
}
4040

4141
rc = MPI_Info_set(info, "mpi_thread_support_level", "MPI_THREAD_MULTIPLE");
4242
if (MPI_SUCCESS != rc) {
43-
print_error("Info key/val set failed with rc = %d\n", rc);
43+
print_error("Info key/val set failed", rc);
4444
return -1;
4545
}
4646

4747
rc = MPI_Session_init (info, errhandler, &session);
4848
if (MPI_SUCCESS != rc) {
49-
print_error("Session initialization failed with rc = %d\n", rc);
49+
print_error("Session initialization failed", rc);
5050
return -1;
5151
}
5252

@@ -62,7 +62,7 @@ int main (int argc, char *argv[])
6262

6363
rc = MPI_Group_from_session_pset (session, "mpi://WORLD", &group);
6464
if (MPI_SUCCESS != rc) {
65-
print_error("Could not get a group for mpi://WORLD. rc = %d\n", rc);
65+
print_error("Could not get a group for mpi://WORLD. ", rc);
6666
return -1;
6767
}
6868

sessions/sessions_test13.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,25 @@ int main (int argc, char *argv[])
2828

2929
rc = MPI_Session_create_errhandler (my_session_errhandler, &errhandler);
3030
if (MPI_SUCCESS != rc) {
31-
print_error("Error handler creation failed with rc = %d\n", rc);
31+
print_error("Error handler creation failed", rc);
3232
return -1;
3333
}
3434

3535
rc = MPI_Info_create (&info);
3636
if (MPI_SUCCESS != rc) {
37-
print_error("Info creation failed with rc = %d\n", rc);
37+
print_error("Info creation failed", rc);
3838
return -1;
3939
}
4040

4141
rc = MPI_Info_set(info, "mpi_thread_support_level", "MPI_THREAD_MULTIPLE");
4242
if (MPI_SUCCESS != rc) {
43-
print_error("Info key/val set failed with rc = %d\n", rc);
43+
print_error("Info key/val set failed", rc);
4444
return -1;
4545
}
4646

4747
rc = MPI_Session_init (info, errhandler, &session);
4848
if (MPI_SUCCESS != rc) {
49-
print_error("Session initialization failed with rc = %d\n", rc);
49+
print_error("Session initialization failed", rc);
5050
return -1;
5151
}
5252

@@ -62,7 +62,7 @@ int main (int argc, char *argv[])
6262

6363
rc = MPI_Group_from_session_pset (session, "mpi://WORLD", &group);
6464
if (MPI_SUCCESS != rc) {
65-
print_error("Could not get a group for mpi://WORLD. rc = %d\n", rc);
65+
print_error("Could not get a group for mpi://WORLD. ", rc);
6666
return -1;
6767
}
6868

sessions/sessions_test14.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,25 @@ int main (int argc, char *argv[])
3131

3232
rc = MPI_Session_create_errhandler (my_session_errhandler, &errhandler);
3333
if (MPI_SUCCESS != rc) {
34-
print_error("Error handler creation failed with rc = %d\n", rc);
34+
print_error("Error handler creation failed", rc);
3535
return -1;
3636
}
3737

3838
rc = MPI_Info_create (&info);
3939
if (MPI_SUCCESS != rc) {
40-
print_error("Info creation failed with rc = %d\n", rc);
40+
print_error("Info creation failed", rc);
4141
return -1;
4242
}
4343

4444
rc = MPI_Info_set(info, "mpi_thread_support_level", "MPI_THREAD_MULTIPLE");
4545
if (MPI_SUCCESS != rc) {
46-
print_error("Info key/val set failed with rc = %d\n", rc);
46+
print_error("Info key/val set failed", rc);
4747
return -1;
4848
}
4949

5050
rc = MPI_Session_init (info, errhandler, &session);
5151
if (MPI_SUCCESS != rc) {
52-
print_error("Session initialization failed with rc = %d\n", rc);
52+
print_error("Session initialization failed", rc);
5353
return -1;
5454
}
5555

@@ -63,7 +63,7 @@ int main (int argc, char *argv[])
6363

6464
rc = MPI_Group_from_session_pset (session, "mpi://WORLD", &group);
6565
if (MPI_SUCCESS != rc) {
66-
print_error("Could not get a group for mpi://WORLD. rc = %d\n", rc);
66+
print_error("Could not get a group for mpi://WORLD. ", rc);
6767
return -1;
6868
}
6969

sessions/sessions_test15.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,31 @@ int main (int argc, char *argv[])
2828

2929
rc = MPI_Session_create_errhandler (my_session_errhandler, &errhandler);
3030
if (MPI_SUCCESS != rc) {
31-
print_error("Error handler creation failed with rc = %d\n", rc);
31+
print_error("Error handler creation failed", rc);
3232
return -1;
3333
}
3434

3535
rc = MPI_Info_create (&info);
3636
if (MPI_SUCCESS != rc) {
37-
print_error("Info creation failed with rc = %d\n", rc);
37+
print_error("Info creation failed", rc);
3838
return -1;
3939
}
4040

4141
rc = MPI_Info_set(info, "mpi_thread_support_level", "MPI_THREAD_MULTIPLE");
4242
if (MPI_SUCCESS != rc) {
43-
print_error("Info key/val set failed with rc = %d\n", rc);
43+
print_error("Info key/val set failed", rc);
4444
return -1;
4545
}
4646

4747
rc = MPI_Session_init (info, errhandler, &session);
4848
if (MPI_SUCCESS != rc) {
49-
print_error("Session initialization failed with rc = %d\n", rc);
49+
print_error("Session initialization failed", rc);
5050
return -1;
5151
}
5252

5353
rc = MPI_Session_init (info, errhandler, &session1);
5454
if (MPI_SUCCESS != rc) {
55-
print_error("Session1 initialization failed with rc = %d\n", rc);
55+
print_error("Session1 initialization failed", rc);
5656
return -1;
5757
}
5858

@@ -74,13 +74,13 @@ int main (int argc, char *argv[])
7474

7575
rc = MPI_Group_from_session_pset (session, "mpi://WORLD", &group);
7676
if (MPI_SUCCESS != rc) {
77-
print_error("Could not get a group for mpi://WORLD. rc = %d\n", rc);
77+
print_error("Could not get a group for mpi://WORLD. ", rc);
7878
return -1;
7979
}
8080

8181
rc = MPI_Group_from_session_pset (session1, "mpi://WORLD", &group1);
8282
if (MPI_SUCCESS != rc) {
83-
print_error("Could not get a group1 for mpi://WORLD. rc = %d\n", rc);
83+
print_error("Could not get a group1 for mpi://WORLD. ", rc);
8484
return -1;
8585
}
8686

sessions/sessions_test16.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,25 @@ int main (int argc, char *argv[])
2828

2929
rc = MPI_Session_create_errhandler (my_session_errhandler, &errhandler);
3030
if (MPI_SUCCESS != rc) {
31-
print_error("Error handler creation failed with rc = %d\n", rc);
31+
print_error("Error handler creation failed", rc);
3232
return -1;
3333
}
3434

3535
rc = MPI_Info_create (&info);
3636
if (MPI_SUCCESS != rc) {
37-
print_error("Info creation failed with rc = %d\n", rc);
37+
print_error("Info creation failed", rc);
3838
return -1;
3939
}
4040

4141
rc = MPI_Info_set(info, "mpi_thread_support_level", "MPI_THREAD_MULTIPLE");
4242
if (MPI_SUCCESS != rc) {
43-
print_error("Info key/val set failed with rc = %d\n", rc);
43+
print_error("Info key/val set failed", rc);
4444
return -1;
4545
}
4646

4747
rc = MPI_Session_init (info, errhandler, &session);
4848
if (MPI_SUCCESS != rc) {
49-
print_error("Session initialization failed with rc = %d\n", rc);
49+
print_error("Session initialization failed", rc);
5050
return -1;
5151
}
5252

@@ -60,7 +60,7 @@ int main (int argc, char *argv[])
6060

6161
rc = MPI_Group_from_session_pset (session, "mpi://WORLD", &group);
6262
if (MPI_SUCCESS != rc) {
63-
print_error("Could not get a group for mpi://WORLD. rc = %d\n", rc);
63+
print_error("Could not get a group for mpi://WORLD. ", rc);
6464
return -1;
6565
}
6666

@@ -73,6 +73,7 @@ int main (int argc, char *argv[])
7373
printf("attr val found for index: %d\n", MPI_TAG_UB);
7474
} else {
7575
printf("attr val not found for index: %d\n", MPI_TAG_UB);
76+
return -1;
7677
}
7778

7879
MPI_Comm_get_attr(comm_world, MPI_HOST, &val, &flag);

sessions/sessions_test2.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,31 @@ int main (int argc, char *argv[])
2828

2929
rc = MPI_Session_create_errhandler (my_session_errhandler, &errhandler);
3030
if (MPI_SUCCESS != rc) {
31-
print_error ("Error handler creation failed with rc = %d\n", rc);
31+
print_error ("Error handler creation failed", rc);
3232
return -1;
3333
}
3434

3535
rc = MPI_Info_create (&info);
3636
if (MPI_SUCCESS != rc) {
37-
print_error ("Info creation failed with rc = %d\n", rc);
37+
print_error ("Info creation failed", rc);
3838
return -1;
3939
}
4040

4141
rc = MPI_Info_set(info, "mpi_thread_support_level", "MPI_THREAD_MULTIPLE");
4242
if (MPI_SUCCESS != rc) {
43-
print_error ("Info key/val set failed with rc = %d\n", rc);
43+
print_error ("Info key/val set failed", rc);
4444
return -1;
4545
}
4646

4747
rc = MPI_Session_init (info, errhandler, &session);
4848
if (MPI_SUCCESS != rc) {
49-
print_error ("Session initialization failed with rc = %d\n", rc);
49+
print_error ("Session initialization failed", rc);
5050
return -1;
5151
}
5252

5353
rc = MPI_Session_init (info, errhandler, &session1);
5454
if (MPI_SUCCESS != rc) {
55-
print_error ("Session1 initialization failed with rc = %d\n", rc);
55+
print_error ("Session1 initialization failed", rc);
5656
return -1;
5757
}
5858

@@ -74,13 +74,13 @@ int main (int argc, char *argv[])
7474

7575
rc = MPI_Group_from_session_pset (session, "mpi://WORLD", &group);
7676
if (MPI_SUCCESS != rc) {
77-
print_error ("Could not get a group for mpi://WORLD. rc = %d\n", rc);
77+
print_error ("Could not get a group for mpi://WORLD. ", rc);
7878
return -1;
7979
}
8080

8181
rc = MPI_Group_from_session_pset (session1, "mpi://WORLD", &group1);
8282
if (MPI_SUCCESS != rc) {
83-
print_error ("Could not get a group1 for mpi://WORLD. rc = %d\n", rc);
83+
print_error ("Could not get a group1 for mpi://WORLD. ", rc);
8484
return -1;
8585
}
8686

@@ -95,13 +95,13 @@ int main (int argc, char *argv[])
9595

9696
rc = MPI_Group_from_session_pset (session, "mpi://SELF", &group);
9797
if (MPI_SUCCESS != rc) {
98-
print_error ("Could not get a group for mpi://SELF. rc = %d\n", rc);
98+
print_error ("Could not get a group for mpi://SELF. ", rc);
9999
return -1;
100100
}
101101

102102
rc = MPI_Group_from_session_pset (session1, "mpi://SELF", &group1);
103103
if (MPI_SUCCESS != rc) {
104-
print_error ("Could not get a group1 for mpi://SELF. rc = %d\n", rc);
104+
print_error ("Could not get a group1 for mpi://SELF. ", rc);
105105
return -1;
106106
}
107107

0 commit comments

Comments
 (0)