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

Add support for PMIX_MEM_ALLOC_KIND #1973

Merged
merged 2 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
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
50 changes: 0 additions & 50 deletions .github/workflows/builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,6 @@ name: Build tests
on: [pull_request]

jobs:
macos:
runs-on: macos-latest
strategy:
matrix:
path: ['non-vpath', 'vpath']
sphinx: ['no-sphinx', 'sphinx']
steps:
- name: Install dependencies
run: brew install libevent hwloc autoconf automake libtool
- name: Git clone OpenPMIx
uses: actions/checkout@v3
with:
submodules: recursive
repository: openpmix/openpmix
path: openpmix/master
ref: master
- name: Build OpenPMIx
run: |
cd openpmix/master
./autogen.pl
./configure --prefix=$RUNNER_TEMP/pmixinstall
make -j
make install
- name: Git clone PRRTE
uses: actions/checkout@v3
with:
submodules: recursive
clean: false
- name: Build PRRTE
run: |
./autogen.pl
sphinx=
if test "${{ matrix.sphinx }}" = sphinx; then
pip3 install -r docs/requirements.txt
sphinx=--enable-sphinx
fi
c=./configure
if test "${{ matrix.path }}" = vpath; then
mkdir build
cd build
c=../configure
fi
$c --prefix=$RUNNER_TEMP/prteinstall --with-pmix=$RUNNER_TEMP/pmixinstall $sphinx
make -j
make install
make uninstall
ubuntu:
runs-on: ubuntu-latest
strategy:
Expand Down
2 changes: 2 additions & 0 deletions src/mca/schizo/prte/schizo_prte.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ static struct option prterunoptions[] = {
PMIX_OPTION_SHORT_DEFINE(PRTE_CLI_PRELOAD_BIN, PMIX_ARG_NONE, 's'),
PMIX_OPTION_DEFINE(PRTE_CLI_DO_NOT_AGG_HELP, PMIX_ARG_NONE),
PMIX_OPTION_DEFINE(PRTE_CLI_FWD_ENVIRON, PMIX_ARG_OPTIONAL),
PMIX_OPTION_DEFINE(PRTE_CLI_MEM_ALLOC_KIND, PMIX_ARG_REQD),

// output options
PMIX_OPTION_DEFINE(PRTE_CLI_OUTPUT, PMIX_ARG_REQD),
Expand Down Expand Up @@ -310,6 +311,7 @@ static struct option prunoptions[] = {
PMIX_OPTION_SHORT_DEFINE(PRTE_CLI_PRELOAD_BIN, PMIX_ARG_NONE, 's'),
PMIX_OPTION_DEFINE(PRTE_CLI_DO_NOT_AGG_HELP, PMIX_ARG_NONE),
PMIX_OPTION_DEFINE(PRTE_CLI_FWD_ENVIRON, PMIX_ARG_OPTIONAL),
PMIX_OPTION_DEFINE(PRTE_CLI_MEM_ALLOC_KIND, PMIX_ARG_REQD),

// output options
PMIX_OPTION_DEFINE(PRTE_CLI_OUTPUT, PMIX_ARG_REQD),
Expand Down
24 changes: 23 additions & 1 deletion src/prted/pmix/pmix_server_queries.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ static void _query(int sd, short args, void *cbdata)
pmix_proc_info_t *procinfo;
pmix_data_array_t dry;
prte_proc_t *proct;
pmix_proc_t *proc;
pmix_proc_t *proc, pproc;
pmix_info_t info;
size_t sz;
PRTE_HIDE_UNUSED_PARAMS(sd, args);

Expand Down Expand Up @@ -823,6 +824,27 @@ static void _query(int sd, short args, void *cbdata)
}
#endif

#ifdef PMIX_MEM_ALLOC_KIND
} else if (0 == strcmp(q->keys[n], PMIX_MEM_ALLOC_KIND)) {
pmix_value_t *value;
jdata = prte_get_job_data_object(jobid);
if (NULL == jdata) {
ret = PMIX_ERR_NOT_FOUND;
goto done;
}
PMIX_LOAD_PROCID(&pproc, jobid, PMIX_RANK_WILDCARD);
PMIX_INFO_LOAD(&info, PMIX_IMMEDIATE, NULL, PMIX_BOOL);
ret = PMIx_Get(&pproc, PMIX_MEM_ALLOC_KIND, &info, 1, (void**)&value);
if (PMIX_SUCCESS != ret) {
goto done;
}
PMIX_INFO_LIST_ADD(rc, results, PMIX_MEM_ALLOC_KIND, value->data.string, PMIX_STRING);
PMIX_VALUE_RELEASE(value);
if (PMIX_SUCCESS != rc) {
PMIX_ERROR_LOG(rc);
goto done;
}
#endif
} else {
fprintf(stderr, "Query for unrecognized attribute: %s\n", q->keys[n]);
}
Expand Down
7 changes: 7 additions & 0 deletions src/prted/prun_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,13 @@ int prun_common(pmix_cli_result_t *results,
PMIX_INFO_LIST_ADD(ret, jinfo, PMIX_LOG_AGG, &flag, PMIX_BOOL);
}

#ifdef PMIX_MEM_ALLOC_KIND
opt = pmix_cmd_line_get_param(results, PRTE_CLI_MEM_ALLOC_KIND);
if (NULL != opt) {
PMIX_INFO_LIST_ADD(ret, jinfo, PMIX_MEM_ALLOC_KIND, opt->values[0], PMIX_STRING);
}
#endif

/* give the schizo components a chance to add to the job info */
schizo->job_info(results, jinfo);

Expand Down
3 changes: 2 additions & 1 deletion src/util/prte_cmd_line.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Copyright (c) 2016-2017 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2017-2022 IBM Corporation. All rights reserved.
* Copyright (c) 2021-2023 Nanook Consulting. All rights reserved.
* Copyright (c) 2021-2024 Nanook Consulting All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -108,6 +108,7 @@ BEGIN_C_DECLS
#define PRTE_CLI_SET_CWD_SESSION "set-cwd-to-session-dir" // none
#define PRTE_CLI_ENABLE_RECOVERY "enable-recovery" // none
#define PRTE_CLI_DISABLE_RECOVERY "disable-recovery" // none
#define PRTE_CLI_MEM_ALLOC_KIND "memory-alloc-kinds" // required

// Placement options
#define PRTE_CLI_MAPBY "map-by" // required
Expand Down
Loading