Skip to content
Snippets Groups Projects

Intrinsic vectorisation

Merged James Willis requested to merge intrinsic-vectorisation into master

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Could you update this branch. There are now a number of conflicts with master that you are probably better at resolving. Thanks.

  • I'm trying to merge it now. I'll let you know when I'm done.

  • James Willis Added 28 commits:

    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.
  • This should be ready to merge with the master now.

  • 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.

  • Sorry, I hadn't tried it on COSMA4. I'll have a look.

  • James Willis Added 2 commits:

    Added 2 commits:

    • eb51b8fb - Zeroed particle fields.
    • 8f146e81 - Renamed variables for VEC_SIZE=4 and fixed bug with VEC_SIZE=4 runner_iact_force_vec.
  • That should be okay now... I ran my tests on charon, with SSE enabled.

  • Thanks, haven't discovered any further issues so will accept.

  • Peter W. Draper Status changed to merged

    Status changed to merged

  • Peter W. Draper mentioned in commit 794a9482

    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.

Please register or sign in to reply
Loading