You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create a new project with both of the above as submodules. In https://github.com/frobnitzem/FastParticleToolkit I basically replicated the structure of ComputationalRadiationPhysics/picongpu, but left out PMacc. Something got lost in translation with the include/fpt/CMakeLists.txt though, since I always get some variant of:
CMake Error at $HOME/FastParticleToolkit/thirdParty/mallocMC/alpaka/CMakeLists.txt:108 (add_custom_target):
add_custom_target cannot create target "alpakaIde" because another target
with the same name already exists. The existing target is a custom target
created in source directory
"$HOME/FastParticleToolkit/include/fpt". See
documentation for policy CMP0002 for more details.
-- Found mallocMC: $HOME/FastParticleToolkit/thirdParty/mallocMC/src (found suitable version "2.6.0", minimum required is "2.3.0")
It seems the issue is that cupla links to alpaka and defines alpakaIde first. Then, mallocMC tries the same trick and fails. I can't set mallocMC to "use external alpaka" since the 2 alpaka versions are different. So I have too many alpakas.
code:
git clone --recursive https://github.com/frobnitzem/FastParticleToolkit
FastParticleToolkit/bin/FPT-create.sh experiment
cd experiment
../FastParticleToolkit/bin/FPT-build.sh
The text was updated successfully, but these errors were encountered:
It should be possible to tell mallocMC to use an external version of alpaka. It defines a property mallocMC_ALPAKA_PROVIDER to switch between its internally shipped alpaka version and an external user-provided one. So you could use that external mechanism to make mallocMC use the "right" version for your setup.
We follow this external scheme in PMacc, I believe in a hacky way, here. Perhaps this would work for you as well?
Btw cupla has a similar mechanism in cupla_ALPAKA_PROVIDER for the same reason. So you could set one of malloMC or cupla to use alpaka from the other, or set both to use the same external alpaka. Generally, cupla is more picky in what alpaka version it accepts (as it's a direct interface adapter of alpaka).
As @sbastrakov said settingmallocMC_ALPAKA_PROVIDER should work. In picongpu we still use a very old cmake find module for mallocMC
In general, it should be possible to use mallocMC without this find module, this is something I would try to do. For modern CMake there is no need anymore to provide a find module, this is an old leftover from CMake times before CMake targets.
I am trying to create a new project with both of the above as submodules. In https://github.com/frobnitzem/FastParticleToolkit I basically replicated the structure of ComputationalRadiationPhysics/picongpu, but left out PMacc. Something got lost in translation with the include/fpt/CMakeLists.txt though, since I always get some variant of:
It seems the issue is that cupla links to alpaka and defines alpakaIde first. Then, mallocMC tries the same trick and fails. I can't set mallocMC to "use external alpaka" since the 2 alpaka versions are different. So I have too many alpakas.
code:
The text was updated successfully, but these errors were encountered: