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 think /lib/sapporo2 still needs to be integrated in the new build system; I guess that's a job for me.
And then we need to figure out whether the codes work with Sapporo 2. I think there's one that requires Sapporo 2 and doesn't work with Sapporo light, but I don't remember which.
Actually, maybe ./setup install sapporo2 and ./setup install amuse-ph4-sapporo and ./setup install amuse-ph4-sapporo2? That would be easiest to implement I think.
Off the top of my head, it would take a rewrite of lib/sapporo2/Makefile along the lines of lib/sapporo_light/Makefile and adding a support/ subdirectory there with an autoconf, and then probably an extra function in support/setup/installing.sh and maybe setup, and then an additional package definition in src/amuse_ph4/packages.
I've looked at linking Ph4 with Sapporo2 instead of Sapporo Light, but that's failing because Sapporo2 doesn't have a g6_get_nj_max_() function. That's the one you added to give a better error message when the user wants more particles than Sapporo Light allows. So you need to look at Sapporo2, see if it has a particle limit too, and implement the same thing for this to work.
but there is some code to increase nj_max if address >= nj_max):
if (address >= nj_max) {
fprintf(stderr, "Increasing nj_max! Nj_max was: %d to be stored address: %d \n",
nj_max, address);
increase_jMemory();
//Extra check, if we are still outside nj_max, we quit since particles are not
//nicely send in order
if (address >= nj_max) {
fprintf(stderr, "Increasing nj_max was not enough! Send particles in order to the library! Exit\n");
exit(-1);
}
}
Perhaps this does not matter with respect to solving the linking problem, I guess I'll need to add the same lines of code to Sapporo 2 as we added to Sapporo Light in closing #1208 through MR #1218 .
I've looked at linking Ph4 with Sapporo2 instead of Sapporo Light, but that's failing because Sapporo2 doesn't have a g6_get_nj_max_() function. That's the one you added to give a better error message when the user wants more particles than Sapporo Light allows. So you need to look at Sapporo2, see if it has a particle limit too, and implement the same thing for this to work.
Okay, I've added some commits to #1262 to add an amuse-ph4-sapporo2 package that compiles for me now with the updated Sapporo2 you made.
./setup test sapporo2 doesn't work yet, because it expects a make test command to work inside the Sapporo2 source, and that doesn't exist. But ./setup test ph4-sapporo2 should run the lone GPU test with Sapporo2. Could you give that a try on your test setup?
Activity
HannoSpreeuw commentedon Mar 16, 2026
I managed to build Sapporo 2 as "included" in AMUSE with CUDA release 13.1, with a few changes that have to do with newer CUDA versions.
@rieder I could file a MR to https://github.com/treecode/sapporo2 with those updates.
After the merge a Sapporo 2 build within AMUSE should be as simple as
The build is successful
but yields a ton of warnings such as
and
HannoSpreeuw commentedon Mar 16, 2026
I guess I will need to try running as well.
LourensVeen commentedon Mar 16, 2026
I think
/lib/sapporo2still needs to be integrated in the new build system; I guess that's a job for me.And then we need to figure out whether the codes work with Sapporo 2. I think there's one that requires Sapporo 2 and doesn't work with Sapporo light, but I don't remember which.
HannoSpreeuw commentedon Mar 16, 2026
I'd be happy with a Python script that works for both Sapporo Light and Sapporo 2, with some switch.
I guess that switch requires a manual modification of the Makefile that steers
./setup install amuse-ph4-sapporo.LourensVeen commentedon Mar 16, 2026
Actually, maybe
./setup install sapporo2and./setup install amuse-ph4-sapporoand./setup install amuse-ph4-sapporo2? That would be easiest to implement I think.HannoSpreeuw commentedon Mar 16, 2026
And which files would this implementation affect?
LourensVeen commentedon Mar 17, 2026
Off the top of my head, it would take a rewrite of
lib/sapporo2/Makefilealong the lines oflib/sapporo_light/Makefileand adding asupport/subdirectory there with an autoconf, and then probably an extra function insupport/setup/installing.shand maybesetup, and then an additional package definition insrc/amuse_ph4/packages.HannoSpreeuw commentedon Mar 17, 2026
Wow, you rattled that off as if you do this every week.
LourensVeen commentedon May 12, 2026
I've looked at linking Ph4 with Sapporo2 instead of Sapporo Light, but that's failing because Sapporo2 doesn't have a
g6_get_nj_max_()function. That's the one you added to give a better error message when the user wants more particles than Sapporo Light allows. So you need to look at Sapporo2, see if it has a particle limit too, and implement the same thing for this to work.HannoSpreeuw commentedon May 12, 2026
All right, I can do that.
HannoSpreeuw commentedon May 19, 2026
Interestingly, in Sapporo 2
nj_maxis set to a much smaller number than in Sapporo Light (131072):but there is some code to increase
nj_maxifaddress >= nj_max):However, increase_jMemory only gives a 10% increase.
HannoSpreeuw commentedon May 20, 2026
Perhaps this does not matter with respect to solving the linking problem, I guess I'll need to add the same lines of code to Sapporo 2 as we added to Sapporo Light in closing #1208 through MR #1218 .
HannoSpreeuw commentedon May 28, 2026
This should be addressed by Sapporo 2 MR 18.
LourensVeen commentedon May 28, 2026
Okay, I've added some commits to #1262 to add an
amuse-ph4-sapporo2package that compiles for me now with the updated Sapporo2 you made../setup test sapporo2doesn't work yet, because it expects amake testcommand to work inside the Sapporo2 source, and that doesn't exist. But./setup test ph4-sapporo2should run the lone GPU test with Sapporo2. Could you give that a try on your test setup?HannoSpreeuw commentedon May 28, 2026
complete without (fatal) errors.
yields
./setup test sapporo2indeed yieldsHannoSpreeuw commentedon Jun 8, 2026
Sapporo 2 PR20 should fix this, although a problem persists with running the OpenCL executables.
I have spent some time trying to fix this, but I did not succeed. Since OpenCL is not used often in AMUSE, I propose to merge.