diff --git a/src/mca/mpi/topo/unity/src/cart_map.c b/src/mca/mpi/topo/unity/src/cart_map.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/mca/mpi/topo/unity/src/graph_map.c b/src/mca/mpi/topo/unity/src/graph_map.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/mca/mpi/topo/unity/src/topo_unity.c b/src/mca/mpi/topo/unity/src/topo_unity.c new file mode 100644 index 0000000000..e6b7f8f6c3 --- /dev/null +++ b/src/mca/mpi/topo/unity/src/topo_unity.c @@ -0,0 +1,74 @@ +/* + * $HEADER$ + */ +#include "lam_config.h" +#include "mca/mpi/topo/topo.h" +#include "mca/mpi/topo/base/base.h" + + +static const mca_topo_t unity { + + /* + * Per-communicator initialization and finalization functions + */ + mca_topo_unity_init, + mca_topo_unity_finalize, + + NULL, /* topo_cart_coords */ + NULL, /* topo_cart_create */ + NULL, /* topo_cart_get */ + NULL, /* topo_cartdim_get */ + mca_topo_unity_cart_map, + NULL, /* topo_cart_rank */ + NULL, /* topo_cart_shift */ + NULL, /* topo_cart_sub */ + NULL, /* topo_graph_create */ + NULL, /* topo_graph_get */ + mca_topo_unity_graph_map, + NULL, /* topo_graph_neighbors */ + NULL, /* topo_graph_neighbors_count */ +}; + +/* + * Initial query function that is invoked during MPI_INIT, allowing + * this module to indicate what level of thread support it provides + */ +int mca_topo_unity_init_query (int *thread_min, int *thread_max) { + + *thread_min = MPI_THREAD_SINGLE; + *thread_max = MPI_THREAD_MULTIPLE; + + return LAM_SUCCESS; +} + +/* + * Init on the communicator + */ +int mca_topo_unity_init (lam_communicator_t *comm, + const mca_topo_1_0_0_t **new_topo) { + /* + * Nothing to init on the communicator + */ + return LAM_SUCCESS; +} + +/* + * Init on the communicator + */ +int mca_topo_unity_finalize (lam_communicator_t *comm) { + + /* + * Nothing to finalize on the communicator + */ + return LAM_SUCCESS; +} + +int mca_topo_1_0_0_t *mca_topo_unity_comm_query (lam_communicator_t *comm, + int *priority) { + + /* + * This is the unity module and hence the priority is 0 + */ + *priority = 0; + return &unity; +} diff --git a/src/mca/mpi/topo/unity/src/topo_unity_module.c b/src/mca/mpi/topo/unity/src/topo_unity_module.c new file mode 100644 index 0000000000..21597f0a46 --- /dev/null +++ b/src/mca/mpi/topo/unity/src/topo_unity_module.c @@ -0,0 +1,54 @@ +/* + * $HEADER$ + * + * These symbols are in a file by themselves to provide nice linker + * semantics. Since linkers generally pull in symbols by object fules, + * keeping these symbols as the only symbols in this file prevents + * utility programs such as "laminfo" from having to import entire + * modules just to query their version and parameters + */ + +#include "lam_config.h" +#include "mpi.h" +#include "mca/mpi/topo/topo.h" +#include "topo_unity,h" + +/* + * Public string showing the topo unity module version number + */ + +const char *mca_topo_unity_module_version_string = + "LAM/MPI unity topology MCA module version" MCA_TOPO_UNITY_VERSION; + +/* + * Instntiate the public struct with all of our public information + * and pointers to our public functions in it + */ + +const mca_topo_base_module_1_0_0_t mca_topo_unity_module = { + /* + * First, the mca_modult_t struct containing meta information + * about the module itself + */ + { + /* + * Indicate that we are a topo v1.0.0 module (which also + * implies a specific MCA version) + */ + MCA_TOPO_UNITY_VERSION_1_0_0, + /* + * MOdule name and version + */ + "unity", + MCA_TOPO_UNITY_MAJOR_VERSION, + MCA_TOPO_UNITY_MINOR_VERSION, + MCA_TOPO_UNITY_RELEASE_VERSION, + /* + * Module open and cose functions + */ + NULL, + NULL + }, + /* + * Next the MCA +