Intrinsic vectorisation
I have implemented vectorised versions of the symmetrical and non-symmetrical density and force interaction functions for the GADGET_SPH
scheme.
There are also tests for each interaction in tests/testInteractions.c
.
There are some bug fixes in the DEFAULT_SPH
along with changes to the struct part
and minor renaming of variables.
Calculations of the balsara
switch and P_over_rho2
are now performed in hydro_prepare_force()
rather than in runner_iact_nonsym_force
or runner_iact_force
.
Note: The !203 (merged) gadget2-part-update
branch should be merged with master prior to this merge request.
Merge request reports
Activity
Added 28 commits:
-
f90d3c9d...31fc3179 - 26 commits from branch
master
- 506dad4a - Merge branch 'master' into intrinsic-vectorisation
- c690636d - Removed error message when vectorisation is turned on using Gadget 2 SPH scheme.
-
f90d3c9d...31fc3179 - 26 commits from branch
There is at least one problem when
VEC_SIZE == 4
, i.e. building on COSMA4:ps/libswiftsim_la-runner.Tpo -c runner.c -fPIC -DPIC -o .libs/libswiftsim_la-runner.o In file included from hydro.h(35), from drift.h(28), from runner.c(46): ./hydro/Gadget2/hydro_iact.h(546): error: identifier "POrho_i" is undefined POrho_i.v = vec_set(pi[0]->force.P_over_rho2, pi[1]->force.P_over_rho2,
Can you have a look at that.
mentioned in commit 794a9482
OK, spoke too soon, realised I hadn't ran all the tests...
testSingle.c(84): error: struct "<unnamed>" has no field "c" p1.force.c = 0.0040824829f; ^ testSingle.c(86): error: struct "<unnamed>" has no field "c" p2.force.c = 58.8972740361f; ^ testSingle.c(90): error: struct "<unnamed>" has no field "POrho2" p1.force.POrho2 = p1.u * hydro_gamma_minus_one / p1.rho; ^ testSingle.c(91): error: struct "<unnamed>" has no field "POrho2" p2.force.POrho2 = p2.u * hydro_gamma_minus_one / p2.rho;
This is with the
DEFAULT_SPH
. Please fix and create a new merge request.I have created a merge request !209 (merged) and made the changes.