Skip to content

Commit

Permalink
v1.85 update
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasdonlon committed Dec 14, 2022
1 parent a0c4078 commit 90feccd
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 17 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
nbody 1.85:
- now declares binary version being used at runtime in terminal
- all workunits have timesteps corrected, not just those with
versions < 0.80 (side effect of the above, see nbody_lua_nbodyctx.c)
- Lots of additions and changes that weren't properly tracked.
For example, autodiff was added in 1.84, and then removed
for this version. LMC was added in 1.82 and has had numerous
bug fixes since then. I don't know all the changes, so I
can't list them, but we need to be better about this from now
on. -Tom

separation 1.0:
- CAL version removed.
Expand Down
2 changes: 1 addition & 1 deletion nbody/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ project(milkyway_nbody)

set(nbody_VERSION_MAJOR 1
CACHE INTERNAL "N-body version number")
set(nbody_VERSION_MINOR 84
set(nbody_VERSION_MINOR 85
CACHE INTERNAL "N-body version number")
set(nbody_VERSION "${nbody_VERSION_MAJOR}.${nbody_VERSION_MINOR}"
CACHE INTERNAL "N-body version number")
Expand Down
2 changes: 1 addition & 1 deletion nbody/sample_workunits/for_developers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
totalBodies = 40000 -- -- NUMBER OF BODIES -- --
nbodyLikelihoodMethod = "EMD" -- -- HIST COMPARE METHOD -- --
nbodyMinVersion = "1.84" -- -- MINIMUM APP VERSION -- --
nbodyMinVersion = "1.85" -- -- MINIMUM APP VERSION -- --

run_null_potential = false -- -- NULL POTENTIAL SWITCH -- --
use_tree_code = true -- -- USE TREE CODE NOT EXACT -- --
Expand Down
2 changes: 1 addition & 1 deletion nbody/sample_workunits/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- STANDARD SETTINGS -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
nbodyMinVersion = "1.84" -- -- MINIMUM APP VERSION
nbodyMinVersion = "1.85" -- -- MINIMUM APP VERSION

run_null_potential = false -- -- NULL POTENTIAL SWITCH
use_tree_code = true -- -- USE TREE CODE (NOT EXACT)
Expand Down
33 changes: 20 additions & 13 deletions nbody/src/nbody_lua_types/nbody_lua_nbodyctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,12 @@ static int createNBodyCtx(lua_State* luaSt)
}
#endif

{
int major = 0, minor = 0;
/*
This looks really old and I don't think we have to check for WUs with version < 0.9 anymore.
I'm going to remove it (otherwise nbody lite prints two version statements due to the nbReadMinVersion
call here) and if it ends up breaking something, put it back later */
// {
// int major = 0, minor = 0;

/* Automatically correct the timestep size so an integer
* number of timesteps covers the evolution time.
Expand All @@ -190,17 +194,20 @@ static int createNBodyCtx(lua_State* luaSt)
* avoid not validating against currently existing workunits
*/

if ( !nbReadMinVersion(luaSt, &major, &minor) /* If we fail to read version */
|| (major > 0 || (major == 0 && minor >= 90)) /* Version required >= 0.90 */
|| (major == 0 && minor == 0)) /* Min version not set */
{
ctx.timestep = nbCorrectTimestep(ctx.timeEvolve, ctx.timestep);
}
else
{
mw_printf("Warning: not applying timestep correction for workunit with min version %d.%d\n", major, minor);
}
}
// if ( !nbReadMinVersion(luaSt, &major, &minor) /* If we fail to read version */
// || (major > 0 || (major == 0 && minor >= 90)) /* Version required >= 0.90 */
// || (major == 0 && minor == 0)) /* Min version not set */
// {
// ctx.timestep = nbCorrectTimestep(ctx.timeEvolve, ctx.timestep);
// }
// else
// {
// mw_printf("Warning: not applying timestep correction for workunit with min version %d.%d\n", major, minor);
// }
// }

//instead, just put this here -Tom
ctx.timestep = nbCorrectTimestep(ctx.timeEvolve, ctx.timestep);

pushNBodyCtx(luaSt, &ctx);
return 1;
Expand Down
3 changes: 2 additions & 1 deletion nbody/src/nbody_lua_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ int nbReadMinVersion(lua_State* luaSt, int* major, int* minor)
mw_printf("Error reading minimum required version\n");
return FALSE;
}


mw_printf("Running MilkyWay@home Nbody v%s\n", version);
return TRUE;
}

0 comments on commit 90feccd

Please sign in to comment.