1
1

Fix the PVAR allocation usage.

According to the MPI standard the obj_handle is a pointer to an MPI
object, and therefore cannot be MPI_COMM_WORLD. The MPI standard example
14.6 highlight this usage.

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
Этот коммит содержится в:
George Bosilca 2019-02-02 18:52:10 -05:00
родитель 89fa06135e
Коммит e42b573cd3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 09C926752C9F09B1
5 изменённых файлов: 12 добавлений и 8 удалений

Просмотреть файл

@ -490,7 +490,7 @@ int main(int argc, char* argv[])
int rank, size, n, to, from, tagno, MPIT_result, provided, count;
MPI_T_pvar_session session;
MPI_Status status;
MPI_Comm newcomm;
MPI_Comm comm = MPI_COMM_WORLD;
MPI_Request request;
char filename[1024];
@ -530,7 +530,7 @@ int main(int argc, char* argv[])
/* Allocating a new PVAR in a session will reset the counters */
MPIT_result = MPI_T_pvar_handle_alloc(session, flush_pvar_idx,
MPI_COMM_WORLD,
&comm,
&flush_handle,
&count);
if (MPIT_result != MPI_SUCCESS) {
@ -690,7 +690,7 @@ if (MPIT_result != MPI_SUCCESS) {
/* Allocating a new PVAR in a session will reset the counters */
MPIT_result = MPI_T_pvar_handle_alloc(session, count_pvar_idx,
MPI_COMM_WORLD, &count_handle, &count);
&comm, &count_handle, &count);
if (MPIT_result != MPI_SUCCESS) {
printf("failed to allocate handle on \"%s\" pvar, check that you have monitoring pml\n",
count_pvar_name);

Просмотреть файл

@ -43,6 +43,7 @@
static inline int pvar_prefix ## _init(MPI_T_pvar_session session) \
{ \
int MPIT_result; \
MPI_Comm comm = MPI_COMM_WORLD; \
/* Get index */ \
MPIT_result = MPI_T_pvar_get_index(pvar_prefix ## _pvar_name, \
pvar_class, \
@ -57,7 +58,7 @@
/* Allocating a new PVAR in a session will reset the counters */ \
int count; \
MPIT_result = MPI_T_pvar_handle_alloc(session, pvar_prefix ## _pvar_idx, \
MPI_COMM_WORLD, &(pvar_prefix ## _handle), \
&comm, &(pvar_prefix ## _handle), \
&count); \
if( MPI_SUCCESS != MPIT_result ) { \
fprintf(stderr, "Failed to allocate handle on \"%s\" pvar, check that you have " \

Просмотреть файл

@ -21,6 +21,7 @@ int main(int argc, char**argv)
MPI_T_pvar_session session;
MPI_Status status;
MPI_Request request;
MPI_Comm comm = MPI_COMM_WORLD;
size_t*counts;
n = -1;
@ -50,7 +51,7 @@ int main(int argc, char**argv)
/* Allocating a new PVAR in a session will reset the counters */
MPIT_result = MPI_T_pvar_handle_alloc(session, count_pvar_idx,
MPI_COMM_WORLD, &count_handle, &count);
&comm, &count_handle, &count);
if (MPIT_result != MPI_SUCCESS) {
printf("failed to allocate handle on \"%s\" pvar, check that you have monitoring pml\n",
count_pvar_name);

Просмотреть файл

@ -78,6 +78,7 @@ int main(int argc, char* argv[])
int rank, size, n, to, from, tagno, MPIT_result, provided, count, world_rank;
MPI_T_pvar_session session;
MPI_Comm newcomm;
MPI_Comm comm = MPI_COMM_WORLD;
char filename[1024];
for ( int arg_it = 1; argc > 1 && arg_it < argc; ++arg_it ) {
@ -120,7 +121,7 @@ int main(int argc, char* argv[])
/* Allocating a new PVAR in a session will reset the counters */
MPIT_result = MPI_T_pvar_handle_alloc(session, flush_pvar_idx,
MPI_COMM_WORLD, &flush_handle, &count);
&comm, &flush_handle, &count);
if (MPIT_result != MPI_SUCCESS) {
printf("failed to allocate handle on \"%s\" pvar, check that you have monitoring pml\n",
flush_pvar_name);

Просмотреть файл

@ -67,6 +67,7 @@ int main(int argc, char* argv[])
MPI_T_pvar_session session;
MPI_Status status;
MPI_Comm newcomm;
MPI_Comm comm = MPI_COMM_WORLD;
MPI_Request request;
size_t*msg_count_p1, *msg_size_p1;
size_t*msg_count_p2, *msg_size_p2;
@ -110,14 +111,14 @@ int main(int argc, char* argv[])
/* Allocating a new PVAR in a session will reset the counters */
MPIT_result = MPI_T_pvar_handle_alloc(session, count_pvar_idx,
MPI_COMM_WORLD, &count_handle, &count);
&comm, &count_handle, &count);
if (MPIT_result != MPI_SUCCESS) {
printf("failed to allocate handle on \"%s\" pvar, check that you have monitoring pml\n",
count_pvar_name);
MPI_Abort(MPI_COMM_WORLD, MPIT_result);
}
MPIT_result = MPI_T_pvar_handle_alloc(session, msize_pvar_idx,
MPI_COMM_WORLD, &msize_handle, &count);
&comm, &msize_handle, &count);
if (MPIT_result != MPI_SUCCESS) {
printf("failed to allocate handle on \"%s\" pvar, check that you have monitoring pml\n",
msize_pvar_name);