Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Naughton <naughtont@ornl.gov>
  • Loading branch information
naughtont3 authored and rhc54 committed Nov 10, 2022
1 parent 4e72f80 commit a0a06ed
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 40 deletions.
16 changes: 14 additions & 2 deletions src/prted/prun_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ static void epipe_signal_callback(int signal);
static void regcbfunc(pmix_status_t status, size_t ref, void *cbdata)
{
prte_pmix_lock_t *lock = (prte_pmix_lock_t *) cbdata;
PRTE_HIDE_UNUSED_PARAMS(status);

PMIX_ACQUIRE_OBJECT(lock);
evid = ref;
PRTE_PMIX_WAKEUP_THREAD(lock);
Expand All @@ -129,6 +131,8 @@ static void regcbfunc(pmix_status_t status, size_t ref, void *cbdata)
static void opcbfunc(pmix_status_t status, void *cbdata)
{
prte_pmix_lock_t *lock = (prte_pmix_lock_t *) cbdata;
PRTE_HIDE_UNUSED_PARAMS(status);

PMIX_ACQUIRE_OBJECT(lock);
PRTE_PMIX_WAKEUP_THREAD(lock);
}
Expand All @@ -141,6 +145,7 @@ static void defhandler(size_t evhdlr_registration_id, pmix_status_t status,
prte_pmix_lock_t *lock = NULL;
size_t n;
pmix_status_t rc;
PRTE_HIDE_UNUSED_PARAMS(evhdlr_registration_id, source, results, nresults);

if (verbose) {
pmix_output(0, "PRUN: DEFHANDLER WITH STATUS %s(%d)", PMIx_Error_string(status), status);
Expand Down Expand Up @@ -199,6 +204,7 @@ static void evhandler(size_t evhdlr_registration_id, pmix_status_t status,
pmix_nspace_t jobid = {0};
size_t n;
char *msg = NULL;
PRTE_HIDE_UNUSED_PARAMS(evhdlr_registration_id, source, results, nresults);

if (verbose) {
pmix_output(0, "PRUN: EVHANDLER WITH STATUS %s(%d)", PMIx_Error_string(status), status);
Expand Down Expand Up @@ -244,6 +250,8 @@ static void debug_cbfunc(size_t evhdlr_registration_id, pmix_status_t status,
pmix_info_t *results, size_t nresults,
pmix_event_notification_cbfunc_fn_t cbfunc, void *cbdata)
{
PRTE_HIDE_UNUSED_PARAMS(evhdlr_registration_id, status, source, info, ninfo, results, nresults);

/* we _always_ have to execute the evhandler callback or
* else the event progress engine will hang */
if (NULL != cbfunc) {
Expand All @@ -256,6 +264,7 @@ static void setupcbfunc(pmix_status_t status, pmix_info_t info[], size_t ninfo,
{
mylock_t *mylock = (mylock_t *) provided_cbdata;
size_t n;
PRTE_HIDE_UNUSED_PARAMS(status);

if (NULL != info) {
mylock->ninfo = ninfo;
Expand Down Expand Up @@ -306,7 +315,7 @@ int prun_common(pmix_cli_result_t *results,
int pargc, char **pargv)
{
int rc = 1, i;
char *param, *ptr, *cptr, **options;
char *param, *ptr;
prte_pmix_lock_t lock, rellock;
pmix_list_t apps;
prte_pmix_app_t *app;
Expand All @@ -321,7 +330,6 @@ int prun_common(pmix_cli_result_t *results,
mylock_t mylock;
uint32_t ui32;
pid_t pid;
char **targv;
prte_ess_base_signal_t *sig;
prte_event_list_item_t *evitm;
pmix_value_t *val;
Expand All @@ -331,6 +339,7 @@ int prun_common(pmix_cli_result_t *results,
pmix_status_t code;
pmix_proc_t parent;
pmix_cli_item_t *opt;
PRTE_HIDE_UNUSED_PARAMS(pargc);

/* init the globals */
PMIX_CONSTRUCT(&apps, pmix_list_t);
Expand Down Expand Up @@ -876,6 +885,7 @@ static void clean_abort(int fd, short flags, void *arg)
pmix_proc_t target;
pmix_info_t directive;
pmix_status_t rc;
PRTE_HIDE_UNUSED_PARAMS(fd, flags, arg);

/* if we have already ordered this once, don't keep
* doing it to avoid race conditions
Expand Down Expand Up @@ -917,6 +927,7 @@ static void abort_signal_callback(int fd)
uint8_t foo = 1;
char *msg
= "Abort is in progress...hit ctrl-c again within 5 seconds to forcibly terminate\n\n";
PRTE_HIDE_UNUSED_PARAMS(fd);

/* if this is the first time thru, just get
* the current time
Expand Down Expand Up @@ -973,6 +984,7 @@ static int sigpipe_error_count = 0;
static void epipe_signal_callback(int signal)
{
sigpipe_error_count++;
PRTE_HIDE_UNUSED_PARAMS(signal);

if (10 < sigpipe_error_count) {
/* time to abort */
Expand Down
15 changes: 12 additions & 3 deletions src/tools/prte/prte.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ static int prep_singleton(const char *name);
static void opcbfunc(pmix_status_t status, void *cbdata)
{
prte_pmix_lock_t *lock = (prte_pmix_lock_t *) cbdata;
PRTE_HIDE_UNUSED_PARAMS(status);

PMIX_ACQUIRE_OBJECT(lock);
PRTE_PMIX_WAKEUP_THREAD(lock);
}
Expand Down Expand Up @@ -180,13 +182,15 @@ static void parent_died_fn(size_t evhdlr_registration_id, pmix_status_t status,
pmix_info_t results[], size_t nresults,
pmix_event_notification_cbfunc_fn_t cbfunc, void *cbdata)
{
PRTE_HIDE_UNUSED_PARAMS(evhdlr_registration_id, status, source, info, ninfo, results, nresults);
clean_abort(0, 0, NULL);
cbfunc(PMIX_EVENT_ACTION_COMPLETE, NULL, 0, NULL, NULL, cbdata);
}

static void evhandler_reg_callbk(pmix_status_t status, size_t evhandler_ref, void *cbdata)
{
mylock_t *lock = (mylock_t *) cbdata;
PRTE_HIDE_UNUSED_PARAMS(evhandler_ref);

lock->status = status;
PRTE_PMIX_WAKEUP_THREAD(&lock->lock);
Expand Down Expand Up @@ -225,8 +229,8 @@ static void setup_sighandler(int signal, prte_event_t *ev, prte_event_cbfunc_t c

int main(int argc, char *argv[])
{
int rc = 1, i, j;
char *param, *timeoutenv, *ptr, *tpath, *cptr;
int rc = 1, i;
char *param, *timeoutenv, *tpath, *cptr;
prte_pmix_lock_t lock;
pmix_list_t apps;
prte_pmix_app_t *app;
Expand All @@ -251,7 +255,6 @@ int main(int argc, char *argv[])
char **hosts = NULL;
prte_schizo_base_module_t *schizo;
prte_ess_base_signal_t *sig;
char **targv, **options;
pmix_status_t code;
char *personality;
pmix_cli_result_t results;
Expand Down Expand Up @@ -1156,6 +1159,8 @@ int main(int argc, char *argv[])

static void clean_abort(int fd, short flags, void *arg)
{
PRTE_HIDE_UNUSED_PARAMS(fd, flags, arg);

/* if we have already ordered this once, don't keep
* doing it to avoid race conditions
*/
Expand Down Expand Up @@ -1236,6 +1241,7 @@ static void abort_signal_callback(int fd)
{
uint8_t foo = 1;
char *msg = "Abort is in progress...hit ctrl-c again to forcibly terminate\n\n";
PRTE_HIDE_UNUSED_PARAMS(fd);

/* if this is the first time thru, just get
* the current time
Expand Down Expand Up @@ -1341,6 +1347,7 @@ static void signal_forward_callback(int signum, short args, void *cbdata)
pmix_status_t rc;
pmix_proc_t proc;
pmix_info_t info;
PRTE_HIDE_UNUSED_PARAMS(args, cbdata);

if (verbose) {
fprintf(stderr, "%s: Forwarding signal %d to job\n", prte_tool_basename, signum);
Expand All @@ -1362,6 +1369,8 @@ static void signal_forward_callback(int signum, short args, void *cbdata)
static int sigpipe_error_count = 0;
static void epipe_signal_callback(int fd, short args, void *cbdata)
{
PRTE_HIDE_UNUSED_PARAMS(fd, args, cbdata);

sigpipe_error_count++;

if (10 < sigpipe_error_count) {
Expand Down
2 changes: 1 addition & 1 deletion src/tools/prte_info/param.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ void prte_info_show_mca_params(const char *type, const char *component, bool wan

void prte_info_do_path(bool want_all)
{
int i, count;
int i;
char *scope;
pmix_cli_item_t *opt;

Expand Down
3 changes: 1 addition & 2 deletions src/tools/prte_info/prte_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ pmix_pointer_array_t mca_types = {{0}};
int main(int argc, char *argv[])
{
int ret = 0;
bool want_help = false;
bool cmd_error = false;
bool acted = false;
bool want_all = false;
int i;
Expand All @@ -88,6 +86,7 @@ int main(int argc, char *argv[])
char *ptr;
char *personality;
prte_schizo_base_module_t *schizo;
PRTE_HIDE_UNUSED_PARAMS(argc);

/* protect against problems if someone passes us thru a pipe
* and then abnormally terminates the pipe early */
Expand Down
1 change: 0 additions & 1 deletion src/tools/prte_info/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ void prte_info_show_prte_version(const char *scope)
*/
void prte_info_do_version(bool want_all)
{
size_t i, n;
char *arg1, *scope, **tmp;
char *pos = NULL;
int j;
Expand Down
14 changes: 6 additions & 8 deletions src/tools/prted/prted.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ static void infocbfunc(pmix_status_t status, pmix_info_t *info, size_t ninfo, vo
{
myxfer_t *xfer = (myxfer_t *) cbdata;
size_t n;
PRTE_HIDE_UNUSED_PARAMS(status);

if (NULL != info) {
xfer->ninfo = ninfo;
Expand Down Expand Up @@ -190,16 +191,11 @@ int main(int argc, char *argv[])
myxfer_t xfer;
pmix_data_buffer_t pbuf, *wbuf;
pmix_byte_object_t pbo;
pmix_proc_t target;
char *myuri;
prte_value_t *pval;
int8_t flag;
uint8_t naliases, ni;
char **nonlocal = NULL, *personality;
int n;
pmix_info_t info;
pmix_value_t *vptr;
int32_t one = 1;
char **pargv;
int pargc;
prte_schizo_base_module_t *schizo;
Expand Down Expand Up @@ -704,7 +700,7 @@ int main(int argc, char *argv[])
* otherwise, only the first layer of daemons will ever see them
*/
if (pmix_cmd_line_is_taken(&results, PRTE_CLI_TREE_SPAWN)) {
int j, k;
int k;
bool ignore;
char *no_keep[] = {
"prte_hnp_uri",
Expand Down Expand Up @@ -791,6 +787,7 @@ static void shutdown_callback(int fd, short flags, void *arg)
{
prte_timer_t *tm = (prte_timer_t *) arg;
bool suicide = false;
PRTE_HIDE_UNUSED_PARAMS(fd, flags);

if (NULL != tm) {
/* release the timer */
Expand Down Expand Up @@ -831,11 +828,11 @@ static void rollup(int status, pmix_proc_t *sender,
void *cbdata)
{
pmix_proc_t child;
int32_t flag, cnt;
pmix_byte_object_t bo;
int32_t cnt;
pmix_value_t val;
pmix_proc_t proc;
pmix_status_t prc;
PRTE_HIDE_UNUSED_PARAMS(status, tag, cbdata);

ncollected++;

Expand Down Expand Up @@ -912,6 +909,7 @@ static void node_regex_report(int status, pmix_proc_t *sender, pmix_data_buffer_
{
int rc;
bool *active = (bool *) cbdata;
PRTE_HIDE_UNUSED_PARAMS(status, sender, tag);

/* extract the node info if needed, and update the routing tree */
if (PRTE_SUCCESS != (rc = prte_util_decode_nidmap(buffer))) {
Expand Down
24 changes: 1 addition & 23 deletions src/tools/prun/prun.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,35 +106,13 @@ static bool verbose = false;
int prun(int argc, char *argv[])
{
int rc = 1, i;
char *param, *ptr, *cptr, **options;
prte_pmix_lock_t lock, rellock;
pmix_list_t apps;
prte_pmix_app_t *app;
void *tinfo, *jinfo;
pmix_info_t info, *iptr;
pmix_proc_t pname;
pmix_status_t ret;
bool flag;
size_t n, ninfo;
pmix_app_t *papps = NULL;
size_t napps;
mylock_t mylock;
uint32_t ui32;
pid_t pid;
char **pargv, **targv;
char **pargv;
int pargc;
prte_ess_base_signal_t *sig;
prte_event_list_item_t *evitm;
pmix_value_t *val;
pmix_data_array_t darray;
prte_schizo_base_module_t *schizo;
char hostname[PRTE_PATH_MAX];
pmix_rank_t rank;
pmix_status_t code;
char *personality;
pmix_proc_t parent;
pmix_cli_result_t results;
pmix_cli_item_t *opt;

/* init the globals */
PMIX_CONSTRUCT(&apps, pmix_list_t);
Expand Down
8 changes: 8 additions & 0 deletions src/tools/pterm/pterm.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ static void infocb(pmix_status_t status, pmix_info_t *info, size_t ninfo, void *
pmix_release_cbfunc_t release_fn, void *release_cbdata)
{
prte_pmix_lock_t *lock = (prte_pmix_lock_t *) cbdata;
PRTE_HIDE_UNUSED_PARAMS(info, ninfo);

#if PMIX_VERSION_MAJOR == 3 && PMIX_VERSION_MINOR == 0 && PMIX_VERSION_RELEASE < 3
/* The callback should likely not have been called
* see the comment below */
Expand All @@ -159,6 +161,8 @@ static void infocb(pmix_status_t status, pmix_info_t *info, size_t ninfo, void *
static void regcbfunc(pmix_status_t status, size_t ref, void *cbdata)
{
prte_pmix_lock_t *lock = (prte_pmix_lock_t *) cbdata;
PRTE_HIDE_UNUSED_PARAMS(status, ref);

PMIX_ACQUIRE_OBJECT(lock);
PRTE_PMIX_WAKEUP_THREAD(lock);
}
Expand All @@ -173,6 +177,7 @@ static void evhandler(size_t evhdlr_registration_id, pmix_status_t status,
pmix_nspace_t jobid = {0};
size_t n;
char *msg = NULL;
PRTE_HIDE_UNUSED_PARAMS(evhdlr_registration_id, source, results, nresults);

if (verbose) {
pmix_output(0, "PRUN: EVHANDLER WITH STATUS %s(%d)", PMIx_Error_string(status), status);
Expand Down Expand Up @@ -482,6 +487,8 @@ int main(int argc, char *argv[])

static void clean_abort(int fd, short flags, void *arg)
{
PRTE_HIDE_UNUSED_PARAMS(fd, flags, arg);

/* if we have already ordered this once, don't keep
* doing it to avoid race conditions
*/
Expand Down Expand Up @@ -512,6 +519,7 @@ static void abort_signal_callback(int fd)
uint8_t foo = 1;
char *msg
= "Abort is in progress...hit ctrl-c again within 5 seconds to forcibly terminate\n\n";
PRTE_HIDE_UNUSED_PARAMS(fd);

/* if this is the first time thru, just get
* the current time
Expand Down

0 comments on commit a0a06ed

Please sign in to comment.