Skip to content
Snippets Groups Projects

Detect whether VR was compiled with NOMASS option and change the VR interface accordingly

Merged Matthieu Schaller requested to merge VR_detection into master

See discussion on the VELOCIraptor github, issue 66.

Fixes #654 (closed).

Edited by Matthieu Schaller

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
  • If you confirm that this works for you, I'll merge it. Thanks!

  • @pelahi you might be interested in this as well.

  • mentioned in issue #654 (closed)

  • Matthieu Schaller changed the description

    changed the description

  • This looks like it should fix the problems I found and it gets much further now, but I just had a segfault on the 75Mpc box at the "Sort particles and compute properties" stage.

  • Could you run with Verbose=1? That might help if you want to try running in the background and don't have time to debug right away.

    Edited by Pascal Elahi
  • It crashes on the 12Mpc Eagle DMO low redshift ICs too, but only if I use >1 MPI rank. Here's the last bit of the output with verbose=1:

    Getting Hierarchy 4069
    Done
    1 Sort particles and compute properties of 4069 objects 
    1 Calculate properties using minimum potential particle as reference 
    1 Sort particles by binding energy
    0 Sort particles and compute properties of 2036 objects 
    0 Calculate properties using minimum potential particle as reference 
    0 Sort particles by binding energy
    1 getting CM
    1 Done getting CM in 0.00311804
    Done FOF masses 0.000142813
    1 getting energy
    0 getting CM
    0 Done getting CM in 0.0100329
    Done FOF masses 0.000133038
    0 getting energy
    1 Have calculated potentials 12.8857
    1Done getting energy in 12.9864
    1 getting bulk properties
    
    ===================================================================================
    =   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
    =   PID 207647 RUNNING AT m7013
    =   EXIT CODE: 11
    =   CLEANING UP REMAINING PROCESSES
    =   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
    ===================================================================================

    I'll try it in ddt.

  • Odd. The segfault is at this line in Particle.h:

            Double_t Radius() const {return sqrt(position[0]*position[0]+position[1]*position[1]+position[2]*position[2]);}

    Somehow position is an invalid pointer. This happens in the loop at line 490 of substructureproperties.cxx where it loop over particles within Rv.

    Edited by John Helly
  • Ok, it's a typo in velociraptor_interface.c, line 524:

    #ifdef HAVE_VELOCIRAPTOR_WIH_NOMASS
      /* Assume all particles have the same mass */
      double DM_mass = 0.;
      for (size_t i = 0; i < e->s->nr_gparts; ++i) {
    ...

    Note the missing T in WITH, which explains why my particle mass is 6.2e-323!

  • Also, massuniformbox in struct siminfo should be mass_uniform_box.

  • And velociraptor is reading out mass_uniform_box in initvelociraptor(), which is before swift sets it in velociraptorinvoke(). If I move the assignment later velociraptor then it runs to completion on the 12Mpc box. The branch VR_detection_typo has the changes I made in Swift. I'll make a PR for Velociraptor now.

  • ah thanks! Silly mistake...

  • added 2 commits

    • d541ca06 - Fix typos in velociraptor interface that cause problems with VR_NO_MASS
    • f0263198 - Merge branch 'VR_detection_typo' into 'VR_detection'

    Compare with previous version

  • I have merged your fixes in this branch.

  • If the crash above is fixed then this can be merged I think.

  • Pascal merged my velociraptor change so I'll check that the 75Mpc box runs with this swift branch and the lastest velociraptor master.

  • Velociraptor with NO_MASS on the 75Mpc box worked, so I think this can be merged.

  • Thanks both! Good this is all fixed.

  • mentioned in commit 1d7fce84

Please register or sign in to reply
Loading