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

DL suffix #29

Merged
merged 3 commits into from
Jan 31, 2024
Merged
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
13 changes: 8 additions & 5 deletions libinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@

#if defined(__linux__)
#define LIBMPI_NAME "libmpi.so"
#define DLSUFFIX ".so"
#elif defined(__APPLE__)
#if defined(__x86_64__)
#define LIBMPI_NAME "/usr/local/lib/libmpi.dylib"
#else
#define LIBMPI_NAME "/opt/homebrew/lib/libmpi.dylib"
#endif
#define DLSUFFIX ".dylib"
#else
#warning No default MPI library path.
#endif
Expand Down Expand Up @@ -49,7 +51,7 @@ int * MPICH_WEIGHTS_EMPTY = NULL;
// alkaa = start
static int MUK_Alkaa(int * argc, char *** argv, int requested, int * provided)
{
int rc;
int rc = 0;

int verbose = 0;
{
Expand Down Expand Up @@ -96,7 +98,7 @@ static int MUK_Alkaa(int * argc, char *** argv, int requested, int * provided)
abort();
}

char * wrapname = "/dev/null";
char * wrapname = NULL;
// figure out which library i am using
MUK_Get_library_version = MUK_DLSYM(h,"MPI_Get_library_version");
{
Expand Down Expand Up @@ -124,15 +126,16 @@ static int MUK_Alkaa(int * argc, char *** argv, int requested, int * provided)
}

if (whose_mpi == OMPI) {
wrapname = "ompi-wrap.so";
wrapname = "ompi-wrap" DLSUFFIX;
} else if (whose_mpi == MPICH) {
wrapname = "mpich-wrap.so";
wrapname = "mpich-wrap" DLSUFFIX;
} else if (whose_mpi == INTEL) {
wrapname = "mpich-wrap.so";
wrapname = "mpich-wrap" DLSUFFIX;
} else {
printf("MPI implementation unknown.\n");
abort();
}
if (verbose) printf("wrapname = %s\n", wrapname);
}

// these are ABI-agnostic and important, so why not load them now...
Expand Down