Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No circ deps #281

Closed
wants to merge 4 commits into from
Closed

No circ deps #281

wants to merge 4 commits into from

Conversation

agheata
Copy link
Contributor

@agheata agheata commented Mar 6, 2024

This tries to remove the circular dependencies between libraries. Not yet linking.

@phsft-bot
Copy link

Can one of the admins verify this patch?

void InitializeGPU();
void ShowerGPU(int event, TrackBuffer &buffer); // const &buffer);
void FreeGPU();
void ProcessGPUHits();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is declared in the integration layer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this should go away as it is undefined, it doesn't cry just because it is not used in a templated class

@drbenmorgan
Copy link
Member

At present, this is failing to build locally for me with the same error as on the CI:

[1/14] Linking CXX shared library CMakeFiles/AdePT_G4_integration.dir/cmake_device_link.o
FAILED: CMakeFiles/AdePT_G4_integration.dir/cmake_device_link.o 
/.../nvcc -forward-unknown-to-host-compiler -O2 -g -DNDEBUG --generate-code=arch=compute_86,code=[compute_86,sm_86] -Xnvlink --suppress-stack-size-warning -Xcompiler=-fPIC -Wno-deprecated-gpu-targets -shared -dlink CMakeFiles/AdePT_G4_integration.dir/src/AdePTTrackingManager.cc.o CMakeFiles/AdePT_G4_integration.dir/src/AdePTTrackingManager.cu.o CMakeFiles/AdePT_G4_integration.dir/src/AdePTPhysics.cc.o CMakeFiles/AdePT_G4_integration.dir/src/HepEMPhysics.cc.o CMakeFiles/AdePT_G4_integration.dir/src/AdePTGeant4Integration.cpp.o -o CMakeFiles/AdePT_G4_integration.dir/cmake_device_link.o -L/.../lib /.../lib64/libvecgeom.a /.../lib64/libvecgeomcuda_static.a /.../lib64/libvgdml.a -lrt -lpthread -ldl  -lcudadevrt -lcudart_static
nvlink error   : Undefined reference to '_ZN11HostScoring9RecordHitEcddPKN7vecgeom4cuda13NavStateIndexEPNS1_8Vector3DIdEES7_S7_ddS4_S7_S7_S7_dd' in 'CMakeFiles/AdePT_G4_integration.dir/src/AdePTTrackingManager.cu.o'
nvlink error   : Undefined reference to '_ZN11HostScoring15AccountProducedEiii' in 'CMakeFiles/AdePT_G4_integration.dir/src/AdePTTrackingManager.cu.o'

@JuanGonzalezCaminero
Copy link
Contributor

Yes, in principle this happens because now AdePTTransport is templated on the integration layer. When we compile the AdePTTransport methods during compilation of AdePT_G4_Integration it needs to call HostScoring, but it doesn't have visibility of the implementation, which at this point is still part of libAdePT

We will move the scoring into headers as well and it should solve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants