Skip to content
Snippets Groups Projects
Commit f5d2c89f authored by Alaettin Serhan Mete's avatar Alaettin Serhan Mete :eagle: Committed by Adam Edward Barton
Browse files

AthenaMP: Make sure SharedEvtQueueProvider gets a positive definite chunk size

AthenaMP: Make sure SharedEvtQueueProvider gets a positive definite chunk size
parent e9edcb23
No related branches found
No related tags found
4 merge requests!66406ZDC & ZDC LED monitoring updates,!66102ZDC & RPD monitoring update,!65937Draft: Updated post-processing and plotting scripts for 2023 data in ZLumi_Scripts directory,!65631AthenaMP: Make sure SharedEvtQueueProvider gets a positive definite chunk size
......@@ -74,6 +74,9 @@ def AthenaMPCfg(flags):
# Compute event chunk size
chunk_size = getChunkSize(flags)
if chunk_size < 1:
msg.warning('Nonpositive ChunkSize (%i) caught, setting it to 1', chunk_size)
chunk_size = 1
# Configure Strategy
debug_worker = flags.Concurrency.DebugWorkers
......
......@@ -58,6 +58,9 @@ class MpEvtLoopMgr(AthMpEvtLoopMgr):
event_range_channel = jp.AthenaMPFlags.EventRangeChannel()
chunk_size = getChunkSize()
if chunk_size < 1:
msg.warning('Nonpositive ChunkSize (%i) caught, setting it to 1', chunk_size)
chunk_size = 1
debug_worker = jp.ConcurrencyFlags.DebugWorkers()
use_shared_reader = jp.AthenaMPFlags.UseSharedReader()
......
......@@ -66,6 +66,11 @@ int SharedEvtQueueProvider::makePool(int maxevt, int nprocs, const std::string&
return -1;
}
if(m_nChunkSize<=0) {
ATH_MSG_ERROR( "Non-positive chunk size requested: " << m_nChunkSize);
return -1;
}
m_nEvtRequested = maxevt;
m_nprocs = (nprocs==-1?sysconf(_SC_NPROCESSORS_ONLN):nprocs);
m_nprocesses = m_nprocs;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment