Skip to content

Commit bd65246

Browse files
authored
Merge 7c8e343 into sapling-pr-archive-ktf
2 parents 7a1a9a9 + 7c8e343 commit bd65246

File tree

8 files changed

+54
-29
lines changed

8 files changed

+54
-29
lines changed

.github/workflows/reports.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
if: github.repository == 'AliceO2Group/AliceO2'
1818

1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
- name: Set up Python 3.10
2222
uses: actions/setup-python@v5
2323
with:
2424
python-version: '3.10'
25-
- uses: actions/cache@v2
25+
- uses: actions/cache@v4
2626
name: Configure pip caching
2727
with:
2828
path: ~/.cache/pip

CCDB/include/CCDB/CcdbApi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ class CcdbApi //: public DatabaseInterface
388388
static bool removeSemaphore(std::string const& name, bool remove = false);
389389
static void removeLeakingSemaphores(std::string const& basedir, bool remove = false);
390390

391-
void loadFileToMemory(o2::pmr::vector<char>& dest, const std::string& path, std::map<std::string, std::string>* localHeaders = nullptr) const;
391+
void loadFileToMemory(o2::pmr::vector<char>& dest, const std::string& path, std::map<std::string, std::string>* localHeaders = nullptr, bool fetchLocalMetaData = true) const;
392392
void loadFileToMemory(o2::pmr::vector<char>& dest, std::string const& path,
393393
std::map<std::string, std::string> const& metadata, long timestamp,
394394
std::map<std::string, std::string>* headers, std::string const& etag,

CCDB/src/CcdbApi.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1989,7 +1989,7 @@ bool CcdbApi::loadLocalContentToMemory(o2::pmr::vector<char>& dest, std::string&
19891989
{
19901990
if (url.find("alien:/", 0) != std::string::npos) {
19911991
std::map<std::string, std::string> localHeaders;
1992-
loadFileToMemory(dest, url, &localHeaders);
1992+
loadFileToMemory(dest, url, &localHeaders, false);
19931993
auto it = localHeaders.find("Error");
19941994
if (it != localHeaders.end() && it->second == "An error occurred during retrieval") {
19951995
return false;
@@ -2001,7 +2001,7 @@ bool CcdbApi::loadLocalContentToMemory(o2::pmr::vector<char>& dest, std::string&
20012001
std::string path = url.substr(7);
20022002
if (std::filesystem::exists(path)) {
20032003
std::map<std::string, std::string> localHeaders;
2004-
loadFileToMemory(dest, url, &localHeaders);
2004+
loadFileToMemory(dest, url, &localHeaders, o2::utils::Str::endsWith(path, ".root"));
20052005
auto it = localHeaders.find("Error");
20062006
if (it != localHeaders.end() && it->second == "An error occurred during retrieval") {
20072007
return false;
@@ -2013,7 +2013,7 @@ bool CcdbApi::loadLocalContentToMemory(o2::pmr::vector<char>& dest, std::string&
20132013
return false;
20142014
}
20152015

2016-
void CcdbApi::loadFileToMemory(o2::pmr::vector<char>& dest, const std::string& path, std::map<std::string, std::string>* localHeaders) const
2016+
void CcdbApi::loadFileToMemory(o2::pmr::vector<char>& dest, const std::string& path, std::map<std::string, std::string>* localHeaders, bool fetchLocalMetaData) const
20172017
{
20182018
// Read file to memory as vector. For special case of the locally cached file retriev metadata stored directly in the file
20192019
constexpr size_t MaxCopySize = 0x1L << 25;
@@ -2061,7 +2061,7 @@ void CcdbApi::loadFileToMemory(o2::pmr::vector<char>& dest, const std::string& p
20612061
totalread += nread;
20622062
} while (nread == (long)MaxCopySize);
20632063

2064-
if (localHeaders) {
2064+
if (localHeaders && fetchLocalMetaData) {
20652065
TMemFile memFile("name", const_cast<char*>(dest.data()), dest.size(), "READ");
20662066
auto storedmeta = (std::map<std::string, std::string>*)extractFromTFile(memFile, TClass::GetClass("std::map<std::string, std::string>"), CCDBMETA_ENTRY);
20672067
if (storedmeta) {

Detectors/ITSMFT/ITS/tracking/src/TrackingInterface.cxx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,15 @@ void ITSTrackingInterface::initialise()
120120
for (auto& params : trackParams) {
121121
params.CorrType = o2::base::PropagatorImpl<float>::MatCorrType::USEMatCorrLUT;
122122
}
123-
124123
// adjust pT settings to actual mag. field
125124
for (size_t ip = 0; ip < trackParams.size(); ip++) {
126125
auto& param = trackParams[ip];
126+
param.TrackletMinPt *= bFactor;
127127
for (int ilg = trackConf.MaxTrackLenght; ilg >= trackConf.MinTrackLenght; ilg--) {
128128
int lslot = trackConf.MaxTrackLenght - ilg;
129129
param.MinPt[lslot] *= bFactor;
130-
param.TrackletMinPt *= bFactor;
131130
}
132131
}
133-
134132
mTracker->setParameters(trackParams);
135133
mVertexer->setParameters(vertParams);
136134
}

Framework/AnalysisSupport/src/DataInputDirector.cxx

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -387,18 +387,53 @@ int DataInputDescriptor::findDFNumber(int file, std::string dfName)
387387
return it - dfList.begin();
388388
}
389389

390+
struct CalculateDelta {
391+
CalculateDelta(uint64_t& target)
392+
: mTarget(target)
393+
{
394+
start = uv_hrtime();
395+
}
396+
~CalculateDelta()
397+
{
398+
if (!active) {
399+
return;
400+
}
401+
O2_SIGNPOST_ACTION(reader_memory_dump, [](void*) {
402+
void (*dump_)(const char*);
403+
if (void* sym = dlsym(nullptr, "igprof_dump_now")) {
404+
dump_ = __extension__(void (*)(const char*)) sym;
405+
if (dump_) {
406+
std::string filename = fmt::format("reader-memory-dump-{}.gz", uv_hrtime());
407+
dump_(filename.c_str());
408+
}
409+
}
410+
});
411+
mTarget += (uv_hrtime() - start);
412+
}
413+
414+
void deactivate() {
415+
active = false;
416+
}
417+
418+
bool active = true;
419+
uint64_t& mTarget;
420+
uint64_t start;
421+
uint64_t stop;
422+
};
423+
390424
bool DataInputDescriptor::readTree(DataAllocator& outputs, header::DataHeader dh, int counter, int numTF, std::string treename, size_t& totalSizeCompressed, size_t& totalSizeUncompressed)
391425
{
392-
auto ioStart = uv_hrtime();
393-
426+
CalculateDelta t(mIOTime);
394427
auto folder = getFileFolder(counter, numTF);
395428
if (!folder.filesystem()) {
429+
t.deactivate();
396430
return false;
397431
}
398432

399433
auto rootFS = std::dynamic_pointer_cast<TFileFileSystem>(folder.filesystem());
400434

401435
if (!rootFS) {
436+
t.deactivate();
402437
throw std::runtime_error(fmt::format(R"(Not a TFile filesystem!)"));
403438
}
404439
// FIXME: Ugly. We should detect the format from the treename, good enough for now.
@@ -420,6 +455,7 @@ bool DataInputDescriptor::readTree(DataAllocator& outputs, header::DataHeader dh
420455
// FIXME: we should distinguish between an actually missing object and one which has a non compatible
421456
// format.
422457
if (!format) {
458+
t.deactivate();
423459
LOGP(debug, "Could not find tree {}. Trying in parent file.", fullpath.path());
424460
auto parentFile = getParentFile(counter, numTF, treename);
425461
if (parentFile != nullptr) {
@@ -460,19 +496,6 @@ bool DataInputDescriptor::readTree(DataAllocator& outputs, header::DataHeader dh
460496
f2b->setLabel(treename.c_str());
461497
f2b->fill(datasetSchema, format);
462498

463-
mIOTime += (uv_hrtime() - ioStart);
464-
465-
O2_SIGNPOST_ACTION(reader_memory_dump, [](void*) {
466-
void (*dump_)(const char*);
467-
if (void* sym = dlsym(nullptr, "igprof_dump_now")) {
468-
dump_ = __extension__(void (*)(const char*)) sym;
469-
if (dump_) {
470-
std::string filename = fmt::format("reader-memory-dump-{}.gz", uv_hrtime());
471-
dump_(filename.c_str());
472-
}
473-
}
474-
});
475-
476499
return true;
477500
}
478501

@@ -820,7 +843,8 @@ bool DataInputDirector::readTree(DataAllocator& outputs, header::DataHeader dh,
820843
treename = aod::datamodel::getTreeName(dh);
821844
}
822845

823-
return didesc->readTree(outputs, dh, counter, numTF, treename, totalSizeCompressed, totalSizeUncompressed);
846+
auto result = didesc->readTree(outputs, dh, counter, numTF, treename, totalSizeCompressed, totalSizeUncompressed);
847+
return result;
824848
}
825849

826850
void DataInputDirector::closeInputFiles()

GPU/Common/GPUCommonMath.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ class GPUCommonMath
8282
GPUd() static int32_t Float2IntRn(float x);
8383
GPUd() static float Modf(float x, float y);
8484
GPUd() static bool Finite(float x);
85+
GPUd() static bool IsNaN(float x);
8586
GPUd() static uint32_t Clz(uint32_t val);
8687
GPUd() static uint32_t Popcount(uint32_t val);
8788

@@ -224,7 +225,8 @@ GPUdi() float GPUCommonMath::Floor(float x) { return CHOICE(floorf(x), floorf(x)
224225
#ifdef GPUCA_NO_FAST_MATH
225226
GPUdi() float GPUCommonMath::Round(float x) { return CHOICE(roundf(x), roundf(x), round(x)); }
226227
GPUdi() int32_t GPUCommonMath::Float2IntRn(float x) { return (int32_t)Round(x); }
227-
GPUdi() bool GPUCommonMath::Finite(float x) { return CHOICE(std::isfinite(x), isfinite(x), true); }
228+
GPUdi() bool GPUCommonMath::Finite(float x) { return CHOICE(std::isfinite(x), isfinite(x), true); } // Fixme: fix these 2 for OpenCL
229+
GPUdi() bool GPUCommonMath::IsNaN(float x) { return CHOICE(std::isnan(x), isnan(x), false); }
228230
GPUhdi() float GPUCommonMath::Sqrt(float x) { return CHOICE(sqrtf(x), (float)sqrt((double)x), sqrt(x)); }
229231
GPUdi() float GPUCommonMath::ATan(float x) { return CHOICE((float)atan((double)x), (float)atan((double)x), atan(x)); }
230232
GPUhdi() float GPUCommonMath::ATan2(float y, float x) { return CHOICE((float)atan2((double)y, (double)x), (float)atan2((double)y, (double)x), atan2(y, x)); }

GPU/GPUTracking/ITS/GPUITSFitterKernels.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "ITStracking/Cell.h"
2323
#include "CommonConstants/MathConstants.h"
2424

25-
#ifdef CA_DEBUG
25+
#if defined(CA_DEBUG) && !defined(GPUCA_GPUCODE_DEVICE)
2626
#include <cstdio>
2727
#endif
2828

prodtests/full-system-test/dpl-workflow.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ if [[ $GPUTYPE == "HIP" ]]; then
259259
TIMESLICEOFFSET=$(($GPU_FIRST_ID + ($NUMAGPUIDS != 0 ? ($NGPUS * $NUMAID) : 0)))
260260
GPU_CONFIG+=" --environment \"ROCR_VISIBLE_DEVICES={timeslice${TIMESLICEOFFSET}}\""
261261
fi
262-
[[ "${EPN_NODE_MI100:-}" != "1" ]] && export HSA_NO_SCRATCH_RECLAIM=1
262+
[[ ${EPN_NODE_MI100:-} != "1" ]] && export HSA_NO_SCRATCH_RECLAIM=1
263+
[[ $EPNSYNCMODE == 1 && ${EPN_NODE_MI100:-} == "1" ]] && GPU_CONFIG_KEY+="GPU_proc.serializeGPU=3;"
263264
#export HSA_TOOLS_LIB=/opt/rocm/lib/librocm-debug-agent.so.2
264265
else
265266
GPU_CONFIG_KEY+="GPU_proc.deviceNum=-2;"

0 commit comments

Comments
 (0)