Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPI_Info update (2nd / corrected PR) #1308

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ dgdimick@lnal.gov Denis Dimick LANL
dgoodell@cisco.com Dave Goodell Cisco
donald.kerr@oracle.com Donald Kerr Sun, Oracle
dorons@mellanox.com Doron Shoham Mellanox
dsolt@us.ibm.com David Solt IBM
ethan.mallove@oracle.com Ethan Mallove Sun, Oracle
eugene.loh@oracle.com Eugene Loh Sun, Oracle
gabriel@cs.uh.edu Edgar Gabriel HLRS, UH, UTK
Expand Down
11 changes: 6 additions & 5 deletions ompi/communicator/comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* and Technology (RIST). All rights reserved.
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2015 Mellanox Technologies. All rights reserved.
* Copyright (c) 2016 IBM Corp. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -86,7 +87,7 @@ static int ompi_comm_copy_topo (ompi_communicator_t *oldcomm,

/* idup with local group and info. the local group support is provided to support ompi_comm_set_nb */
static int ompi_comm_idup_internal (ompi_communicator_t *comm, ompi_group_t *group, ompi_group_t *remote_group,
ompi_info_t *info, ompi_communicator_t **newcomm, ompi_request_t **req);
opal_info_t *info, ompi_communicator_t **newcomm, ompi_request_t **req);


/**********************************************************************/
Expand Down Expand Up @@ -787,7 +788,7 @@ static int ompi_comm_split_type_get_part (ompi_group_t *group, int *results, int
int
ompi_comm_split_type(ompi_communicator_t *comm,
int split_type, int key,
ompi_info_t *info,
opal_info_t *info,
ompi_communicator_t** newcomm)
{
int myinfo[2];
Expand Down Expand Up @@ -998,7 +999,7 @@ int ompi_comm_dup ( ompi_communicator_t * comm, ompi_communicator_t **newcomm )
/**********************************************************************/
/**********************************************************************/
/**********************************************************************/
int ompi_comm_dup_with_info ( ompi_communicator_t * comm, ompi_info_t *info, ompi_communicator_t **newcomm )
int ompi_comm_dup_with_info ( ompi_communicator_t * comm, opal_info_t *info, ompi_communicator_t **newcomm )
{
ompi_communicator_t *newcomp = NULL;
ompi_group_t *remote_group = NULL;
Expand Down Expand Up @@ -1076,14 +1077,14 @@ int ompi_comm_idup (ompi_communicator_t *comm, ompi_communicator_t **newcomm, om
return ompi_comm_idup_with_info (comm, NULL, newcomm, req);
}

int ompi_comm_idup_with_info (ompi_communicator_t *comm, ompi_info_t *info, ompi_communicator_t **newcomm, ompi_request_t **req)
int ompi_comm_idup_with_info (ompi_communicator_t *comm, opal_info_t *info, ompi_communicator_t **newcomm, ompi_request_t **req)
{
return ompi_comm_idup_internal (comm, comm->c_local_group, comm->c_remote_group, info, newcomm, req);
}

/* NTH: we need a way to idup with a smaller local group so this function takes a local group */
static int ompi_comm_idup_internal (ompi_communicator_t *comm, ompi_group_t *group, ompi_group_t *remote_group,
ompi_info_t *info, ompi_communicator_t **newcomm, ompi_request_t **req)
opal_info_t *info, ompi_communicator_t **newcomm, ompi_request_t **req)
{
struct ompi_comm_idup_with_info_context *context;
ompi_comm_request_t *request;
Expand Down
10 changes: 6 additions & 4 deletions ompi/communicator/comm_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2015 Intel, Inc. All rights reserved.
* Copyright (c) 2016 IBM Corp. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -33,6 +34,7 @@
#include <stdio.h>

#include "opal/util/bit_ops.h"
#include "opal/util/info_subscriber.h"
#include "ompi/constants.h"
#include "ompi/mca/pml/pml.h"
#include "ompi/mca/coll/base/base.h"
Expand All @@ -52,9 +54,9 @@
opal_pointer_array_t ompi_mpi_communicators = {{0}};
opal_pointer_array_t ompi_comm_f_to_c_table = {{0}};

ompi_predefined_communicator_t ompi_mpi_comm_world = {{{0}}};
ompi_predefined_communicator_t ompi_mpi_comm_self = {{{0}}};
ompi_predefined_communicator_t ompi_mpi_comm_null = {{{0}}};
ompi_predefined_communicator_t ompi_mpi_comm_world = {{{{0}}}};
ompi_predefined_communicator_t ompi_mpi_comm_self = {{{{0}}}};
ompi_predefined_communicator_t ompi_mpi_comm_null = {{{{0}}}};
ompi_communicator_t *ompi_mpi_comm_parent = NULL;

ompi_predefined_communicator_t *ompi_mpi_comm_world_addr =
Expand All @@ -67,7 +69,7 @@ ompi_predefined_communicator_t *ompi_mpi_comm_null_addr =
static void ompi_comm_construct(ompi_communicator_t* comm);
static void ompi_comm_destruct(ompi_communicator_t* comm);

OBJ_CLASS_INSTANCE(ompi_communicator_t, opal_object_t,
OBJ_CLASS_INSTANCE(ompi_communicator_t, opal_infosubscriber_t,
ompi_comm_construct,
ompi_comm_destruct);

Expand Down
11 changes: 7 additions & 4 deletions ompi/communicator/communicator.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2016 IBM Corp. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -32,6 +33,8 @@

#include "ompi_config.h"
#include "opal/class/opal_object.h"
#include "opal/class/opal_hash_table.h"
#include "opal/util/info_subscriber.h"
#include "ompi/errhandler/errhandler.h"
#include "opal/threads/mutex.h"
#include "ompi/communicator/comm_request.h"
Expand Down Expand Up @@ -115,7 +118,7 @@ OMPI_DECLSPEC extern opal_pointer_array_t ompi_mpi_communicators;
OMPI_DECLSPEC extern opal_pointer_array_t ompi_comm_f_to_c_table;

struct ompi_communicator_t {
opal_object_t c_base;
opal_infosubscriber_t super;
opal_mutex_t c_lock; /* mutex for name and potentially
attributes */
char c_name[MPI_MAX_OBJECT_NAME];
Expand Down Expand Up @@ -420,7 +423,7 @@ OMPI_DECLSPEC int ompi_comm_split (ompi_communicator_t *comm, int color, int key
*/
OMPI_DECLSPEC int ompi_comm_split_type(ompi_communicator_t *comm,
int split_type, int key,
struct ompi_info_t *info,
struct opal_info_t *info,
ompi_communicator_t** newcomm);

/**
Expand Down Expand Up @@ -451,7 +454,7 @@ OMPI_DECLSPEC int ompi_comm_idup (ompi_communicator_t *comm, ompi_communicator_t
* @param comm: input communicator
* @param newcomm: the new communicator or MPI_COMM_NULL if any error is detected.
*/
OMPI_DECLSPEC int ompi_comm_dup_with_info (ompi_communicator_t *comm, ompi_info_t *info, ompi_communicator_t **newcomm);
OMPI_DECLSPEC int ompi_comm_dup_with_info (ompi_communicator_t *comm, opal_info_t *info, ompi_communicator_t **newcomm);

/**
* dup a communicator (non-blocking) with info.
Expand All @@ -461,7 +464,7 @@ OMPI_DECLSPEC int ompi_comm_dup_with_info (ompi_communicator_t *comm, ompi_info_
* @param comm: input communicator
* @param newcomm: the new communicator or MPI_COMM_NULL if any error is detected.
*/
OMPI_DECLSPEC int ompi_comm_idup_with_info (ompi_communicator_t *comm, ompi_info_t *info, ompi_communicator_t **newcomm, ompi_request_t **req);
OMPI_DECLSPEC int ompi_comm_idup_with_info (ompi_communicator_t *comm, opal_info_t *info, ompi_communicator_t **newcomm, ompi_request_t **req);

/**
* compare two communicators.
Expand Down
3 changes: 2 additions & 1 deletion ompi/debuggers/ompi_mpihandles_dll.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* reserved.
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2012-2013 Inria. All rights reserved.
* Copyright (c) 2016 IBM Corp. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -234,7 +235,7 @@ int mpidbg_init_per_image(mqs_image *image, const mqs_image_callbacks *icb,
mqs_find_type(image, "ompi_file_t", mqs_lang_c);
handle_types->hi_c_group = i_info->ompi_group_t.type;
handle_types->hi_c_info =
mqs_find_type(image, "ompi_info_t", mqs_lang_c);
mqs_find_type(image, "opal_info_t", mqs_lang_c);
/* JMS: "MPI_Offset" is a typedef (see comment about MPI_Aint above) */
handle_types->hi_c_offset =
mqs_find_type(image, "MPI_Offset", mqs_lang_c);
Expand Down
15 changes: 7 additions & 8 deletions ompi/debuggers/predefined_gap_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2012-2013 Inria. All rights reserved.
* Copyright (c) 2016 IBM Corp. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -52,8 +53,8 @@ int main(int argc, char **argv) {
/* Test Predefined communicator sizes */
printf("ompi_predefined_communicator_t = %lu bytes\n", sizeof(ompi_predefined_communicator_t));
printf("ompi_communicator_t = %lu bytes\n", sizeof(ompi_communicator_t));
GAP_CHECK("c_base", test_comm, c_base, c_base, 0);
GAP_CHECK("c_lock", test_comm, c_lock, c_base, 1);
GAP_CHECK("c_base", test_comm, super, super, 0);
GAP_CHECK("c_lock", test_comm, c_lock, super, 1);
GAP_CHECK("c_name", test_comm, c_name, c_lock, 1);
GAP_CHECK("c_contextid", test_comm, c_contextid, c_name, 1);
GAP_CHECK("c_my_rank", test_comm, c_my_rank, c_contextid, 1);
Expand Down Expand Up @@ -120,8 +121,8 @@ int main(int argc, char **argv) {
printf("=============================================\n");
printf("ompi_predefined_win_t = %lu bytes\n", sizeof(ompi_predefined_win_t));
printf("ompi_win_t = %lu bytes\n", sizeof(ompi_win_t));
GAP_CHECK("w_base", test_win, w_base, w_base, 0);
GAP_CHECK("w_lock", test_win, w_lock, w_base, 1);
GAP_CHECK("super", test_win, super, super, 0);
GAP_CHECK("w_lock", test_win, w_lock, super, 1);
GAP_CHECK("w_name", test_win, w_name, w_lock, 1);
GAP_CHECK("w_group", test_win, w_group, w_name, 1);
GAP_CHECK("w_flags", test_win, w_flags, w_group, 1);
Expand All @@ -137,8 +138,7 @@ int main(int argc, char **argv) {
printf("ompi_info_t = %lu bytes\n", sizeof(ompi_info_t));
GAP_CHECK("super", test_info, super, super, 0);
GAP_CHECK("i_f_to_c_index", test_info, i_f_to_c_index, super, 1);
GAP_CHECK("i_lock", test_info, i_lock, i_f_to_c_index, 1);
GAP_CHECK("i_freed", test_info, i_freed, i_lock, 1);
GAP_CHECK("i_freed", test_info, i_freed, i_f_to_c_index, 1);

/* Test Predefined file sizes */
printf("=============================================\n");
Expand All @@ -148,8 +148,7 @@ int main(int argc, char **argv) {
GAP_CHECK("f_comm", test_file, f_comm, super, 1);
GAP_CHECK("f_filename", test_file, f_filename, f_comm, 1);
GAP_CHECK("f_amode", test_file, f_amode, f_filename, 1);
GAP_CHECK("f_info", test_file, f_info, f_amode, 1);
GAP_CHECK("f_flags", test_file, f_flags, f_info, 1);
GAP_CHECK("f_flags", test_file, f_flags, f_amode, 1);
GAP_CHECK("f_f_to_c_index", test_file, f_f_to_c_index, f_flags, 1);
GAP_CHECK("error_handler", test_file, error_handler, f_f_to_c_index, 1);
GAP_CHECK("errhandler_type", test_file, errhandler_type, error_handler, 1);
Expand Down
Loading