Re: phantom question

24 views
Skip to first unread message

Daniel Price

unread,
Feb 28, 2017, 4:19:29 PM2/28/17
to Matias Blana Diaz, phantoms...@googlegroups.com, Jorge Cuadra
Hi Matias,

Jorge Cuadra spotted a similar problem (also in Garching), I think it is specific to a particular version of the intel compiler. Solution appears to be as follows:

> With the help of the user support I found out that replacing -xhost -ipo with -xavx -ip in the compiling flags solves the issue. I understand that this might produce a less efficient performance, but I’ll stick to it for the time being.

Let me know if that works - I’m assuming you’ve set the usual environment variables like OMP_STACKSIZE as per the wiki

Best wishes,

Daniel

> On 28 Feb 2017, at 9:03 pm, Matias Blana Diaz <xxx> wrote:
>
> Dear Daniel,
>
> thank you very much for releasing your code. I am very interested on using
> it for galaxy and star cluster simulations. We actually meet very shortly
> in Heidelberg's IMPRS workshop when I was finishing my master.
>
> I was just trying to install phantom, doing the test suite and in your
> wiki says to report any problem with the test, and it give me this error
> message. May be I'm just being silly and forgot to set a variable.
>
> Thank you very much for your time.
> Best regards,
>
> Matias
>
>
> <-- LINKLIST TEST COMPLETE
>
> --> TESTING DERIVS MODULE
>
>
> ---------------- particles set on 100 x 100 x 100 uniform cubic lattice
> --------------
> x: -0.500 -> 0.500 y: -0.500 -> 0.500 z: -0.500
> -> 0.500
> dx: 1.000E-02 dy: 1.000E-02 dz: 1.000E-02
> -----------------------------------------------------------------------------------------
>
> thread 0 npart = 1000000
> hfact = 1.2
>
> --> testing Hydro derivatives
> maketree: nodes = 524287, max level = 18, min leaf level = 16 max
> level indexed = 18
> cell cache = 50000 neigh cache = 12000 icall = 1
> /bin/bash: line 1: 15004 Segmentation fault (core dumped)
> ../bin/phantom test
> make[1]: *** [test] Error 139
> make[1]: Leaving directory `/home/mblana/Programs/phantom/build'
> make: *** [test] Error 2
>

Daniel Price

unread,
Jun 22, 2017, 12:46:42 AM6/22/17
to Matias Blana Diaz, phantoms...@googlegroups.com
Hi Matias,

> sorry to bother you again. I have some N-body models of barred galaxies
> where I want to put gas. From the E-mails I understand that there were
> some problems of mom. conservations for models with particles with
> different masses?, and so I have been testing analytical potentials for
> the stellar structures and putting gas.

From what we understand so far, this is just that the default tree opening criterion is not tight enough when there are unequal mass particles. The workaround until we implement a better opening criterion is to decrease the tree opening criterion (to 0.3 or 0.2 from 0.5 which is the default). This makes the runtime slower but does fix the problem.

> Actually, I dont need my N-body model to evolve, and so is it possible to
> use it in phantom as a static system where the gravitation potential is
> calculated just once, and I rotate it according to the pattern speed that
> the barred model has? I have been studying the code, to use my N-body
> model as some sort of "external" potential. Is there an option I could do
> this?

This should be straightforward to implement in externalforces.f90, you obviously have to decide how to interpolate the acceleration from your “fixed” potential, or do a sum over your “N-body” particles each time.

You should just add a module called extern_nbody.f90 which returns the potential (phi) and acceleration (fxi, fyi, fyi) at a given position from your N-body model (also at a given time, t). There are plenty of examples of similar modules, e.g. extern_binary.f90 is a simple time-dependent external potential from a binary. Yours is the same but with N > 2. Obviously you have to decide how you want to soften the interaction.

Might be easier to let your N-body model evolve…

Cheers,

Daniel
Reply all
Reply to author
Forward
0 new messages