Comments (13)
I.e. for each compilation of a RDC object file, it generates a 'unique' identifier and thus requires the running of the nvlink
that depends on that .cu.o
file.
The symbols:
__cudaRegisterLinkedBinary_4e0d1928_9_Filler_cu_314c4826_29355
__cudaRegisterLinkedBinary_4e0d1928_9_Filler_cu_ce41cbe7_29634
from celeritas.
Hi @esseivaju, I'm not able to reproduce this with the default preset build using the current tip of develop (b427fde) and a local spack env with gcc 11.3 as:
- Build from scratch
cmake --preset=default .
, run tests, everything fine - Add a new empty line in
src/celeritas/global/ActionLauncher.device.hh
- Run
ninja
again and the incremental build completes without error.
Which commit are you building, and which CUDA version (I'm on 11.7.1)?
from celeritas.
Could it be #847 introducing
Line 177 in b427fde
-D CMAKE_LINK_DEPENDS_NO_SHARED=OFF
is the problem resolved?from celeritas.
I am building b427fde with gcc11.3 / cuda 12.1. Setting -D CMAKE_LINK_DEPENDS_NO_SHARED=OFF
does seem to fix the issue.
from celeritas.
I also see similar problem in an updated build. Let me investigate.
from celeritas.
: && /srv/software/gnu10/10.2.0/bin/g++ -Wall -Wextra -pedantic -g test/CMakeFiles/testdetail_TestMacros.dir/TestMacros.test.cc.o -o test/testdetail_TestMacros -Wl,-rpath,/nashome/p/pcanal/geant/gcc10/builds/scalar-cuda12/celeritas/lib64:/nashome/p/pcanal/geant/gcc10/install/opt/lib64 lib64/libtestcel_harness.so lib64/libcorecel_final.so /nashome/p/pcanal/geant/gcc10/install/opt/lib64/libgtest.so.1.10.0 -pthread lib64/libcorecel.so && :
lib64/libcorecel.so: undefined reference to `__cudaRegisterLinkedBinary_4e0d1928_9_Filler_cu_314c4826_29355'
lib64/libcorecel_final.so: undefined reference to `__fatbinwrap_4e0d1928_9_Filler_cu_438f1dcd_109866'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
pcanal@wc:celeritas $ touch ~/geant/sources/celeritas/src/corecel/data/detail/Filler.cu
pcanal@wc:celeritas $ ninja -j 1
[4/365] Linking CXX executable test/testdetail_TestMacros
FAILED: test/testdetail_TestMacros
: && /srv/software/gnu10/10.2.0/bin/g++ -Wall -Wextra -pedantic -g test/CMakeFiles/testdetail_TestMacros.dir/TestMacros.test.cc.o -o test/testdetail_TestMacros -Wl,-rpath,/nashome/p/pcanal/geant/gcc10/builds/scalar-cuda12/celeritas/lib64:/nashome/p/pcanal/geant/gcc10/install/opt/lib64 lib64/libtestcel_harness.so lib64/libcorecel_final.so /nashome/p/pcanal/geant/gcc10/install/opt/lib64/libgtest.so.1.10.0 -pthread lib64/libcorecel.so && :
lib64/libcorecel.so: undefined reference to `__cudaRegisterLinkedBinary_4e0d1928_9_Filler_cu_ce41cbe7_29634'
lib64/libcorecel_final.so: undefined reference to `__fatbinwrap_4e0d1928_9_Filler_cu_438f1dcd_109866'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
from celeritas.
And indeed reverting #847 (completely for now) solves the problem (and of course doing ninja clean
is a (lame) work-around)
from celeritas.
OK, maybe we need to just set CMAKE_LINK_DEPENDS_NO_SHARED
conditionally on RDC (aka vecgeom + cuda). I'm surprised because VecGeom has this option set as well.
from celeritas.
I am building b427fde with gcc11.3 / cuda 12.1. Setting -D CMAKE_LINK_DEPENDS_NO_SHARED=OFF does seem to fix the issue.
That's odd. It works for me (with and without the space after the D
).
from celeritas.
I'm surprised because VecGeom has this option set as well.
I see it in the source (and even I see that line executed) but I don't see it in the CMakeCache.txt
(i.e. is it somehow not activated?)
from celeritas.
It's not being set as a cache variable, just as a directory scope one (so it will be "seen" by the targets but not saved from one configuration to the next).
from celeritas.
Ok. It is still 'uneffective' (it leads to the proper rebuilds ... I am checking why)
from celeritas.
And this is because there is a (hard) dependency from the result of nvlink
and the static libraries. In Celeritas the dependency on the static library is only soft/order while the shared library dependency is 'hard' when it works and soft when it fails. This might be because we introduce the static library dependency as:
target_link_options(${_target_final}
PRIVATE
$<DEVICE_LINK:$<TARGET_FILE:${_libstatic}>>
)
from celeritas.
Related Issues (20)
- Performance impact of shared memory carveout
- Refactor CELER_(DISABLE|PARALLEL) environment variables
- Ensure reproducibility when using MT Geant4 with Celeritas offloading HOT 1
- Implement offload to Celeritas via G4VTrackingManager
- Improve device initialization for eventual CMSSW use
- Signal handling not thread-safe
- Automate tricky input parameters
- Support Intel GPUs
- Add G4VG support for ALICE Geant4 geometry components HOT 5
- Build errors with GEANT4 11.2.0 HOT 2
- Add ORANGE construction of single units HOT 2
- Nonuniform Rayleigh scattering cross section grid in Geant4 11.2 HOT 4
- Update celer-g4 ROOT I/O
- Refactor physics tables for correct material-dependent bounds HOT 5
- Improve performance scaling with host threads HOT 2
- Crash in TrackSort test with VecGeom: illegal memory access HOT 2
- Add "region" support for cuts, along-step treatment, ...
- Add safety distance calculation HOT 4
- Add multi-level navigation HOT 1
- Use geometry length scale to determine a minimum step HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from celeritas.