Skip to content

Commit

Permalink
Merge branch 'IB/CMSSW_11_3_X/rootmaster' into mrodozov-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodozov authored Mar 6, 2021
2 parents 5f7ecc9 + 36df7ae commit d5cd092
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 73 deletions.
5 changes: 5 additions & 0 deletions cmssw-queue-override.file
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### FILE cmssw-queue-override
## NO_VERSION_SUFFIX
## UPLOAD_DEPENDENCIES dqmgui
%if "%(case %realversion in (*_COVERAGE_X*) echo true ;; (*) echo false ;; esac)" == "true"
%define usercxxflags -fprofile-arcs -ftest-coverage
Expand All @@ -12,6 +13,10 @@
%define usercxxflags -O3 -ffast-math -freciprocal-math -fipa-pta
%endif

%if "%(case %realversion in (*_DBG_X*) echo true ;; (*) echo false ;; esac)" == "true"
%define usercxxflags -g -O0 -DEDM_ML_DEBUG
%endif

%if "%(case %realversion in (*_FORTIFIED_X*) echo true ;; (*) echo false ;; esac)" == "true"
%define usercxxflags -fexceptions -fstack-protector-all --param=ssp-buffer-size=4 -Wp,-D_FORTIFY_SOURCE=2
%endif
Expand Down
4 changes: 2 additions & 2 deletions dd4hep.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### RPM external dd4hep v01-15x
### RPM external dd4hep v01-16x

%define tag 2ee30aa3a76858d14f9deea8e0f36b2b69ca8365
%define tag v01-16
%define branch master
%define github_user AIDASoft
%define keep_archives true
Expand Down
2 changes: 1 addition & 1 deletion go.spec
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
### RPM external go 1.16
## NOCOMPILER

Provides: libc.so.6(GLIBC_2.2.5)(64bit)
%ifarch x86_64
Source: https://storage.googleapis.com/golang/go%{realversion}.linux-amd64.tar.gz
%endif
%ifarch ppc64le
Source: https://storage.googleapis.com/golang/go%{realversion}.linux-ppc64le.tar.gz
Provides: libc.so.6(GLIBC_2.2.5)(64bit)
%endif
%ifarch aarch64
Source: https://storage.googleapis.com/golang/go%{realversion}.linux-arm64.tar.gz
Expand Down
38 changes: 38 additions & 0 deletions grpc-ssl-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
--- a/src/core/tsi/ssl_transport_security.cc 2021-02-24 07:48:45.470971187 +0100
+++ b/src/core/tsi/ssl_transport_security.cc 2021-02-23 13:06:20.469007951 +0100
@@ -553,7 +553,7 @@
X509* certificate = nullptr;
BIO* pem;
GPR_ASSERT(pem_cert_chain_size <= INT_MAX);
- pem = BIO_new_mem_buf(pem_cert_chain, static_cast<int>(pem_cert_chain_size));
+ pem = BIO_new_mem_buf((void*)pem_cert_chain, static_cast<int>(pem_cert_chain_size));
if (pem == nullptr) return TSI_OUT_OF_RESOURCES;

do {
@@ -673,7 +673,7 @@
EVP_PKEY* private_key = nullptr;
BIO* pem;
GPR_ASSERT(pem_key_size <= INT_MAX);
- pem = BIO_new_mem_buf(pem_key, static_cast<int>(pem_key_size));
+ pem = BIO_new_mem_buf((void*)pem_key, static_cast<int>(pem_key_size));
if (pem == nullptr) return TSI_OUT_OF_RESOURCES;
do {
private_key =
@@ -718,7 +718,7 @@
X509_NAME* root_name = nullptr;
BIO* pem;
GPR_ASSERT(pem_roots_size <= INT_MAX);
- pem = BIO_new_mem_buf(pem_roots, static_cast<int>(pem_roots_size));
+ pem = BIO_new_mem_buf((void*)pem_roots, static_cast<int>(pem_roots_size));
if (cert_store == nullptr) return TSI_INVALID_ARGUMENT;
if (pem == nullptr) return TSI_OUT_OF_RESOURCES;
if (root_names != nullptr) {
@@ -837,7 +837,7 @@
tsi_result result = TSI_OK;
X509* cert = nullptr;
BIO* pem;
- pem = BIO_new_mem_buf(pem_cert, static_cast<int>(strlen(pem_cert)));
+ pem = BIO_new_mem_buf((void*)pem_cert, static_cast<int>(strlen(pem_cert)));
if (pem == nullptr) return TSI_OUT_OF_RESOURCES;

cert = PEM_read_bio_X509(pem, nullptr, nullptr, const_cast<char*>(""));
1 change: 1 addition & 0 deletions grpc-toolfile.spec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/grpc.xml
<environment name="INCLUDE" default="$GRPC_BASE/include"/>
<environment name="LIBDIR" default="$GRPC_BASE/lib"/>
</client>
<flags SYSTEM_INCLUDE="1"/>
<use name="protobuf"/>
<use name="openssl"/>
<use name="pcre"/>
Expand Down
11 changes: 7 additions & 4 deletions grpc.spec
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
### RPM external grpc 1.28.1
### RPM external grpc 1.35.0

Source: git+https://github.com/grpc/grpc.git?obj=master/v%{realversion}&export=%{n}-%{realversion}&submodules=1&output=/%{n}-%{realversion}.tgz

Patch0: grpc-ssl-fix
BuildRequires: cmake ninja go
Requires: protobuf zlib pcre
%define keep_archives true

%prep

%setup -n %{n}-%{realversion}
if [ ! -z "$OPENSSL_ROOT" ]; then
%patch0 -p1
fi

%build

rm -rf ../build
mkdir ../build
cd ../build
OPENSSLROOT=""
if [[ ! -z "$OPENSSL_ROOT" ]]; then OPENSSLROOT=";${OPENSSL_ROOT}" ; fi
if [ ! -z "$OPENSSL_ROOT" ]; then OPENSSLROOT=";${OPENSSL_ROOT}" ; fi

cmake ../%{n}-%{realversion} \
-G Ninja \
-DgRPC_INSTALL=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_LIBDIR=lib \
-DgRPC_ABSL_PROVIDER=module \
Expand Down
2 changes: 1 addition & 1 deletion pip/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ prettytable==1.0.1
prometheus_client==0.9.0
prompt_toolkit==1.0.18 ; python_version<'3.0'
prompt_toolkit==3.0.10 ; python_version>'3.0'
protobuf==3.10.0
protobuf==3.15.1
prwlock==0.4.1
psutil==5.8.0
ptyprocess==0.7.0
Expand Down
12 changes: 12 additions & 0 deletions protobuf-3.15-gcc10.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/src/google/protobuf/parse_context.h b/src/google/protobuf/parse_context.h
index 7966d99d57..3754f983b1 100644
--- a/src/google/protobuf/parse_context.h
+++ b/src/google/protobuf/parse_context.h
@@ -348,7 +348,6 @@ class PROTOBUF_EXPORT EpsCopyInputStream {
if (ptr - buffer_end_ > limit_) return nullptr;
while (limit_ > kSlopBytes) {
size_t chunk_size = buffer_end_ + kSlopBytes - ptr;
- GOOGLE_DCHECK_GE(chunk_size, static_cast<size_t>(0));
append(ptr, chunk_size);
ptr = Next();
if (ptr == nullptr) return limit_end_;
17 changes: 6 additions & 11 deletions protobuf.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
### RPM external protobuf 3.11.3
## INITENV SETV PROTOBUF_SOURCE %{source0}
## INITENV SETV PROTOBUF_STRIP_PREFIX %{source_prefix}
### RPM external protobuf 3.15.1
#============= IMPORTANT NOTE ========================#
# When changing the version of protobuf, remember to regenerate protobuf objects in CMSSW
# current recipe for this is:
Expand All @@ -10,18 +8,15 @@
# protoc --cpp_out=. DQMServices/Core/src/ROOTFilePB.proto
#######################################################

#These are needed by Tensorflow sources
#NOTE: Never apply any patch in the spec file, this way tensorflow gets the exact same sources
%define source0 https://github.com/google/protobuf/archive/v%{realversion}.tar.gz
%define source_prefix %{n}-%{realversion}

Source: %{source0}
Source: https://github.com/google/protobuf/archive/v%{realversion}.tar.gz
Patch0: protobuf-3.15-gcc10
Requires: zlib
BuildRequires: cmake ninja

%prep
%setup -n %{source_prefix}

%setup -n %{n}-%{realversion}
%patch0 -p1
sed -i -e 's|CMAKE_CXX_STANDARD *11|CMAKE_CXX_STANDARD 17|' cmake/CMakeLists.txt
%build
rm -rf ../build
mkdir ../build
Expand Down
49 changes: 0 additions & 49 deletions rivet-140-313-weightnames.patch → rivet-140-313.patch
Original file line number Diff line number Diff line change
Expand Up @@ -36,53 +36,4 @@ index 85fc07e..ab1a2be 100644
if(!findScattered(beams.beams().first ,Q12)) vetoEvent;
if(!findScattered(beams.beams().second,Q22)) vetoEvent;
double scale = max(Q12,Q22);
diff --git include/Rivet/AnalysisHandler.hh include/Rivet/AnalysisHandler.hh
index 4add600a2..d5c6cb633 100644
--- include/Rivet/AnalysisHandler.hh
+++ include/Rivet/AnalysisHandler.hh
@@ -68,6 +68,8 @@ namespace Rivet {

/// Set the weight names from a GenEvent
void setWeightNames(const GenEvent& ge);
+ /// Set the weight names from vector<string>
+ void setWeightNames(vector<string> weightNames) { _weightNames = weightNames; }

/// Get the index of the nominal weight-stream
size_t defaultWeightIndex() const { return _rivetDefaultWeightIdx; }
@@ -221,7 +223,7 @@ namespace Rivet {
/// @{

/// Initialize a run, with the run beams taken from the example event.
- void init(const GenEvent& event);
+ void init(const GenEvent& event, const vector<string>& externalWeightNames = vector<string>());

/// @brief Analyze the given \a event by reference.
///
diff --git src/Core/AnalysisHandler.cc src/Core/AnalysisHandler.cc
index f8769a4ad..3c908fd2f 100644
--- src/Core/AnalysisHandler.cc
+++ src/Core/AnalysisHandler.cc
@@ -71,7 +71,7 @@ namespace Rivet {
}


- void AnalysisHandler::init(const GenEvent& ge) {
+ void AnalysisHandler::init(const GenEvent& ge, const vector<string>& externalWeightNames) {
if (_initialised)
throw UserError("AnalysisHandler::init has already been called: cannot re-initialize!");

@@ -81,7 +81,12 @@ namespace Rivet {
MSG_DEBUG("Initialising the analysis handler");
_eventNumber = ge.event_number();

- setWeightNames(ge);
+ if (externalWeightNames.empty()) {
+ setWeightNames(ge);
+ }
+ else {
+ setWeightNames(externalWeightNames);
+ }
if (_skipWeights)
MSG_INFO("Only using nominal weight. Variation weights will be ignored.");
else if (haveNamedWeights())

2 changes: 1 addition & 1 deletion rivet.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Source: git+https://gitlab.com/hepcedar/rivet.git?obj=master/%{n}-%{realversion}
Requires: hepmc fastjet fastjet-contrib yoda
BuildRequires: python py2-cython py2-setuptools

Patch0: rivet-140-313-weightnames
Patch0: rivet-140-313

%prep
## OLD GENSER: %setup -n rivet/%{realversion}
Expand Down
4 changes: 0 additions & 4 deletions tensorflow-sources.file
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ export CC_OPT_FLAGS="-mcpu=native -mtune=native"
%endif
%endif
export CXX_OPT_FLAGS="-std=c++17"
export EIGEN_SOURCE=${EIGEN_SOURCE}
export PROTOBUF_SOURCE=${PROTOBUF_SOURCE}
export EIGEN_STRIP_PREFIX=${EIGEN_STRIP_PREFIX}
export PROTOBUF_STRIP_PREFIX=${PROTOBUF_STRIP_PREFIX}

export TF_NEED_JEMALLOC=0
export TF_NEED_HDFS=0
Expand Down

0 comments on commit d5cd092

Please sign in to comment.