Skip to content

Commit

Permalink
Merge pull request #5 from rhc54/topic/merge
Browse files Browse the repository at this point in the history
Complete first round of repairs - the DVM now works again, but there …
  • Loading branch information
Ralph Castain authored Sep 12, 2017
2 parents 40946ca + df535c7 commit e058094
Show file tree
Hide file tree
Showing 106 changed files with 1,149 additions and 26,950 deletions.
2 changes: 1 addition & 1 deletion examples/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ int main(int argc, char **argv)
* query the status of the allocation request */
usleep(10);
PMIX_QUERY_CREATE(query, 1);
PMIX_ARGV_APPEND(query[0].keys, PMIX_QUERY_ALLOC_STATUS);
PMIX_ARGV_APPEND(rc, query[0].keys, PMIX_QUERY_ALLOC_STATUS);
PMIX_INFO_CREATE(query[0].qualifiers, 1);
PMIX_INFO_LOAD(&query[0].qualifiers[0], PMIX_ALLOC_ID, myallocation, PMIX_STRING);
mydata.active = true;
Expand Down
70 changes: 8 additions & 62 deletions examples/debugger.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static pmix_status_t spawn_debugger(char *appspace)
/* setup the debugger */
PMIX_APP_CREATE(debugger, 1);
debugger[0].cmd = strdup("./debuggerd");
PMIX_ARGV_APPEND(debugger[0].argv, "./debuggerd");
PMIX_ARGV_APPEND(rc, debugger[0].argv, "./debuggerd");
getcwd(cwd, 1024); // point us to our current directory
debugger[0].cwd = strdup(cwd);
/* provide directives so the daemons go where we want, and
Expand Down Expand Up @@ -232,70 +232,16 @@ int main(int argc, char **argv)
exit(1);
}
}

/* ****************************************************************/
/* we want to be able to detect that the PSRVR is up and running
* prior to attempting to connect to it. The code logic in ORTE
* actually supports such things, but unfortunately will emit
* error messages about the contact file missing before we can
* arrive at the point where retries can be done. So...let's
* setup the path to the contact file here, check to see if it
* exists, and then cycle a while if it doesn't. */

if (NULL != (tdir = getenv("PMIX_SERVER_TMPDIR"))) {
sdir = strdup(tdir);
} else {
/* get the effective uid */
uid_t uid = geteuid();

/* look for the temp directory */
if (NULL == (str = getenv("TMPDIR"))) {
if (NULL == (str = getenv("TEMP"))) {
if (NULL == (str = getenv("TMP"))) {
str = "/tmp";
}
}
}
/* get the nodename */
gethostname(hostname, sizeof(hostname));

/* setup the directory */
asprintf(&sdir, "%s/ompi.%s.%lu/dvm", str, hostname, (unsigned long)uid);
/* setup the contact name */
asprintf(&filename, "%s/contact.txt", sdir);
if (NULL == filename) {
fprintf(stderr, "OUT OF MEMORY\n");
exit(1);
}
}
/* check to see if the file exists - loop a few times if it
* doesn't, delaying between successive attempts */
n = 0;
while (n < DBGR_LOOP_LIMIT &&
0 != access(filename, R_OK)) {
sleep(1);
++n;
}
/* if we still don't see the file, then give up */
if (0 != access(filename, R_OK)) {
fprintf(stderr, "PSRVR contact file %s not found - cannot continue\n", filename);
exit(1);
}
free(filename);

/* init us - pass along the location of the contact file */
ninfo = 1;
PMIX_INFO_CREATE(info, ninfo);
PMIX_INFO_LOAD(&info[0], PMIX_SERVER_TMPDIR, sdir, PMIX_STRING);
free(sdir);

info = NULL;
ninfo = 0;
if (PMIX_SUCCESS != (rc = PMIx_tool_init(&myproc, info, ninfo))) {
fprintf(stderr, "PMIx_tool_init failed: %d\n", rc);
exit(rc);
}
PMIX_INFO_FREE(info, ninfo);

fprintf(stderr, "Tool ns %s rank %d: Running\n", myproc.nspace, myproc.rank);
goto done;

/* register a default event handler */
active = -1;
Expand Down Expand Up @@ -338,8 +284,8 @@ int main(int argc, char **argv)
* so we know if the RM can stop-on-exec, or only supports stop-in-init */
nq = 1;
PMIX_QUERY_CREATE(query, nq);
PMIX_ARGV_APPEND(query[0].keys, PMIX_QUERY_SPAWN_SUPPORT);
PMIX_ARGV_APPEND(query[0].keys, PMIX_QUERY_DEBUG_SUPPORT);
PMIX_ARGV_APPEND(rc, query[0].keys, PMIX_QUERY_SPAWN_SUPPORT);
PMIX_ARGV_APPEND(rc, query[0].keys, PMIX_QUERY_DEBUG_SUPPORT);
/* setup the caddy to retrieve the data */
myquery_data.info = NULL;
myquery_data.ninfo = 0;
Expand Down Expand Up @@ -404,7 +350,7 @@ int main(int argc, char **argv)
PMIX_APP_CREATE(app, napps);
/* setup the executable */
app[0].cmd = strdup("client");
PMIX_ARGV_APPEND(app[0].argv, "./client");
PMIX_ARGV_APPEND(rc, app[0].argv, "./client");
getcwd(cwd, 1024); // point us to our current directory
app[0].cwd = strdup(cwd);
app[0].maxprocs = 2;
Expand Down Expand Up @@ -458,7 +404,7 @@ static int attach_to_running_job(char *nspace)
* specified one exists */
nq = 1;
PMIX_QUERY_CREATE(query, nq);
PMIX_ARGV_APPEND(query[0].keys, PMIX_QUERY_NAMESPACES);
PMIX_ARGV_APPEND(rc, query[0].keys, PMIX_QUERY_NAMESPACES);

q = (myquery_data_t*)malloc(sizeof(myquery_data_t));
q->active = true;
Expand Down
4 changes: 2 additions & 2 deletions examples/debuggerd.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* All rights reserved.
* Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2015 Mellanox Technologies, Inc. All rights reserved.
* $COPYRIGHT$
*
Expand Down Expand Up @@ -174,7 +174,7 @@ int main(int argc, char **argv)
* our local target processes */
nq = 1;
PMIX_QUERY_CREATE(query, nq);
PMIX_ARGV_APPEND(query[0].keys, PMIX_QUERY_LOCAL_PROC_TABLE);
PMIX_ARGV_APPEND(rc, query[0].keys, PMIX_QUERY_LOCAL_PROC_TABLE);
query[0].nqual = 1;
PMIX_INFO_CREATE(query[0].qualifiers, 1);
PMIX_INFO_LOAD(&query[0].qualifiers[0], PMIX_NSPACE, val->data.string, PMIX_STRING); // the nspace we are enquiring about
Expand Down
4 changes: 1 addition & 3 deletions opal/mca/btl/tcp/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ sources = \
btl_tcp_frag.h \
btl_tcp_hdr.h \
btl_tcp_proc.c \
btl_tcp_proc.h \
btl_tcp_ft.c \
btl_tcp_ft.h
btl_tcp_proc.h

# Make the output library in this directory, and name it either
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
Expand Down
54 changes: 0 additions & 54 deletions opal/mca/btl/tcp/btl_tcp_ft.c

This file was deleted.

34 changes: 0 additions & 34 deletions opal/mca/btl/tcp/btl_tcp_ft.h

This file was deleted.

50 changes: 0 additions & 50 deletions opal/mca/pmix/ext1x/Makefile.am

This file was deleted.

70 changes: 0 additions & 70 deletions opal/mca/pmix/ext1x/configure.m4

This file was deleted.

Loading

0 comments on commit e058094

Please sign in to comment.