-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial support for the MPI 3.0 tools interface (MPI_T).
Currently MPI_T support: - Full cvar interface. - Full categories interface. - No pvar support at this time.
- Loading branch information
Showing
40 changed files
with
1,477 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,31 @@ | |||
# -*- makefile -*- | |||
# | |||
# Copyright (c) 2004-2006 The University of Tennessee and The University | |||
# of Tennessee Research Foundation. All rights | |||
# reserved. | |||
# Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, | |||
# University of Stuttgart. All rights reserved. | |||
# Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights | |||
# reserved. | |||
# $COPYRIGHT$ | |||
# | |||
# Additional copyrights may follow | |||
# | |||
# $HEADER$ | |||
# | |||
|
|||
# This Makefile.am does not stand on its own - it is included from ompi/Makefile.am | |||
|
|||
headers += mpit/mpit-internal.h | |||
|
|||
libmpi_la_SOURCES += mpit/init_thread.c mpit/finalize.c mpit/cvar_get_num.c \ | |||
mpit/cvar_get_info.c mpit/cvar_read.c mpit/cvar_write.c \ | |||
mpit/cvar_handle_alloc.c mpit/cvar_handle_free.c \ | |||
mpit/catagory_get_num.c mpit/catagory_get_info.c \ | |||
mpit/catagory_get_cvars.c mpit/catagory_get_pvars.c \ | |||
mpit/catagory_get_catagories.c mpit/catagory_changed.c \ | |||
mpit/pvar_get_info.c mpit/pvar_get_num.c mpit/pvar_handle_alloc.c \ | |||
mpit/pvar_handle_free.c mpit/pvar_read.c mpit/pvar_readreset.c \ | |||
mpit/pvar_reset.c mpit/pvar_session_create.c mpit/pvar_session_free.c \ | |||
mpit/pvar_start.c mpit/pvar_stop.c mpit/pvar_write.c \ | |||
mpit/enum_get_info.c mpit/enum_get_item.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,27 @@ | |||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ | |||
/* | |||
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights | |||
* reserved. | |||
* $COPYRIGHT$ | |||
* | |||
* Additional copyrights may follow | |||
* | |||
* $HEADER$ | |||
*/ | |||
|
|||
#include "ompi/mpit/mpit-internal.h" | |||
|
|||
static const char FUNC_NAME[] = "MPI_T_category_changed"; | |||
|
|||
int MPI_T_category_changed(int *stamp) | |||
{ | |||
if (!mpit_is_initialized ()) { | |||
return MPI_T_ERR_NOT_INITIALIZED; | |||
} | |||
|
|||
mpit_lock (); | |||
*stamp = mca_base_var_group_get_stamp (); | |||
mpit_unlock (); | |||
|
|||
return MPI_SUCCESS; | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,47 @@ | |||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ | |||
/* | |||
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights | |||
* reserved. | |||
* $COPYRIGHT$ | |||
* | |||
* Additional copyrights may follow | |||
* | |||
* $HEADER$ | |||
*/ | |||
|
|||
#include "ompi/mpit/mpit-internal.h" | |||
|
|||
static const char FUNC_NAME[] = "MPI_T_category_get_categories"; | |||
|
|||
int MPI_T_category_get_categories(int cat_index, int len, int indices[]) | |||
{ | |||
const mca_base_var_group_t *group; | |||
const int *subgroups; | |||
int rc = MPI_SUCCESS; | |||
int i, size; | |||
|
|||
if (!mpit_is_initialized ()) { | |||
return MPI_T_ERR_NOT_INITIALIZED; | |||
} | |||
|
|||
mpit_lock (); | |||
|
|||
do { | |||
rc = mca_base_var_group_get (cat_index, &group); | |||
if (0 > rc) { | |||
rc = (OPAL_ERR_NOT_FOUND == rc) ? MPI_T_ERR_INVALID_INDEX : MPI_ERR_OTHER; | |||
break; | |||
} | |||
|
|||
size = opal_value_array_get_size((opal_value_array_t *) &group->group_subgroups); | |||
subgroups = OPAL_VALUE_ARRAY_GET_BASE(&group->group_subgroups, int); | |||
|
|||
for (i = 0 ; i < len && i < size ; ++i) { | |||
indices[i] = subgroups[i]; | |||
} | |||
} while (0); | |||
|
|||
mpit_unlock (); | |||
|
|||
return rc; | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,47 @@ | |||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ | |||
/* | |||
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights | |||
* reserved. | |||
* $COPYRIGHT$ | |||
* | |||
* Additional copyrights may follow | |||
* | |||
* $HEADER$ | |||
*/ | |||
|
|||
#include "ompi/mpit/mpit-internal.h" | |||
|
|||
static const char FUNC_NAME[] = "MPI_T_category_get_cvars"; | |||
|
|||
int MPI_T_category_get_cvars(int cat_index, int len, int indices[]) | |||
{ | |||
const mca_base_var_group_t *group; | |||
int rc = MPI_SUCCESS; | |||
const int *vars; | |||
int i, size; | |||
|
|||
if (!mpit_is_initialized ()) { | |||
return MPI_T_ERR_NOT_INITIALIZED; | |||
} | |||
|
|||
mpit_lock (); | |||
|
|||
do { | |||
rc = mca_base_var_group_get (cat_index, &group); | |||
if (0 > rc) { | |||
rc = (OPAL_ERR_NOT_FOUND == rc) ? MPI_T_ERR_INVALID_INDEX : MPI_ERR_OTHER; | |||
break; | |||
} | |||
|
|||
size = opal_value_array_get_size((opal_value_array_t *) &group->group_vars); | |||
vars = OPAL_VALUE_ARRAY_GET_BASE(&group->group_vars, int); | |||
|
|||
for (i = 0 ; i < len && i < size ; ++i) { | |||
indices[i] = vars[i]; | |||
} | |||
} while (0); | |||
|
|||
mpit_unlock (); | |||
|
|||
return rc; | |||
} |
Oops, something went wrong.