From 25258df048a631876d7d286ba3cd77459f46abf3 Mon Sep 17 00:00:00 2001 From: AdamSimpson Date: Mon, 28 Sep 2015 10:56:08 -0400 Subject: [PATCH] Adding v0.1.2 release to address MPI_Init_thread initialization --- src/split.c | 17 +++++++++++++++++ wraprun_formula.rb | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/split.c b/src/split.c index 3c8ed74..948475c 100644 --- a/src/split.c +++ b/src/split.c @@ -186,6 +186,23 @@ int MPI_Init(int *argc, char ***argv) { return return_value; } +int MPI_Init_thread(int *argc, char ***argv, int required, int *provided) { + // Allow MPI_Init_thread to be called directly + int return_value; + if (getenv("W_UNWRAP_INIT")) { + DEBUG_PRINT("Unwrapped!\n"); + int (*real_MPI_Init_thread)(int*, char***, int, int*) = dlsym(RTLD_NEXT, "MPI_Init_thread"); + return_value = (*real_MPI_Init_thread)(argc, argv, required, provided); + } + else { + DEBUG_PRINT("Wrapped!\n"); + return_value = PMPI_Init_thread(argc, argv, required, provided); + } + + SplitInit(); + return return_value; +} + int MPI_Finalize() { const int err = PMPI_Comm_free(&MPI_COMM_SPLIT); if(err != MPI_SUCCESS) diff --git a/wraprun_formula.rb b/wraprun_formula.rb index af19ab0..6fcaba6 100644 --- a/wraprun_formula.rb +++ b/wraprun_formula.rb @@ -1,6 +1,6 @@ class WraprunFormula < Formula homepage "https://github.com/olcf/wraprun" - url "https://github.com/olcf/wraprun/archive/v0.1.1.tar.gz" + url "https://github.com/olcf/wraprun/archive/v0.1.2.tar.gz" additional_software_roots [ config_value("lustre-software-root")[hostname] ] concern for_version("dev") do