Skip to content

Commit

Permalink
Merge branch 'master' into amd/pre-read
Browse files Browse the repository at this point in the history
Features: dfuse

Required-githooks: true
  • Loading branch information
ashleypittman committed Sep 25, 2023
2 parents 036d047 + 0277433 commit 931b578
Show file tree
Hide file tree
Showing 147 changed files with 5,146 additions and 1,638 deletions.
22 changes: 8 additions & 14 deletions .rpmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,22 @@
# but should not be included in the current release
#

centos7/daos-client-tests-openmpi*.rpm
centos7/daos-firmware*.rpm
centos7/daos-mofed*.rpm
centos7/daos-serialize*.rpm
centos7/daos-server-tests-openmpi*.rpm
centos7/daos-tests-internal*.rpm
centos7/ucx*.rpm

el8/daos-client-tests-openmpi*.rpm
el8/daos-*tests*.rpm
el8/daos-firmware*.rpm
el8/daos-mofed*.rpm
el8/daos-serialize*.rpm
el8/daos-server-tests-openmpi*.rpm
el8/daos-tests-internal*.rpm
el8/ucx*.rpm

leap15/daos-client-tests-openmpi*.rpm
el9/daos-*tests*.rpm
el9/daos-firmware*.rpm
el9/daos-mofed*.rpm
el9/daos-serialize*.rpm
el9/ucx*.rpm

leap15/daos-*tests*.rpm
leap15/daos-firmware*.rpm
leap15/daos-mofed*.rpm
leap15/daos-serialize*.rpm
leap15/daos-server-tests-openmpi*.rpm
leap15/daos-tests-internal*.rpm
leap15/openucx*.rpm
leap15/ucx*.rpm
leap15/*protobuf-c*.rpm
Expand Down
6 changes: 5 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ void job_step_update(def value) {
Map nlt_test() {
// groovylint-disable-next-line NoJavaUtilDate
Date startDate = new Date()
try {
unstash('nltr')
} catch (e) {
print 'Unstash failed, results from NLT stage will not be included'
}
sh label: 'Fault injection testing using NLT',
script: './ci/docker_nlt.sh --class-name el8.fault-injection fi'
List filesList = []
Expand Down Expand Up @@ -1104,7 +1109,6 @@ pipeline {
sconsBuild(parallel_build: true,
scons_args: 'PREFIX=/opt/daos TARGET_TYPE=release BUILD_TYPE=debug',
build_deps: 'no'))
unstash('nltr')
job_step_update(nlt_test())
recordCoverage(tools: [[parser: 'COBERTURA', pattern:'nltr.xml']],
skipPublishingChecks: true,
Expand Down
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ MINIMAL_ENV = ('HOME', 'TERM', 'SSH_AUTH_SOCK', 'http_proxy', 'https_proxy', 'PK

# Environment variables that are also kept when LD_PRELOAD is set.
PRELOAD_ENV = ('LD_PRELOAD', 'D_LOG_FILE', 'DAOS_AGENT_DRPC_DIR', 'D_LOG_MASK', 'DD_MASK',
'DD_SUBSYS')
'DD_SUBSYS', 'D_IL_MAX_EQ')


def scons():
Expand Down
5 changes: 4 additions & 1 deletion ci/rpm/build_unsuccessful.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ mydir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
ci_envs="$mydir/../parse_ci_envs.sh"
if [ -e "${ci_envs}" ]; then
# at some point we want to use: shellcheck source=ci/parse_ci_envs.sh
# shellcheck disable=SC1091
# shellcheck disable=SC1091,SC1090
source "${ci_envs}"
fi

Expand All @@ -25,6 +25,9 @@ if [ -d /var/cache/pbuilder/ ]; then
exit 0
fi

rpm -q mock
mock --debug-config

mockroot="/var/lib/mock/$CHROOT_NAME"
cat "$mockroot"/result/{root,build}.log 2>/dev/null || true

Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Project Information
site_name: DAOS v2.5 - master
site_name: DAOS v2.5
site_description: Distributed Asynchronous Object Storage
site_author: DAOS Project

Expand Down
15 changes: 6 additions & 9 deletions site_scons/components/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def check(self, name):
self.installed.append(name)
return True

if not GetOption('help'):
if not GetOption('help') and not GetOption('silent'):
print(f'Using build version of {name}')
self.not_installed.append(name)
return False
Expand Down Expand Up @@ -90,12 +90,14 @@ def check(reqs, name, built_str, installed_str=""):

def ofi_config(config):
"""Check ofi version"""
print('Checking for libfabric > 1.11...', end=' ')
if not GetOption('silent'):
print('Checking for libfabric > 1.11...', end=' ')
code = """#include <rdma/fabric.h>
_Static_assert(FI_MAJOR_VERSION == 1 && FI_MINOR_VERSION >= 11,
"libfabric must be >= 1.11");"""
rc = config.TryCompile(code, ".c")
print('yes' if rc else 'no')
if not GetOption('silent'):
print('yes' if rc else 'no')
return rc


Expand Down Expand Up @@ -132,6 +134,7 @@ def define_mercury(reqs):
libs=['fabric'],
config_cb=ofi_config,
headers=['rdma/fabric.h'],
pkgconfig='libfabric',
package='libfabric-devel' if inst(reqs, 'ofi') else None,
patch_rpath=['lib'],
build_env={'CFLAGS': "-fstack-usage"})
Expand Down Expand Up @@ -184,12 +187,6 @@ def define_mercury(reqs):
else:
mercury_build.append('-DMERCURY_ENABLE_DEBUG:BOOL=OFF')

mercury_build.extend(check(reqs,
'ofi',
['-DOFI_INCLUDE_DIR:PATH=$OFI_PREFIX/include',
'-DOFI_LIBRARY:FILEPATH=$OFI_PREFIX/lib/libfabric.so'],
[]))

reqs.define('mercury',
retriever=GitRepoRetriever('https://github.com/mercury-hpc/mercury.git', True),
commands=[mercury_build,
Expand Down
35 changes: 19 additions & 16 deletions site_scons/env_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ class _env_module(): # pylint: disable=invalid-name
"openmpi": ['mpi/mlnx_openmpi-x86_64', 'mpi/openmpi3-x86_64',
'gnu-openmpi', 'mpi/openmpi-x86_64']}

def __init__(self):
def __init__(self, silent=False):
"""Load Modules for initializing environment variables"""
# Leap 15's lmod-lua doesn't include the usual module path
# in it's MODULEPATH, for some unknown reason
os.environ["MODULEPATH"] = ":".join([os.path.join(os.sep, "usr", "share", "modules"),
os.path.join(os.sep, "usr", "share", "modulefiles"),
os.path.join(os.sep, "etc", "modulefiles")]
+ os.environ.get("MODULEPATH", "").split(":"))
self._silent = silent
self._module_load = self._init_mpi_module()

def _module_func(self, command, *arguments): # pylint: disable=no-self-use
Expand All @@ -56,7 +57,8 @@ def _module_func(self, command, *arguments): # pylint: disable=no-self-use

# pylint: disable=consider-using-with
try:
print(f"Going to run {cmd}")
if not self._silent:
print(' '.join(cmd))
proc = Popen(cmd, stdout=PIPE, stderr=PIPE)
except OSError as error:
if error.errno == errno.ENOENT:
Expand All @@ -81,11 +83,11 @@ def _module_func(self, command, *arguments): # pylint: disable=no-self-use
# return _mlstatus, stderr.decode() # pylint: disable=undefined-variable

def _init_mpi_module(self):
"""init mpi module function"""
"""Init mpi module function"""
return self._mpi_module

def _mpi_module(self, mpi):
"""attempt to load the requested module"""
"""Attempt to load the requested module"""
load = []
unload = []

Expand All @@ -109,16 +111,17 @@ def _mpi_module(self, mpi):
self._module_func('unload', to_unload)

for to_load in load:
print(f"Trying to load {to_load}")
if self._module_func('is-avail', to_load)[0] and \
self._module_func('load', to_load)[0]:
print(f'Loaded {to_load}')
if not self._silent:
print(f"Trying to load {to_load}")
if self._module_func('is-avail', to_load)[0] and self._module_func('load', to_load)[0]:
if not self._silent:
print(f'Loaded {to_load}')
return True

return False

def _mpi_module_old(self, mpi):
"""attempt to load the requested module"""
"""Attempt to load the requested module"""
load = []
for key, value in self._mpi_map.items():
if key == mpi:
Expand Down Expand Up @@ -162,7 +165,7 @@ def load_mpi(self, mpi):
return True

def show_avail(self):
"""list available modules"""
"""List available modules"""
try:
status, output = self._module_func('avail')
if not status:
Expand All @@ -172,12 +175,12 @@ def show_avail(self):
return output

def get_map(self, key):
"""return the mpi map"""
"""Return the mpi map"""
return self._mpi_map[key]


def load_mpi(mpi):
"""global function to load MPI into os.environ"""
def load_mpi(mpi, silent=False):
"""Global function to load MPI into os.environ"""
# On Ubuntu, MPI stacks use alternatives and need root to change their
# pointer, so just verify that the desired MPI is loaded
if distro.id() == "ubuntu":
Expand All @@ -201,19 +204,19 @@ def load_mpi(mpi):
return False

if _env_module.env_module_init is None:
_env_module.env_module_init = _env_module()
_env_module.env_module_init = _env_module(silent)
return _env_module.env_module_init.load_mpi(mpi)


def show_avail():
"""global function to show the available modules"""
"""Global function to show the available modules"""
if _env_module.env_module_init is None:
_env_module.env_module_init = _env_module()
return _env_module.env_module_init.show_avail()


def get_module_list(key):
"""global function to show the modules that map to a key"""
"""Global function to show the modules that map to a key"""
if _env_module.env_module_init is None:
_env_module.env_module_init = _env_module()
return _env_module.env_module_init.get_map(key)
8 changes: 6 additions & 2 deletions site_scons/prereq_tools/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,11 @@ def _parse_config(self, env, opts):

return

def _print(self, msg):
if GetOption('silent'):
return
print(msg)

def has_missing_targets(self, env):
"""Check for expected build targets (e.g. libraries or headers)"""
# pylint: disable=too-many-return-statements
Expand All @@ -1151,7 +1156,7 @@ def has_missing_targets(self, env):
print('help set')
return True

print(f"Checking targets for component '{self.name}'")
self._print(f"Checking targets for component '{self.name}'")

config = env.Configure()
config_cb = self.key_words.get("config_cb", None)
Expand Down Expand Up @@ -1244,7 +1249,6 @@ def configure(self):

def set_environment(self, env, needed_libs):
"""Modify the specified construction environment to build with the external component"""

if self.skip_arch:
return

Expand Down
5 changes: 3 additions & 2 deletions site_scons/site_tools/compiler_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ def _base_setup(env):
compiler = env['CC']

build_type = env['BUILD_TYPE']
print(f'Setting up compile environment for {compiler}')
print(f"Build type is '{build_type}'")
if not GetOption('silent'):
print(f'Setting up compile environment for {compiler}')
print(f"Build type is '{build_type}'")

prev_compiler = env.get('BSETUP', False)
if prev_compiler:
Expand Down
12 changes: 8 additions & 4 deletions site_scons/site_tools/daos_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ def _configure_mpi(self):
if GetOption('help'):
return None

def _print(msg):
if not GetOption('silent'):
print(msg)

env = self.Clone()

env['CXX'] = None
Expand All @@ -233,13 +237,13 @@ def _configure_mpi(self):
return env

for mpi in ['openmpi', 'mpich']:
if not load_mpi(mpi):
if not load_mpi(mpi, GetOption('silent')):
continue
if _find_mpicc(env):
print(f'{mpi} is installed')
_print(f'{mpi} is installed')
return env
print(f'No {mpi} installed and/or loaded')
print("No MPI installed")
_print(f'No {mpi} installed and/or loaded')
_print("No MPI installed")
return None


Expand Down
3 changes: 2 additions & 1 deletion src/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def read_and_save_version(env):
'@Template for @': ''}

out = env.Substfile(tmpl_hdr_in, SUBST_DICT=subst_dict)
print(f'generated daos version header file: {out[0].abspath}')
if not GetOption('silent'):
print(f'generated daos version header file: {out[0].abspath}')

return version

Expand Down
5 changes: 5 additions & 0 deletions src/cart/README.env
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ This file lists the environment variables used in CaRT.
by default, and can be specified using DD_SUBSYS, for example:
"DD_SUBSYS=RPC,BULK,CORPC,GRP,LM,HG,PMIX,ST,IV" or also "DD_SUBSYS=all".

. D_MEMORY_TRACK
User can enable memory track for daos engine by D_MEMORY_TRACK=1. With the
environment, all of allocations inside DAOS (by D_ALLOC) will be tracked, and
total allocated bytes per xstream can be shown through metrics.

. CRT_TIMEOUT
Set it as integer in the range of (0, 3600] to set the global timeout value
of all RPCs (second). Without setting it or set it as any other value will
Expand Down
5 changes: 3 additions & 2 deletions src/cart/crt_hg.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,9 @@ crt_provider_get_ctx_idx(bool primary, int provider)
}
}

D_ERROR("ctx_num %d, will exceed CRT_SRV_CONTEXT_NUM (%d) if create more context.\n",
prov_data->cpg_ctx_num, CRT_SRV_CONTEXT_NUM);
D_DEBUG(DB_ALL, "provider:%d allowed context limit = %d exceeded\n",
provider, CRT_SRV_CONTEXT_NUM);

return -1;
}

Expand Down
12 changes: 8 additions & 4 deletions src/client/api/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,13 @@ daos_event_complete(struct daos_event *ev, int rc)
}

if (evx->evx_status == DAOS_EVS_READY || evx->evx_status == DAOS_EVS_COMPLETED ||
evx->evx_status == DAOS_EVS_ABORTED)
evx->evx_status == DAOS_EVS_ABORTED) {
if (evx->is_errno)
ev->ev_error = daos_der2errno(rc);
else
ev->ev_error = rc;
goto out;
}

D_ASSERT(evx->evx_status == DAOS_EVS_RUNNING);

Expand Down Expand Up @@ -830,7 +835,7 @@ daos_eq_destroy(daos_handle_t eqh, int flags)

eqx = daos_eq_lookup(eqh);
if (eqx == NULL) {
D_ERROR("eqh nonexist.\n");
D_ERROR("daos_eq_lookup() failed: "DF_RC"\n", DP_RC(-DER_NONEXIST));
return -DER_NONEXIST;
}

Expand Down Expand Up @@ -862,8 +867,7 @@ daos_eq_destroy(daos_handle_t eqh, int flags)
if (eqx->eqx_ctx != NULL) {
rc = crt_context_flush(eqx->eqx_ctx, 0);
if (rc != 0) {
D_ERROR("failed to flush client context: "DF_RC"\n",
DP_RC(rc));
D_ERROR("failed to flush client context: "DF_RC"\n", DP_RC(rc));
return rc;
}
}
Expand Down
Loading

0 comments on commit 931b578

Please sign in to comment.