extra/openmpi to 4.1.6-1

This commit is contained in:
Kevin Mihelich 2023-12-29 20:54:01 +00:00
parent 45ea34f05d
commit db0101143d
4 changed files with 82 additions and 588 deletions

27
core/libseccomp/.SRCINFO Normal file
View file

@ -0,0 +1,27 @@
pkgbase = libseccomp
pkgdesc = Enhanced seccomp library
pkgver = 2.5.5
pkgrel = 1
url = https://github.com/seccomp/libseccomp
arch = x86_64
license = LGPL2.1
checkdepends = valgrind
makedepends = gperf
makedepends = cython
makedepends = python-setuptools
depends = glibc
source = https://github.com/seccomp/libseccomp/releases/download/v2.5.5/libseccomp-2.5.5.tar.gz
source = https://github.com/seccomp/libseccomp/releases/download/v2.5.5/libseccomp-2.5.5.tar.gz.asc
validpgpkeys = 7100AADFAE6E6E940D2E0AD655E45A5AE8CA7C8A
validpgpkeys = 47A68FCE37C7D7024FD65E11356CE62C2B524099
sha256sums = 248a2c8a4d9b9858aa6baf52712c34afefcf9c9e94b76dce02c1c9aa25fb3375
sha256sums = SKIP
b2sums = d770cee1f3e02fbbcd9f25655b360ab38160ad800e2829a67f2b9da62b095a90be99ac851a67344cf95bd6810a6268da4655dc1d37d996e58239c4999eb41998
b2sums = SKIP
pkgname = libseccomp
provides = libseccomp.so
pkgname = python-libseccomp
depends = python
depends = libseccomp.so

48
extra/openmpi/.SRCINFO Normal file
View file

@ -0,0 +1,48 @@
pkgbase = openmpi
pkgdesc = High performance message passing library (MPI)
pkgver = 4.1.6
pkgrel = 1
url = https://www.open-mpi.org
arch = x86_64
license = custom:OpenMPI
makedepends = cuda
makedepends = gcc-fortran
makedepends = inetutils
makedepends = valgrind
depends = gcc-libs
depends = glibc
depends = hwloc
depends = libevent
depends = libnl
depends = openpmix
depends = openssh
depends = zlib
optdepends = cuda: cuda support
optdepends = gcc-fortran: fortran support
optdepends = perl: for aggregate_profile.pl and profile2mat.pl
provides = libmca_common_cuda.so
provides = libmca_common_monitoring.so
provides = libmca_common_ompio.so
provides = libmca_common_sm.so
provides = libmpi.so
provides = libmpi_cxx.so
provides = libmpi_mpifh.so
provides = libmpi_usempi_ignore_tkr.so
provides = libmpi_usempif08.so
provides = libompitrace.so
provides = libopen-pal.so
provides = libopen-rte.so
source = https://www.open-mpi.org/software/ompi/v4.1/downloads/openmpi-4.1.6.tar.bz2
sha256sums = f740994485516deb63b5311af122c265179f5328a0d857a567b85db00b11e415
b2sums = 4f119e1ed9b8787f0f860295ab1721fe2fd5300b8e182230a9eba3a864680b02bbd30618cc6d798a693a121626fc0ad5f447144d9ba91becb734f1a530d7a23a
pkgname = openmpi
depends = gcc-libs
depends = glibc
depends = hwloc
depends = libevent
depends = libnl
depends = openpmix
depends = openssh
depends = zlib
depends = libpmix.so

View file

@ -7,8 +7,8 @@
# - remove make/optdepend on cuda and configure option
pkgname=openmpi
pkgver=4.1.5
pkgrel=5
pkgver=4.1.6
pkgrel=1
pkgdesc='High performance message passing library (MPI)'
arch=(x86_64)
url='https://www.open-mpi.org'
@ -46,10 +46,9 @@ provides=(
libopen-rte.so
)
source=(
https://www.open-mpi.org/software/ompi/v${pkgver%.*}/downloads/$pkgname-$pkgver.tar.bz2
)
sha256sums=('a640986bc257389dd379886fdae6264c8cfa56bc98b71ce3ae3dfbd8ce61dbe3')
b2sums=('135a8373ed6173b7a94def18e3b964c6b6050c909382e0dbb1898a6d261ae428931358121ef6d325d303f4f510017a94970f7c66b280a5fc460365821f36dece')
https://www.open-mpi.org/software/ompi/v${pkgver%.*}/downloads/$pkgname-$pkgver.tar.bz2)
sha256sums=('f740994485516deb63b5311af122c265179f5328a0d857a567b85db00b11e415')
b2sums=('4f119e1ed9b8787f0f860295ab1721fe2fd5300b8e182230a9eba3a864680b02bbd30618cc6d798a693a121626fc0ad5f447144d9ba91becb734f1a530d7a23a')
build() {
local configure_options=(
@ -69,7 +68,8 @@ build() {
cd $pkgname-$pkgver
# TODO: depend on prrte with openmpi >= 5
./configure "${configure_options[@]}"
# TODO: remove ac_cv_func_sem_open=no when there is a glibc release fixing https://sourceware.org/bugzilla/show_bug.cgi?id=30789
ac_cv_func_sem_open=no ./configure "${configure_options[@]}"
# prevent excessive overlinking due to libtool
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make V=1

View file

@ -1,581 +0,0 @@
From 6e8e14f2c2f207d5fa51299cc67558697a5b7d63 Mon Sep 17 00:00:00 2001
From: Gilles Gouaillardet <gilles@rist.or.jp>
Date: Wed, 8 Mar 2023 10:48:00 +0900
Subject: [PATCH] pmix3x: use PMIX_VALUE_LOAD() and PMIX_INFO_LOAD() macros
Refs. open-mpi/ompi#10416
bot:notacherrypick
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
---
opal/mca/pmix/pmix3x/pmix3x.c | 273 ++++++++++++++++++++++-----
opal/mca/pmix/pmix3x/pmix3x.h | 6 +-
opal/mca/pmix/pmix3x/pmix3x_client.c | 48 ++---
3 files changed, 242 insertions(+), 85 deletions(-)
diff --git a/opal/mca/pmix/pmix3x/pmix3x.c b/opal/mca/pmix/pmix3x/pmix3x.c
index 3b2a5353cc6..c49b6772af5 100644
--- a/opal/mca/pmix/pmix3x/pmix3x.c
+++ b/opal/mca/pmix/pmix3x/pmix3x.c
@@ -1,7 +1,7 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
- * Copyright (c) 2014-2019 Research Organization for Information Science
+ * Copyright (c) 2014-2023 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2014-2015 Mellanox Technologies, Inc.
* All rights reserved.
@@ -217,8 +217,7 @@ static void return_local_event_hdlr(int status, opal_list_t *results,
PMIX_INFO_CREATE(op->info, op->ninfo);
n=0;
OPAL_LIST_FOREACH(kv, cd->info, opal_value_t) {
- (void)strncpy(op->info[n].key, kv->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&op->info[n].value, kv);
+ pmix3x_info_load(&op->info[n], kv);
++n;
}
}
@@ -735,7 +734,7 @@ char* pmix3x_convert_jobid(opal_jobid_t jobid)
/**** RHC: NEED TO ADD SUPPORT FOR NEW PMIX DATA TYPES, INCLUDING
**** CONVERSION OF PROC STATES ****/
-void pmix3x_value_load(pmix_value_t *v,
+void pmix3x_info_load(pmix_info_t *i,
opal_value_t *kv)
{
opal_pmix3x_jobid_trkr_t *job;
@@ -743,91 +742,264 @@ void pmix3x_value_load(pmix_value_t *v,
opal_list_t *list;
opal_value_t *val;
pmix_info_t *info;
+ pmix_envar_t envar;
size_t n;
switch(kv->type) {
case OPAL_UNDEF:
- v->type = PMIX_UNDEF;
+ PMIX_INFO_LOAD(i, kv->key, &kv->data, PMIX_UNDEF);
break;
case OPAL_BOOL:
- v->type = PMIX_BOOL;
- memcpy(&(v->data.flag), &kv->data.flag, 1);
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.flag, PMIX_BOOL);
break;
case OPAL_BYTE:
- v->type = PMIX_BYTE;
- memcpy(&(v->data.byte), &kv->data.byte, 1);
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.byte, PMIX_BYTE);
break;
case OPAL_STRING:
- v->type = PMIX_STRING;
- if (NULL != kv->data.string) {
- v->data.string = strdup(kv->data.string);
+ PMIX_INFO_LOAD(i, kv->key, kv->data.string, PMIX_STRING);
+ break;
+ case OPAL_SIZE:
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.size, PMIX_SIZE);
+ break;
+ case OPAL_PID:
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.pid, PMIX_PID);
+ break;
+ case OPAL_INT:
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.integer, PMIX_INT);
+ break;
+ case OPAL_INT8:
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.int8, PMIX_INT8);
+ break;
+ case OPAL_INT16:
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.int16, PMIX_INT16);
+ break;
+ case OPAL_INT32:
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.int32, PMIX_INT32);
+ break;
+ case OPAL_INT64:
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.int64, PMIX_INT64);
+ break;
+ case OPAL_UINT:
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.uint, PMIX_UINT);
+ break;
+ case OPAL_UINT8:
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.uint8, PMIX_UINT8);
+ break;
+ case OPAL_UINT16:
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.uint16, PMIX_UINT16);
+ break;
+ case OPAL_UINT32:
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.uint32, PMIX_UINT32);
+ break;
+ case OPAL_UINT64:
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.uint32, PMIX_UINT64);
+ break;
+ case OPAL_FLOAT:
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.fval, PMIX_FLOAT);
+ break;
+ case OPAL_DOUBLE:
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.dval, PMIX_DOUBLE);
+ break;
+ case OPAL_TIMEVAL:
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.tv, PMIX_TIMEVAL);
+ break;
+ case OPAL_TIME:
+ PMIX_INFO_LOAD(i, kv->key, &kv->data.time, PMIX_TIME);
+ break;
+ case OPAL_STATUS:
+ i->value.type = PMIX_STATUS;
+ i->value.data.status = pmix3x_convert_opalrc(kv->data.status);
+ break;
+ case OPAL_VPID:
+ i->value.type = PMIX_PROC_RANK;
+ i->value.data.rank = pmix3x_convert_opalrank(kv->data.name.vpid);
+ break;
+ case OPAL_NAME:
+ i->value.type = PMIX_PROC;
+ /* have to stringify the jobid */
+ PMIX_PROC_CREATE(i->value.data.proc, 1);
+ /* see if this job is in our list of known nspaces */
+ found = false;
+ OPAL_LIST_FOREACH(job, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
+ if (job->jobid == kv->data.name.jobid) {
+ (void)strncpy(i->value.data.proc->nspace, job->nspace, PMIX_MAX_NSLEN);
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ (void)opal_snprintf_jobid(i->value.data.proc->nspace, PMIX_MAX_NSLEN, kv->data.name.jobid);
+ }
+ i->value.data.proc->rank = pmix3x_convert_opalrank(kv->data.name.vpid);
+ break;
+ case OPAL_BYTE_OBJECT:
+ i->value.type = PMIX_BYTE_OBJECT;
+ if (NULL != kv->data.bo.bytes) {
+ i->value.data.bo.bytes = (char*)malloc(kv->data.bo.size);
+ memcpy(i->value.data.bo.bytes, kv->data.bo.bytes, kv->data.bo.size);
+ i->value.data.bo.size = (size_t)kv->data.bo.size;
+ } else {
+ i->value.data.bo.bytes = NULL;
+ i->value.data.bo.size = 0;
+ }
+ break;
+ case OPAL_PERSIST:
+ i->value.type = PMIX_PERSIST;
+ i->value.data.persist = pmix3x_convert_opalpersist((opal_pmix_persistence_t)kv->data.uint8);
+ break;
+ case OPAL_SCOPE:
+ i->value.type = PMIX_SCOPE;
+ i->value.data.scope = pmix3x_convert_opalscope((opal_pmix_scope_t)kv->data.uint8);
+ break;
+ case OPAL_DATA_RANGE:
+ i->value.type = PMIX_DATA_RANGE;
+ i->value.data.range = pmix3x_convert_opalrange((opal_pmix_data_range_t)kv->data.uint8);
+ break;
+ case OPAL_PROC_STATE:
+ i->value.type = PMIX_PROC_STATE;
+ /* the OPAL layer doesn't have any concept of proc state,
+ * so the ORTE layer is responsible for converting it */
+ memcpy(&i->value.data.state, &kv->data.uint8, sizeof(uint8_t));
+ break;
+ case OPAL_PTR:
+ /* if the opal_value_t is passing a true pointer, then
+ * respect that request and pass it along */
+ if (0 == strcmp(kv->key, OPAL_PMIX_EVENT_RETURN_OBJECT)) {
+ i->value.type = PMIX_POINTER;
+ i->value.data.ptr = kv->data.ptr;
+ break;
+ }
+ /* otherwise, it must be to a list of
+ * opal_value_t's that we need to convert to a pmix_data_array
+ * of pmix_info_t structures */
+ list = (opal_list_t*)kv->data.ptr;
+ i->value.type = PMIX_DATA_ARRAY;
+ i->value.data.darray = (pmix_data_array_t*)malloc(sizeof(pmix_data_array_t));
+ i->value.data.darray->type = PMIX_INFO;
+ i->value.data.darray->size = opal_list_get_size(list);
+ if (0 < i->value.data.darray->size) {
+ PMIX_INFO_CREATE(info, i->value.data.darray->size);
+ i->value.data.darray->array = info;
+ n=0;
+ OPAL_LIST_FOREACH(val, list, opal_value_t) {
+ if (NULL != val->key) {
+ (void)strncpy(info[n].key, val->key, PMIX_MAX_KEYLEN);
+ }
+ pmix3x_value_load(&info[n].value, val);
+ ++n;
+ }
} else {
- v->data.string = NULL;
+ i->value.data.darray->array = NULL;
+ }
+ break;
+ case OPAL_PROC_INFO:
+ i->value.type = PMIX_PROC_INFO;
+ PMIX_PROC_INFO_CREATE(i->value.data.pinfo, 1);
+ /* see if this job is in our list of known nspaces */
+ found = false;
+ OPAL_LIST_FOREACH(job, &mca_pmix_pmix3x_component.jobids, opal_pmix3x_jobid_trkr_t) {
+ if (job->jobid == kv->data.pinfo.name.jobid) {
+ (void)strncpy(i->value.data.pinfo->proc.nspace, job->nspace, PMIX_MAX_NSLEN);
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ (void)opal_snprintf_jobid(i->value.data.pinfo->proc.nspace, PMIX_MAX_NSLEN, kv->data.pinfo.name.jobid);
}
+ i->value.data.pinfo->proc.rank = pmix3x_convert_opalrank(kv->data.pinfo.name.vpid);
+ if (NULL != kv->data.pinfo.hostname) {
+ i->value.data.pinfo->hostname = strdup(kv->data.pinfo.hostname);
+ }
+ if (NULL != kv->data.pinfo.executable_name) {
+ i->value.data.pinfo->executable_name = strdup(kv->data.pinfo.executable_name);
+ }
+ i->value.data.pinfo->pid = kv->data.pinfo.pid;
+ i->value.data.pinfo->exit_code = kv->data.pinfo.exit_code;
+ i->value.data.pinfo->state = pmix3x_convert_opalstate(kv->data.pinfo.state);
+ break;
+ case OPAL_ENVAR:
+ PMIX_ENVAR_CONSTRUCT(&envar);
+ PMIX_ENVAR_LOAD(&envar, kv->data.envar.envar, kv->data.envar.value, kv->data.envar.separator);
+ PMIX_INFO_LOAD(i, kv->key, &envar, PMIX_ENVAR);
+ PMIX_ENVAR_DESTRUCT(&envar);
+ break;
+ default:
+ /* silence warnings */
+ break;
+ }
+}
+
+void pmix3x_value_load(pmix_value_t *v,
+ opal_value_t *kv)
+{
+ opal_pmix3x_jobid_trkr_t *job;
+ bool found;
+ opal_list_t *list;
+ opal_value_t *val;
+ pmix_info_t *info;
+ size_t n;
+
+ switch(kv->type) {
+ case OPAL_UNDEF:
+ PMIX_VALUE_LOAD(v, NULL, PMIX_UNDEF);
+ break;
+ case OPAL_BOOL:
+ PMIX_VALUE_LOAD(v, &kv->data.flag, PMIX_BOOL);
+ break;
+ case OPAL_BYTE:
+ PMIX_VALUE_LOAD(v, &kv->data.byte, PMIX_BYTE);
+ break;
+ case OPAL_STRING:
+ PMIX_VALUE_LOAD(v, kv->data.string, PMIX_STRING);
break;
case OPAL_SIZE:
- v->type = PMIX_SIZE;
- memcpy(&(v->data.size), &kv->data.size, sizeof(size_t));
+ PMIX_VALUE_LOAD(v, &kv->data.size, PMIX_SIZE);
break;
case OPAL_PID:
- v->type = PMIX_PID;
- memcpy(&(v->data.pid), &kv->data.pid, sizeof(pid_t));
+ PMIX_VALUE_LOAD(v, &kv->data.pid, PMIX_PID);
break;
case OPAL_INT:
- v->type = PMIX_INT;
- memcpy(&(v->data.integer), &kv->data.integer, sizeof(int));
+ PMIX_VALUE_LOAD(v, &kv->data.integer, PMIX_INT);
break;
case OPAL_INT8:
- v->type = PMIX_INT8;
- memcpy(&(v->data.int8), &kv->data.int8, 1);
+ PMIX_VALUE_LOAD(v, &kv->data.int8, PMIX_INT8);
break;
case OPAL_INT16:
- v->type = PMIX_INT16;
- memcpy(&(v->data.int16), &kv->data.int16, 2);
+ PMIX_VALUE_LOAD(v, &kv->data.int16, PMIX_INT16);
break;
case OPAL_INT32:
- v->type = PMIX_INT32;
- memcpy(&(v->data.int32), &kv->data.int32, 4);
+ PMIX_VALUE_LOAD(v, &kv->data.int32, PMIX_INT32);
break;
case OPAL_INT64:
- v->type = PMIX_INT64;
- memcpy(&(v->data.int64), &kv->data.int64, 8);
+ PMIX_VALUE_LOAD(v, &kv->data.int64, PMIX_INT64);
break;
case OPAL_UINT:
- v->type = PMIX_UINT;
- memcpy(&(v->data.uint), &kv->data.uint, sizeof(int));
+ PMIX_VALUE_LOAD(v, &kv->data.uint, PMIX_UINT);
break;
case OPAL_UINT8:
- v->type = PMIX_UINT8;
- memcpy(&(v->data.uint8), &kv->data.uint8, 1);
+ PMIX_VALUE_LOAD(v, &kv->data.uint8, PMIX_UINT8);
break;
case OPAL_UINT16:
- v->type = PMIX_UINT16;
- memcpy(&(v->data.uint16), &kv->data.uint16, 2);
+ PMIX_VALUE_LOAD(v, &kv->data.uint16, PMIX_UINT16);
break;
case OPAL_UINT32:
- v->type = PMIX_UINT32;
- memcpy(&(v->data.uint32), &kv->data.uint32, 4);
+ PMIX_VALUE_LOAD(v, &kv->data.uint32, PMIX_UINT32);
break;
case OPAL_UINT64:
- v->type = PMIX_UINT64;
- memcpy(&(v->data.uint64), &kv->data.uint64, 8);
+ PMIX_VALUE_LOAD(v, &kv->data.uint64, PMIX_UINT64);
break;
case OPAL_FLOAT:
- v->type = PMIX_FLOAT;
- memcpy(&(v->data.fval), &kv->data.fval, sizeof(float));
+ PMIX_VALUE_LOAD(v, &kv->data.fval, PMIX_FLOAT);
break;
case OPAL_DOUBLE:
- v->type = PMIX_DOUBLE;
- memcpy(&(v->data.dval), &kv->data.dval, sizeof(double));
+ PMIX_VALUE_LOAD(v, &kv->data.dval, PMIX_DOUBLE);
break;
case OPAL_TIMEVAL:
- v->type = PMIX_TIMEVAL;
- memcpy(&(v->data.tv), &kv->data.tv, sizeof(struct timeval));
+ PMIX_VALUE_LOAD(v, &kv->data.tv, PMIX_TIMEVAL);
break;
case OPAL_TIME:
- v->type = PMIX_TIME;
- memcpy(&(v->data.time), &kv->data.time, sizeof(time_t));
+ PMIX_VALUE_LOAD(v, &kv->data.time, PMIX_TIME);
break;
case OPAL_STATUS:
v->type = PMIX_STATUS;
@@ -1308,8 +1480,7 @@ static void register_handler(opal_list_t *event_codes,
PMIX_INFO_CREATE(op->info, op->ninfo);
n=0;
OPAL_LIST_FOREACH(kv, info, opal_value_t) {
- (void)strncpy(op->info[n].key, kv->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&op->info[n].value, kv);
+ pmix3x_info_load(&op->info[n], kv);
++n;
}
}
@@ -1428,7 +1599,7 @@ static int notify_event(int status,
op->info[n].value.type = PMIX_STATUS;
op->info[n].value.data.status = pmix3x_convert_opalrc(kv->data.integer);
} else {
- pmix3x_value_load(&op->info[n].value, kv);
+ pmix3x_info_load(&op->info[n], kv);
}
++n;
}
@@ -1533,8 +1704,7 @@ static void pmix3x_query(opal_list_t *queries,
PMIX_INFO_CREATE(cd->queries[n].qualifiers, cd->queries[n].nqual);
nq = 0;
OPAL_LIST_FOREACH(ival, &q->qualifiers, opal_value_t) {
- (void)strncpy(cd->queries[n].qualifiers[nq].key, ival->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&cd->queries[n].qualifiers[nq].value, ival);
+ pmix3x_info_load(&cd->queries[n].qualifiers[nq], ival);
++nq;
}
}
@@ -1596,8 +1766,7 @@ static void pmix3x_log(opal_list_t *info,
PMIX_INFO_CREATE(cd->info, cd->ninfo);
n=0;
OPAL_LIST_FOREACH(ival, info, opal_value_t) {
- (void)strncpy(cd->info[n].key, ival->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&cd->info[n].value, ival);
+ pmix3x_info_load(&cd->info[n], ival);
++n;
}
diff --git a/opal/mca/pmix/pmix3x/pmix3x.h b/opal/mca/pmix/pmix3x/pmix3x.h
index 94e46bbd461..7048af0cb03 100644
--- a/opal/mca/pmix/pmix3x/pmix3x.h
+++ b/opal/mca/pmix/pmix3x/pmix3x.h
@@ -3,8 +3,8 @@
* Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2015 Mellanox Technologies, Inc.
* All rights reserved.
- * Copyright (c) 2016 Research Organization for Information Science
- * and Technology (RIST). All rights reserved.
+ * Copyright (c) 2016-2023 Research Organization for Information Science
+ * and Technology (RIST). All rights reserved.
* Copyright (c) 2017 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2021 IBM Corporation. All rights reserved.
@@ -334,6 +334,8 @@ OPAL_MODULE_DECLSPEC opal_pmix_data_range_t pmix3x_convert_range(pmix_data_range
OPAL_MODULE_DECLSPEC opal_pmix_persistence_t pmix3x_convert_persist(pmix_persistence_t scope);
OPAL_MODULE_DECLSPEC pmix_persistence_t pmix3x_convert_opalpersist(opal_pmix_persistence_t scope);
+OPAL_MODULE_DECLSPEC void pmix3x_info_load(pmix_info_t *v,
+ opal_value_t *kv);
OPAL_MODULE_DECLSPEC void pmix3x_value_load(pmix_value_t *v,
opal_value_t *kv);
OPAL_MODULE_DECLSPEC int pmix3x_value_unload(opal_value_t *kv,
diff --git a/opal/mca/pmix/pmix3x/pmix3x_client.c b/opal/mca/pmix/pmix3x/pmix3x_client.c
index caf1a409f4a..5d9f0fd28bb 100644
--- a/opal/mca/pmix/pmix3x/pmix3x_client.c
+++ b/opal/mca/pmix/pmix3x/pmix3x_client.c
@@ -1,8 +1,8 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
- * Copyright (c) 2014-2017 Research Organization for Information Science
- * and Technology (RIST). All rights reserved.
+ * Copyright (c) 2014-2023 Research Organization for Information Science
+ * and Technology (RIST). All rights reserved.
* Copyright (c) 2014-2017 Mellanox Technologies, Inc.
* All rights reserved.
* Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
@@ -93,8 +93,7 @@ int pmix3x_client_init(opal_list_t *ilist)
PMIX_INFO_CREATE(pinfo, ninfo);
n=0;
OPAL_LIST_FOREACH(ival, ilist, opal_value_t) {
- (void)strncpy(pinfo[n].key, ival->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&pinfo[n].value, ival);
+ pmix3x_info_load(&pinfo[n], ival);
++n;
}
} else {
@@ -222,8 +221,7 @@ int pmix3x_tool_init(opal_list_t *info)
PMIX_INFO_CREATE(pinfo, ninfo);
n=0;
OPAL_LIST_FOREACH(val, info, opal_value_t) {
- (void)strncpy(pinfo[n].key, val->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&pinfo[n].value, val);
+ pmix3x_info_load(&pinfo[n], val);
++n;
/* check to see if our name is being given from above */
if (0 == strcmp(val->key, OPAL_PMIX_TOOL_NSPACE)) {
@@ -647,8 +645,7 @@ int pmix3x_get(const opal_process_name_t *proc, const char *key,
PMIX_INFO_CREATE(pinfo, sz);
n=0;
OPAL_LIST_FOREACH(ival, info, opal_value_t) {
- (void)strncpy(pinfo[n].key, ival->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&pinfo[n].value, ival);
+ pmix3x_info_load(&pinfo[n], ival);
++n;
}
}
@@ -768,8 +765,7 @@ int pmix3x_getnb(const opal_process_name_t *proc, const char *key,
PMIX_INFO_CREATE(op->info, op->sz);
n=0;
OPAL_LIST_FOREACH(val, info, opal_value_t) {
- (void)strncpy(op->info[n].key, val->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&op->info[n].value, val);
+ pmix3x_info_load(&op->info[n], val);
++n;
}
}
@@ -809,8 +805,7 @@ int pmix3x_publish(opal_list_t *info)
PMIX_INFO_CREATE(pinfo, sz);
n=0;
OPAL_LIST_FOREACH(iptr, info, opal_value_t) {
- (void)strncpy(pinfo[n].key, iptr->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&pinfo[n].value, iptr);
+ pmix3x_info_load(&pinfo[n], iptr);
++n;
}
} else {
@@ -857,8 +852,7 @@ int pmix3x_publishnb(opal_list_t *info,
PMIX_INFO_CREATE(op->info, op->sz);
n=0;
OPAL_LIST_FOREACH(iptr, info, opal_value_t) {
- (void)strncpy(op->info[n].key, iptr->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&op->info[n].value, iptr);
+ pmix3x_info_load(&op->info[n], iptr);
++n;
}
}
@@ -903,8 +897,7 @@ int pmix3x_lookup(opal_list_t *data, opal_list_t *info)
PMIX_INFO_CREATE(pinfo, sz);
n=0;
OPAL_LIST_FOREACH(iptr, info, opal_value_t) {
- (void)strncpy(pinfo[n].key, iptr->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&pinfo[n].value, iptr);
+ pmix3x_info_load(&pinfo[n], iptr);
++n;
}
}
@@ -1052,8 +1045,7 @@ int pmix3x_lookupnb(char **keys, opal_list_t *info,
PMIX_INFO_CREATE(op->info, op->sz);
n=0;
OPAL_LIST_FOREACH(iptr, info, opal_value_t) {
- (void)strncpy(op->info[n].key, iptr->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&op->info[n].value, iptr);
+ pmix3x_info_load(&op->info[n], iptr);
++n;
}
}
@@ -1080,8 +1072,7 @@ int pmix3x_unpublish(char **keys, opal_list_t *info)
PMIX_INFO_CREATE(pinfo, ninfo);
n=0;
OPAL_LIST_FOREACH(iptr, info, opal_value_t) {
- (void)strncpy(pinfo[n].key, iptr->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&pinfo[n].value, iptr);
+ pmix3x_info_load(&pinfo[n], iptr);
++n;
}
} else {
@@ -1119,8 +1110,7 @@ int pmix3x_unpublishnb(char **keys, opal_list_t *info,
PMIX_INFO_CREATE(op->info, op->sz);
n=0;
OPAL_LIST_FOREACH(iptr, info, opal_value_t) {
- (void)strncpy(op->info[n].key, iptr->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&op->info[n].value, iptr);
+ pmix3x_info_load(&op->info[n], iptr);
++n;
}
}
@@ -1154,8 +1144,7 @@ int pmix3x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid)
PMIX_INFO_CREATE(info, ninfo);
n=0;
OPAL_LIST_FOREACH(ival, job_info, opal_value_t) {
- (void)strncpy(info[n].key, ival->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&info[n].value, ival);
+ pmix3x_info_load(&info[n], ival);
++n;
}
}
@@ -1180,7 +1169,7 @@ int pmix3x_spawn(opal_list_t *job_info, opal_list_t *apps, opal_jobid_t *jobid)
m=0;
OPAL_LIST_FOREACH(ival, &app->info, opal_value_t) {
(void)strncpy(papps[n].info[m].key, ival->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&papps[n].info[m].value, ival);
+ pmix3x_info_load(&papps[n].info[m], ival);
++m;
}
}
@@ -1270,8 +1259,7 @@ int pmix3x_spawnnb(opal_list_t *job_info, opal_list_t *apps,
PMIX_INFO_CREATE(op->info, op->ninfo);
n=0;
OPAL_LIST_FOREACH(info, job_info, opal_value_t) {
- (void)strncpy(op->info[n].key, info->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&op->info[n].value, info);
+ pmix3x_info_load(&op->info[n], info);
++n;
}
}
@@ -1292,8 +1280,7 @@ int pmix3x_spawnnb(opal_list_t *job_info, opal_list_t *apps,
PMIX_INFO_CREATE(op->apps[n].info, op->apps[n].ninfo);
m=0;
OPAL_LIST_FOREACH(info, &app->info, opal_value_t) {
- (void)strncpy(op->apps[n].info[m].key, info->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&op->apps[n].info[m].value, info);
+ pmix3x_info_load(&op->apps[n].info[m], info);
++m;
}
}
@@ -1659,8 +1646,7 @@ abort();
PMIX_INFO_CREATE(op->info, op->ninfo);
n=0;
OPAL_LIST_FOREACH(iptr, directives, opal_value_t) {
- (void)strncpy(op->info[n].key, iptr->key, PMIX_MAX_KEYLEN);
- pmix3x_value_load(&op->info[n].value, iptr);
+ pmix3x_info_load(&op->info[n], iptr);
++n;
}
}