Hello community, here is the log from the commit of package libpsm2 for openSUSE:Factory checked in at 2020-07-31 15:53:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libpsm2 (Old) and /work/SRC/openSUSE:Factory/.libpsm2.new.3592 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libpsm2" Fri Jul 31 15:53:11 2020 rev:17 rq:823143 version:11.2.185 Changes: -------- --- /work/SRC/openSUSE:Factory/libpsm2/libpsm2.changes 2020-07-06 16:20:03.705460170 +0200 +++ /work/SRC/openSUSE:Factory/.libpsm2.new.3592/libpsm2.changes 2020-07-31 15:54:16.744248428 +0200 @@ -1,0 +2,7 @@ +Wed Jul 22 15:31:44 UTC 2020 - Nicolas Morey-Chaisemartin <[email protected]> + +- Update to 11.2.185 + - No release notes available +- Refresh libpsm2-use_RPM_OPT_FLAGS.patch against latest sources + +------------------------------------------------------------------- Old: ---- libpsm2-11.2.166.tar.bz2 New: ---- libpsm2-11.2.185.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libpsm2.spec ++++++ --- /var/tmp/diff_new_pack.CUI1Of/_old 2020-07-31 15:54:18.932255860 +0200 +++ /var/tmp/diff_new_pack.CUI1Of/_new 2020-07-31 15:54:18.936255874 +0200 @@ -20,7 +20,7 @@ %define psm_so 2 Name: libpsm2 -Version: 11.2.166 +Version: 11.2.185 Release: 0 Summary: Intel PSM Messaging API libraries License: BSD-2-Clause OR GPL-2.0-only ++++++ _service ++++++ --- /var/tmp/diff_new_pack.CUI1Of/_old 2020-07-31 15:54:18.960255955 +0200 +++ /var/tmp/diff_new_pack.CUI1Of/_new 2020-07-31 15:54:18.960255955 +0200 @@ -5,11 +5,11 @@ <param name="package-meta">no</param> <param name="exclude">.git</param> <param name="filename">libpsm2</param> - <param name="version">11.2.166</param> + <param name="version">11.2.185</param> <param name="versionrewrite-pattern">PSM2_(.*)</param> <param name="versionrewrite-replacement">\1</param> <param name="match-tag">PSM2_*</param> - <param name="revision">6d5af3c8766ae8e86f96ba7d04d5941966a5630c</param> + <param name="revision">7a33bedc4bb3dff4e57c00293a2d70890db4d983</param> </service> <service name="recompress" mode="disabled"> <param name="file">libpsm2*.tar</param> ++++++ libpsm2-11.2.166.tar.bz2 -> libpsm2-11.2.185.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/COMMIT new/libpsm2-11.2.185/COMMIT --- old/libpsm2-11.2.166/COMMIT 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/COMMIT 2020-07-21 21:47:50.000000000 +0200 @@ -1 +1 @@ -ddab95452f2501b3dd65e1ddfe8ed853c2a107e8 \ No newline at end of file +30c52a0fd155774e18cc06328a1ba83c2a6a8104 \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/CONTRIBUTORS new/libpsm2-11.2.185/CONTRIBUTORS --- old/libpsm2-11.2.166/CONTRIBUTORS 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/CONTRIBUTORS 2020-07-21 21:47:50.000000000 +0200 @@ -12,3 +12,4 @@ Dmitry (dmitrygx on github.com) Florian Weimer (fweimer on github.com) Jonas Hahnfeld (hahnjo on github.com) +Tom Stellard (tstellar on github.com) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/Makefile new/libpsm2-11.2.185/Makefile --- old/libpsm2-11.2.166/Makefile 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/Makefile 2020-07-21 21:47:50.000000000 +0200 @@ -483,7 +483,7 @@ PRUNE_LIST=""; \ for pd in ".git" "cscope*" "$(shell realpath --relative-to=${top_srcdir} ${OUTDIR})" \ "*.orig" "*~" "#*" ".gitignore" "doc" "libcm" "psm.supp" "test" "psm_hal_MOCK" \ - "tools" "artifacts" "*.rej.patch"; do \ + "psm_test" "tools" "artifacts" "*.rej.patch"; do \ PRUNE_LIST="$$PRUNE_LIST -name $$pd -prune -o"; \ done; \ for hid in psm_hal_* ; do \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/buildflags.mak new/libpsm2-11.2.185/buildflags.mak --- old/libpsm2-11.2.166/buildflags.mak 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/buildflags.mak 2020-07-21 21:47:50.000000000 +0200 @@ -60,19 +60,11 @@ export os ?= $(shell uname -s | tr '[A-Z]' '[a-z]') export arch := $(shell uname -m | sed -e 's,\(i[456]86\|athlon$$\),i386,') -ifeq (${CCARCH},gcc) - export CC := gcc +ifeq (${CCARCH},$(filter ${CCARCH},gcc gcc4 icc clang)) + export CC := ${CCARCH} else - ifeq (${CCARCH},gcc4) - export CC := gcc4 - else - ifeq (${CCARCH},icc) - export CC := icc - else - anerr := $(error Unknown C compiler arch: ${CCARCH}) - endif # ICC - endif # gcc4 -endif # gcc + anerr := $(error Unknown C compiler arch: ${CCARCH}) +endif ifeq (${FCARCH},gfortran) export FC := gfortran @@ -108,48 +100,48 @@ # test if compiler supports 32B(AVX2)/64B(AVX512F) move instruction. # ifeq (${CC},icc) - ifeq ($(PSM_DISABLE_AVX2),) - MAVX2=-xATOM_SSE4.2 -DPSM_AVX512 - else - MAVX2=-march=core-avx-i - endif -else - ifeq ($(PSM_DISABLE_AVX2),) - MAVX2=-mavx2 - else - MAVX2=-mavx - endif + ifeq ($(PSM_DISABLE_AVX2),) + MAVX2=-xATOM_SSE4.2 -DPSM_AVX512 + else + MAVX2=-march=core-avx-i + endif +else + ifeq ($(PSM_DISABLE_AVX2),) + MAVX2=-mavx2 + else + MAVX2=-mavx + endif endif ifneq (icc,${CC}) - ifeq ($(PSM_DISABLE_AVX2),) - RET := $(shell echo "int main() {}" | ${CC} ${MAVX2} -E -dM -xc - 2>&1 | grep -q AVX2 ; echo $$?) - else - RET := $(shell echo "int main() {}" | ${CC} ${MAVX2} -E -dM -xc - 2>&1 | grep -q AVX ; echo $$?) - $(warning ***NOTE TO USER**** Disabling AVX2 will harm performance) - endif - - ifeq (0,${RET}) - BASECFLAGS += ${MAVX2} - else - $(error Compiler does not support ${MAVX2} ) - endif + ifeq ($(PSM_DISABLE_AVX2),) + RET := $(shell echo "int main() {}" | ${CC} ${MAVX2} -E -dM -xc - 2>&1 | grep -q AVX2 ; echo $$?) + else + RET := $(shell echo "int main() {}" | ${CC} ${MAVX2} -E -dM -xc - 2>&1 | grep -q AVX ; echo $$?) + $(warning ***NOTE TO USER**** Disabling AVX2 will harm performance) + endif + + ifeq (0,${RET}) + BASECFLAGS += ${MAVX2} + else + $(error Compiler does not support ${MAVX2} ) + endif else - BASECFLAGS += ${MAVX2} + BASECFLAGS += ${MAVX2} endif # This support is dynamic at runtime, so is OK to enable as long as compiler can generate # the code. ifneq (,${PSM_AVX512}) - ifneq (icc,${CC}) - RET := $(shell echo "int main() {}" | ${CC} -mavx512f -E -dM -xc - 2>&1 | grep -q AVX512 ; echo $$?) - ifeq (0,${RET}) - BASECFLAGS += -mavx512f - else - $(error Compiler does not support AVX512 ) - endif - BASECFLAGS += -DPSM_AVX512 - endif + ifneq (icc,${CC}) + RET := $(shell echo "int main() {}" | ${CC} -mavx512f -E -dM -xc - 2>&1 | grep -q AVX512 ; echo $$?) + ifeq (0,${RET}) + BASECFLAGS += -mavx512f + else + $(error Compiler does not support AVX512 ) + endif + BASECFLAGS += -DPSM_AVX512 + endif endif # @@ -158,42 +150,42 @@ BASECFLAGS += -D_DEFAULT_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE ifneq (,${HFI_BRAKE_DEBUG}) - BASECFLAGS += -DHFI_BRAKE_DEBUG + BASECFLAGS += -DHFI_BRAKE_DEBUG endif ifneq (,${PSM_FI}) - BASECFLAGS += -DPSM_FI + BASECFLAGS += -DPSM_FI endif ifneq (,${PSM_DEBUG}) - BASECFLAGS += -O -g3 -DPSM_DEBUG -D_HFI_DEBUGGING -funit-at-a-time -Wp,-D_FORTIFY_SOURCE=2 + BASECFLAGS += -O -g3 -DPSM_DEBUG -D_HFI_DEBUGGING -funit-at-a-time -Wp,-D_FORTIFY_SOURCE=2 else - BASECFLAGS += -O3 -g3 + BASECFLAGS += -O3 -g3 endif ifneq (,${PSM_COVERAGE}) # This check must come after PSM_DEBUG to override optimization setting - BASECFLAGS += -O -fprofile-arcs -ftest-coverage - LDFLAGS += -fprofile-arcs + BASECFLAGS += -O -fprofile-arcs -ftest-coverage + LDFLAGS += -fprofile-arcs endif ifneq (,${PSM_LOG}) - BASECFLAGS += -DPSM_LOG + BASECFLAGS += -DPSM_LOG ifneq (,${PSM_LOG_FAST_IO}) - BASECFLAGS += -DPSM_LOG_FAST_IO - PSM2_ADDITIONAL_GLOBALS += psmi_log_fini;psmi_log_message; + BASECFLAGS += -DPSM_LOG_FAST_IO + PSM2_ADDITIONAL_GLOBALS += psmi_log_fini;psmi_log_message; endif endif ifneq (,${PSM_PERF}) - BASECFLAGS += -DRDPMC_PERF_FRAMEWORK + BASECFLAGS += -DRDPMC_PERF_FRAMEWORK endif ifneq (,${PSM_HEAP_DEBUG}) - BASECFLAGS += -DPSM_HEAP_DEBUG - PSM2_ADDITIONAL_GLOBALS += _psmi_heapdebug_val_heapallocs; + BASECFLAGS += -DPSM_HEAP_DEBUG + PSM2_ADDITIONAL_GLOBALS += _psmi_heapdebug_val_heapallocs; endif ifneq (,${PSM_PROFILE}) - BASECFLAGS += -DPSM_PROFILE + BASECFLAGS += -DPSM_PROFILE endif BASECFLAGS += -DNVIDIA_GPU_DIRECT ifneq (,${PSM_CUDA}) - BASECFLAGS += -DPSM_CUDA - CUDA_HOME ?= /usr/local/cuda - INCLUDES += -I$(CUDA_HOME)/include + BASECFLAGS += -DPSM_CUDA + CUDA_HOME ?= /usr/local/cuda + INCLUDES += -I$(CUDA_HOME)/include endif BASECFLAGS += -fpic -fPIC -D_GNU_SOURCE @@ -203,15 +195,16 @@ BASECFLAGS += ${OPA_CFLAGS} ifeq (${CCARCH},icc) - BASECFLAGS += -fpic -fPIC -D_GNU_SOURCE -DPACK_STRUCT_STL=packed, - LDFLAGS += -static-intel + BASECFLAGS += -fpic -fPIC -D_GNU_SOURCE -DPACK_STRUCT_STL=packed, + LDFLAGS += -static-intel else - ifeq (${CCARCH},gcc) - BASECFLAGS += -funwind-tables -Wno-strict-aliasing -Wformat-security + LDFLAGS += -Wl,--build-id + ifeq (${CCARCH},$(filter ${CCARCH},gcc clang)) + BASECFLAGS += -funwind-tables -Wno-strict-aliasing -Wformat-security else - ifneq (${CCARCH},gcc4) - $(error Unknown compiler arch "${CCARCH}") - endif # gcc4 + ifneq (${CCARCH},gcc4) + $(error Unknown compiler arch "${CCARCH}") + endif # gcc4 endif # gcc endif # icc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/compat/buildflags.mak new/libpsm2-11.2.185/compat/buildflags.mak --- old/libpsm2-11.2.166/compat/buildflags.mak 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/compat/buildflags.mak 2020-07-21 21:47:50.000000000 +0200 @@ -57,19 +57,11 @@ export arch := $(shell uname -m | sed -e 's,\(i[456]86\|athlon$$\),i386,') export CCARCH ?= gcc -ifeq (${CCARCH},gcc) - export CC := gcc +ifeq (${CCARCH},$(filter ${CCARCH},gcc gcc4 icc clang)) + export CC := ${CCARCH} else - ifeq (${CCARCH},gcc4) - export CC := gcc4 - else - ifeq (${CCARCH},icc) - export CC := icc - else - anerr := $(error Unknown C compiler arch: ${CCARCH}) - endif # ICC - endif # gcc4 -endif # gcc + anerr := $(error Unknown C compiler arch: ${CCARCH}) +endif BASECFLAGS += $(BASE_FLAGS) LDFLAGS += $(BASE_FLAGS) @@ -90,7 +82,7 @@ BASECFLAGS += -O3 -g3 LDFLAGS += -static-intel else - ifeq (${CCARCH},gcc) + ifeq (${CCARCH},$(filter ${CCARCH},gcc clang)) BASECFLAGS += -Wno-strict-aliasing else ifneq (${CCARCH},gcc4) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/libpsm2.spec.in new/libpsm2-11.2.185/libpsm2.spec.in --- old/libpsm2-11.2.166/libpsm2.spec.in 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/libpsm2.spec.in 2020-07-21 21:47:50.000000000 +0200 @@ -71,8 +71,8 @@ %if "@RPM_NAME_BASEEXT@" %package -n @RPM_NAME@@RPM_NAME_BASEEXT@ -%endif Summary: Intel PSM2 Libraries +%endif Provides: @RPM_NAME@ = %{version}-%{release} Provides: @RPM_NAME@%{_isa} = %{version}-%{release} %if 0%{?suse_version} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/psm.c new/libpsm2-11.2.185/psm.c --- old/libpsm2-11.2.166/psm.c 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/psm.c 2020-07-21 21:47:50.000000000 +0200 @@ -65,11 +65,14 @@ static int psmi_verno_client_val; int psmi_epid_ver; +// Special psmi_refcount values #define PSMI_NOT_INITIALIZED 0 -#define PSMI_INITIALIZED 1 -#define PSMI_FINALIZED -1 /* Prevent the user from calling psm2_init - * once psm_finalize has been called. */ -static int psmi_isinit = PSMI_NOT_INITIALIZED; +#define PSMI_FINALIZED -1 + +// PSM2 doesn't support transitioning out of the PSMI_FINALIZED state +// once psmi_refcount is set to PSMI_FINALIZED, any further attempts to change +// psmi_refcount should be treated as an error +static int psmi_refcount = PSMI_NOT_INITIALIZED; /* Global lock used for endpoint creation and destroy * (in functions psm2_ep_open and psm2_ep_close) and also @@ -84,6 +87,8 @@ char *sem_affinity_shm_rw_name; char *affinity_shm_name; +uint32_t psmi_cpu_model; + #ifdef PSM_CUDA int is_cuda_enabled; int is_gdr_copy_enabled; @@ -96,6 +101,42 @@ uint32_t cuda_thresh_rndv; uint32_t gdr_copy_threshold_send; uint32_t gdr_copy_threshold_recv; + +void *psmi_cuda_lib; +CUresult (*psmi_cuInit)(unsigned int Flags ); +CUresult (*psmi_cuCtxDetach)(CUcontext c); +CUresult (*psmi_cuCtxGetCurrent)(CUcontext *c); +CUresult (*psmi_cuCtxSetCurrent)(CUcontext c); +CUresult (*psmi_cuPointerGetAttribute)(void *data, CUpointer_attribute pa, CUdeviceptr p); +CUresult (*psmi_cuPointerSetAttribute)(void *data, CUpointer_attribute pa, CUdeviceptr p); +CUresult (*psmi_cuDeviceCanAccessPeer)(int *canAccessPeer, CUdevice dev, CUdevice peerDev); +CUresult (*psmi_cuDeviceGet)(CUdevice* device, int ordinal); +CUresult (*psmi_cuDeviceGetAttribute)(int* pi, CUdevice_attribute attrib, CUdevice dev); +CUresult (*psmi_cuDriverGetVersion)(int* driverVersion); +CUresult (*psmi_cuDeviceGetCount)(int* count); +CUresult (*psmi_cuStreamCreate)(CUstream* phStream, unsigned int Flags); +CUresult (*psmi_cuStreamDestroy)(CUstream phStream); +CUresult (*psmi_cuEventCreate)(CUevent* phEvent, unsigned int Flags); +CUresult (*psmi_cuEventDestroy)(CUevent hEvent); +CUresult (*psmi_cuEventQuery)(CUevent hEvent); +CUresult (*psmi_cuEventRecord)(CUevent hEvent, CUstream hStream); +CUresult (*psmi_cuEventSynchronize)(CUevent hEvent); +CUresult (*psmi_cuMemHostAlloc)(void** pp, size_t bytesize, unsigned int Flags); +CUresult (*psmi_cuMemFreeHost)(void* p); +CUresult (*psmi_cuMemcpy)(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount); +CUresult (*psmi_cuMemcpyDtoD)(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount); +CUresult (*psmi_cuMemcpyDtoH)(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount); +CUresult (*psmi_cuMemcpyHtoD)(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount); +CUresult (*psmi_cuMemcpyDtoHAsync)(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream); +CUresult (*psmi_cuMemcpyHtoDAsync)(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream); +CUresult (*psmi_cuIpcGetMemHandle)(CUipcMemHandle* pHandle, CUdeviceptr dptr); +CUresult (*psmi_cuIpcOpenMemHandle)(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags); +CUresult (*psmi_cuIpcCloseMemHandle)(CUdeviceptr dptr); +CUresult (*psmi_cuMemGetAddressRange)(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr); +CUresult (*psmi_cuDevicePrimaryCtxGetState)(CUdevice dev, unsigned int* flags, int* active); +CUresult (*psmi_cuDevicePrimaryCtxRetain)(CUcontext* pctx, CUdevice dev); +CUresult (*psmi_cuCtxGetDevice)(CUdevice* device); +CUresult (*psmi_cuDevicePrimaryCtxRelease)(CUdevice device); #endif /* @@ -104,9 +145,8 @@ * It is supposed to be filled with logical OR * on conditional compilation basis * along with future features/capabilities. - * At the very beginning we start with Multi EPs. */ -uint64_t psm2_capabilities_bitset = PSM2_MULTI_EP_CAP; +uint64_t psm2_capabilities_bitset = PSM2_MULTI_EP_CAP | PSM2_LIB_REFCOUNT_CAP; int psmi_verno_client() { @@ -130,7 +170,7 @@ int MOCKABLE(psmi_isinitialized)() { - return (psmi_isinit == PSMI_INITIALIZED); + return (psmi_refcount > 0); } MOCK_DEF_EPILOGUE(psmi_isinitialized); @@ -356,10 +396,12 @@ GENERIC_PERF_SET_SLOT_NAME(PSM_TX_SPEEDPATH_CTR, "TX"); GENERIC_PERF_SET_SLOT_NAME(PSM_RX_SPEEDPATH_CTR, "RX"); - if (psmi_isinit == PSMI_INITIALIZED) + if (psmi_refcount > 0) { + psmi_refcount++; goto update; + } - if (psmi_isinit == PSMI_FINALIZED) { + if (psmi_refcount == PSMI_FINALIZED) { err = PSM2_IS_FINALIZED; goto fail; } @@ -435,7 +477,7 @@ ((id.eax & CPUID_EXMODEL_MASK) >> 12); } - psmi_isinit = PSMI_INITIALIZED; + psmi_refcount++; /* hfi_debug lives in libhfi.so */ psmi_getenv("PSM2_TRACEMASK", "Mask flags for tracing", @@ -520,7 +562,6 @@ #endif update: - if (getenv("PSM2_IDENTIFY")) { Dl_info info_psm; char ofed_delta[100] = ""; @@ -557,6 +598,8 @@ *major = (int)psmi_verno_major; *minor = (int)psmi_verno_minor; fail: + _HFI_DBG("psmi_refcount=%d,err=%u\n", psmi_refcount, err); + PSM2_LOG_MSG("leaving"); return err; } @@ -779,7 +822,14 @@ PSM2_LOG_MSG("entering"); + _HFI_DBG("psmi_refcount=%d\n", psmi_refcount); PSMI_ERR_UNLESS_INITIALIZED(NULL); + psmi_assert(psmi_refcount > 0); + psmi_refcount--; + + if (psmi_refcount > 0) { + return PSM2_OK; + } /* When PSM_PERF is enabled, the following line causes the instruction cycles gathered in the current run to be dumped @@ -856,7 +906,7 @@ } #endif - psmi_isinit = PSMI_FINALIZED; + psmi_refcount = PSMI_FINALIZED; PSM2_LOG_MSG("leaving"); psmi_log_fini(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/psm2.h new/libpsm2-11.2.185/psm2.h --- old/libpsm2-11.2.166/psm2.h 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/psm2.h 2020-07-21 21:47:50.000000000 +0200 @@ -488,6 +488,7 @@ * consecutive bits : 0x2, 0x4 ... and so on. */ #define PSM2_MULTI_EP_CAP 0x1 /* Multiple Endpoints capability */ +#define PSM2_LIB_REFCOUNT_CAP 0x2 /* Library finalization is managed with reference count */ /** @brief PSM2 capabilities provider * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/psm_config.h new/libpsm2-11.2.185/psm_config.h --- old/libpsm2-11.2.166/psm_config.h 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/psm_config.h 2020-07-21 21:47:50.000000000 +0200 @@ -153,7 +153,7 @@ #define MQ_HFI_THRESH_TINY 8 #define MQ_HFI_THRESH_EGR_SDMA_XEON 34000 /* Eager Xeon blocking */ #define MQ_HFI_THRESH_EGR_SDMA_PHI2 200000 /* Eager Phi2 blocking */ -#define MQ_HFI_THRESH_EGR_SDMA_SQ_XEON 16000 /* Eager Xeon non-blocking */ +#define MQ_HFI_THRESH_EGR_SDMA_SQ_XEON 16384 /* Eager Xeon non-blocking */ #define MQ_HFI_THRESH_EGR_SDMA_SQ_PHI2 65536 /* Eager Phi2 non-blocking */ #define MQ_HFI_THRESH_RNDV_PHI2 200000 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/psm_error.h new/libpsm2-11.2.185/psm_error.h --- old/libpsm2-11.2.166/psm_error.h 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/psm_error.h 2020-07-21 21:47:50.000000000 +0200 @@ -65,7 +65,7 @@ #define PSMI_EP_NORETURN ((psm2_ep_t) -2) #define PSMI_EP_LOGEVENT ((psm2_ep_t) -3) -psm2_ep_errhandler_t psmi_errhandler_global; +extern psm2_ep_errhandler_t psmi_errhandler_global; psm2_error_t MOCKABLE(psmi_handle_error)(psm2_ep_t ep, psm2_error_t error, const char *buf, ...) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/psm_hal_gen1/psm_gdrcpy.c new/libpsm2-11.2.185/psm_hal_gen1/psm_gdrcpy.c --- old/libpsm2-11.2.166/psm_hal_gen1/psm_gdrcpy.c 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/psm_hal_gen1/psm_gdrcpy.c 2020-07-21 21:47:50.000000000 +0200 @@ -63,9 +63,6 @@ static int gdr_fd; -int is_gdr_copy_enabled; - - int get_gdr_fd(){ return gdr_fd; } @@ -175,7 +172,7 @@ ((buf + size - 1) & GPU_PAGE_MASK) - pageaddr); - _HFI_VDBG("buf=%p size=%zu pageaddr=%p pagelen=%u flags=0x%x proto=%p\n", + _HFI_VDBG("(gpudirect) buf=%p size=%zu pageaddr=%p pagelen=%u flags=0x%x proto=%p\n", (void *)buf, size, (void *)pageaddr, pagelen, flags, proto); query_params.query_params_in.gpu_buf_addr = pageaddr; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/psm_hal_gen1/psm_hal_inline_i.h new/libpsm2-11.2.185/psm_hal_gen1/psm_hal_inline_i.h --- old/libpsm2-11.2.166/psm_hal_gen1/psm_hal_inline_i.h 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/psm_hal_gen1/psm_hal_inline_i.h 2020-07-21 21:47:50.000000000 +0200 @@ -536,7 +536,7 @@ unsigned retryCnt) { int fd = -1; - psm2_error_t err = PSM_HAL_ERROR_OK; + psm2_error_t err = PSM2_OK; hfp_gen1_pc_private *pc_private = psmi_malloc(ep, UNDEFINED, sizeof(hfp_gen1_pc_private)); if_pf (!pc_private) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/psm_user.h new/libpsm2-11.2.185/psm_user.h --- old/libpsm2-11.2.166/psm_user.h 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/psm_user.h 2020-07-21 21:47:50.000000000 +0200 @@ -56,6 +56,10 @@ #ifndef _PSMI_USER_H #define _PSMI_USER_H +#ifdef __cplusplus +extern "C" { +#endif + #include "psm_config.h" #include <inttypes.h> #include <pthread.h> @@ -307,42 +311,42 @@ extern int cuda_lib_version; extern CUcontext ctxt; -void *psmi_cuda_lib; -CUresult (*psmi_cuInit)(unsigned int Flags ); -CUresult (*psmi_cuCtxDetach)(CUcontext c); -CUresult (*psmi_cuCtxSetCurrent)(CUcontext c); -CUresult (*psmi_cuCtxGetCurrent)(CUcontext *c); -CUresult (*psmi_cuCtxSetCurrent)(CUcontext c); -CUresult (*psmi_cuPointerGetAttribute)(void *data, CUpointer_attribute pa, CUdeviceptr p); -CUresult (*psmi_cuPointerSetAttribute)(void *data, CUpointer_attribute pa, CUdeviceptr p); -CUresult (*psmi_cuDeviceCanAccessPeer)(int *canAccessPeer, CUdevice dev, CUdevice peerDev); -CUresult (*psmi_cuDeviceGet)(CUdevice* device, int ordinal); -CUresult (*psmi_cuDeviceGetAttribute)(int* pi, CUdevice_attribute attrib, CUdevice dev); -CUresult (*psmi_cuDriverGetVersion)(int* driverVersion); -CUresult (*psmi_cuDeviceGetCount)(int* count); -CUresult (*psmi_cuStreamCreate)(CUstream* phStream, unsigned int Flags); -CUresult (*psmi_cuStreamDestroy)(CUstream phStream); -CUresult (*psmi_cuEventCreate)(CUevent* phEvent, unsigned int Flags); -CUresult (*psmi_cuEventDestroy)(CUevent hEvent); -CUresult (*psmi_cuEventQuery)(CUevent hEvent); -CUresult (*psmi_cuEventRecord)(CUevent hEvent, CUstream hStream); -CUresult (*psmi_cuEventSynchronize)(CUevent hEvent); -CUresult (*psmi_cuMemHostAlloc)(void** pp, size_t bytesize, unsigned int Flags); -CUresult (*psmi_cuMemFreeHost)(void* p); -CUresult (*psmi_cuMemcpy)(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount); -CUresult (*psmi_cuMemcpyDtoD)(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount); -CUresult (*psmi_cuMemcpyDtoH)(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount); -CUresult (*psmi_cuMemcpyHtoD)(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount); -CUresult (*psmi_cuMemcpyDtoHAsync)(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream); -CUresult (*psmi_cuMemcpyHtoDAsync)(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream); -CUresult (*psmi_cuIpcGetMemHandle)(CUipcMemHandle* pHandle, CUdeviceptr dptr); -CUresult (*psmi_cuIpcOpenMemHandle)(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags); -CUresult (*psmi_cuIpcCloseMemHandle)(CUdeviceptr dptr); -CUresult (*psmi_cuMemGetAddressRange)(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr); -CUresult (*psmi_cuDevicePrimaryCtxGetState)(CUdevice dev, unsigned int* flags, int* active); -CUresult (*psmi_cuDevicePrimaryCtxRetain)(CUcontext* pctx, CUdevice dev); -CUresult (*psmi_cuCtxGetDevice)(CUdevice* device); -CUresult (*psmi_cuDevicePrimaryCtxRelease)(CUdevice device); +extern void *psmi_cuda_lib; + +extern CUresult (*psmi_cuInit)(unsigned int Flags ); +extern CUresult (*psmi_cuCtxDetach)(CUcontext c); +extern CUresult (*psmi_cuCtxGetCurrent)(CUcontext *c); +extern CUresult (*psmi_cuCtxSetCurrent)(CUcontext c); +extern CUresult (*psmi_cuPointerGetAttribute)(void *data, CUpointer_attribute pa, CUdeviceptr p); +extern CUresult (*psmi_cuPointerSetAttribute)(void *data, CUpointer_attribute pa, CUdeviceptr p); +extern CUresult (*psmi_cuDeviceCanAccessPeer)(int *canAccessPeer, CUdevice dev, CUdevice peerDev); +extern CUresult (*psmi_cuDeviceGet)(CUdevice* device, int ordinal); +extern CUresult (*psmi_cuDeviceGetAttribute)(int* pi, CUdevice_attribute attrib, CUdevice dev); +extern CUresult (*psmi_cuDriverGetVersion)(int* driverVersion); +extern CUresult (*psmi_cuDeviceGetCount)(int* count); +extern CUresult (*psmi_cuStreamCreate)(CUstream* phStream, unsigned int Flags); +extern CUresult (*psmi_cuStreamDestroy)(CUstream phStream); +extern CUresult (*psmi_cuEventCreate)(CUevent* phEvent, unsigned int Flags); +extern CUresult (*psmi_cuEventDestroy)(CUevent hEvent); +extern CUresult (*psmi_cuEventQuery)(CUevent hEvent); +extern CUresult (*psmi_cuEventRecord)(CUevent hEvent, CUstream hStream); +extern CUresult (*psmi_cuEventSynchronize)(CUevent hEvent); +extern CUresult (*psmi_cuMemHostAlloc)(void** pp, size_t bytesize, unsigned int Flags); +extern CUresult (*psmi_cuMemFreeHost)(void* p); +extern CUresult (*psmi_cuMemcpy)(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount); +extern CUresult (*psmi_cuMemcpyDtoD)(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount); +extern CUresult (*psmi_cuMemcpyDtoH)(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount); +extern CUresult (*psmi_cuMemcpyHtoD)(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount); +extern CUresult (*psmi_cuMemcpyDtoHAsync)(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream); +extern CUresult (*psmi_cuMemcpyHtoDAsync)(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream); +extern CUresult (*psmi_cuIpcGetMemHandle)(CUipcMemHandle* pHandle, CUdeviceptr dptr); +extern CUresult (*psmi_cuIpcOpenMemHandle)(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags); +extern CUresult (*psmi_cuIpcCloseMemHandle)(CUdeviceptr dptr); +extern CUresult (*psmi_cuMemGetAddressRange)(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr); +extern CUresult (*psmi_cuDevicePrimaryCtxGetState)(CUdevice dev, unsigned int* flags, int* active); +extern CUresult (*psmi_cuDevicePrimaryCtxRetain)(CUcontext* pctx, CUdevice dev); +extern CUresult (*psmi_cuCtxGetDevice)(CUdevice* device); +extern CUresult (*psmi_cuDevicePrimaryCtxRelease)(CUdevice device); #define PSMI_CUDA_CALL(func, args...) do { \ CUresult cudaerr; \ @@ -531,4 +535,8 @@ #define COMPILE_TIME_ASSERT(NAME,COND) extern char NAME[1/ COND] +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif /* _PSMI_USER_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/psm_utils.h new/libpsm2-11.2.185/psm_utils.h --- old/libpsm2-11.2.166/psm_utils.h 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/psm_utils.h 2020-07-21 21:47:50.000000000 +0200 @@ -329,7 +329,7 @@ /* * Global model so we can tune defaults better for specific cpu's */ -uint32_t psmi_cpu_model; +extern uint32_t psmi_cpu_model; /* * Diagnostics, all in psm_diags.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/ptl_am/am_cuda_memhandle_cache.c new/libpsm2-11.2.185/ptl_am/am_cuda_memhandle_cache.c --- old/libpsm2-11.2.166/ptl_am/am_cuda_memhandle_cache.c 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/ptl_am/am_cuda_memhandle_cache.c 2020-07-21 21:47:50.000000000 +0200 @@ -220,8 +220,11 @@ if (root == NULL) return PSM2_NO_MEMORY; nil_item = (cl_map_item_t *)psmi_calloc(NULL, UNDEFINED, 1, sizeof(cl_map_item_t)); - if (nil_item == NULL) + if (nil_item == NULL) { + psmi_free(root); return PSM2_NO_MEMORY; + } + nil_item->payload.start = 0; nil_item->payload.epid = 0; nil_item->payload.length = 0; @@ -274,6 +277,7 @@ INEXT(FIRST) = memcache_item; IPREV(memcache_item) = FIRST; FIRST = memcache_item; + INEXT(FIRST) = NULL; return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/ptl_ips/ptl.c new/libpsm2-11.2.185/ptl_ips/ptl.c --- old/libpsm2-11.2.166/ptl_ips/ptl.c 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/ptl_ips/ptl.c 2020-07-21 21:47:50.000000000 +0200 @@ -574,12 +574,12 @@ { return pthread_spin_trylock(recvshc->context_lock); } - +/* Unused PSMI_INLINE(void ips_lock_shared_context(struct ptl_shared *recvshc)) { pthread_spin_lock(recvshc->context_lock); } - +*/ PSMI_INLINE(void ips_unlock_shared_context(struct ptl_shared *recvshc)) { pthread_spin_unlock(recvshc->context_lock); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpsm2-11.2.166/rpm_release_extension new/libpsm2-11.2.185/rpm_release_extension --- old/libpsm2-11.2.166/rpm_release_extension 2020-06-26 17:19:18.000000000 +0200 +++ new/libpsm2-11.2.185/rpm_release_extension 2020-07-21 21:47:50.000000000 +0200 @@ -1 +1 @@ -166 +185 ++++++ libpsm2-use_RPM_OPT_FLAGS.patch ++++++ --- /var/tmp/diff_new_pack.CUI1Of/_old 2020-07-31 15:54:19.360257314 +0200 +++ /var/tmp/diff_new_pack.CUI1Of/_new 2020-07-31 15:54:19.364257327 +0200 @@ -1,4 +1,4 @@ -commit 39d1ebb49b0e48cd85a1b3d7c7716fb3398277e7 +commit ca7a8ea03eb00c9c5c7e4fcaf9603c4d0760177a Author: Nicolas Morey-Chaisemartin <[email protected]> Date: Mon Nov 20 17:59:37 2017 +0100 @@ -9,10 +9,10 @@ Signed-off-by: Nicolas Morey-Chaisemartin <[email protected]> diff --git buildflags.mak buildflags.mak -index 10ec2886e6d7..cd7d7df1796f 100644 +index 7c3cda099871..baf7e5bb5a2f 100644 --- buildflags.mak +++ buildflags.mak -@@ -80,7 +80,7 @@ else +@@ -72,7 +72,7 @@ else anerr := $(error Unknown Fortran compiler arch: ${FCARCH}) endif # gfortran @@ -22,12 +22,12 @@ ASFLAGS += $(BASE_FLAGS) diff --git compat/buildflags.mak compat/buildflags.mak -index b448e4ee49b5..2a9a822bad74 100644 +index db348481b169..f7334e3936a7 100644 --- compat/buildflags.mak +++ compat/buildflags.mak -@@ -71,7 +71,7 @@ else - endif # gcc4 - endif # gcc +@@ -63,7 +63,7 @@ else + anerr := $(error Unknown C compiler arch: ${CCARCH}) + endif -BASECFLAGS += $(BASE_FLAGS) +BASECFLAGS += $(BASE_FLAGS) $(RPM_OPT_FLAGS)
