danieljprice / phantom

Phantom Smoothed Particle Hydrodynamics and Magnetohydrodynamics code

Home Page:https://phantomsph.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to relax star for SETUP of grstar

Shigaharuki3012 opened this issue · comments

Hi,I was trying to use SETUP of grstar and then doing make and make-setup procedure....but something got wrong with relaxing stars both on remote cluster and on my local Mac PC.(Compiler:ifort for the former and gfortran for the latter)
Commands are:

make 
make setup
./phantomsetup grstar  

Then it seemed strange that the memory allocated was too large:

 Total memory allocated to arrays:  112.225 GB n =    100000000

To note, all were defaults except for relax option, which was setted "yes"(automatically relax the star)
Then ./phantomsetup star.setup,after which errors would be like:

Warning: velocity dependant external forces are not compatible with FSI switch back to Leapfrog...

  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  rho* =  1.020416053353146E-017
  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  rho* =  2.676951485110767E-018
  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
  rho* =  6.133337656316539E-018
  en   =  0.000000000000000E+000
  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000

  pmom =  0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
 FATAL ERROR! cons2prim: could not solve rootfinding on particle 4168
  rho* =  9.885388488646193E-018
  en   =  0.000000000000000E+000

 FATAL ERROR! cons2prim: could not solve rootfinding on particle 12502

These errors appeared both on v2023 and v2024(the newest one at 20240503) ,but got normal on version v2022.
So I wonder if I did something wrong or something else..

Update:If compile with SETUP=star and GR=yes(also for :make setup GR=yes),errors are the same.
But OK with SETUP=grtde(but also not ok when "relax=T".Details can be seen from #465 ).

This issue may be a similar problem with #465 .

Thanks for reporting. I found one of the issues here, MAXP was hardwired in the grstar setup, whereas it should be a runtime parameter. In phantomsetup you can override the memory allocation using

./phantomsetup --maxp=1e6

Therefore MAXP should no longer be specified in build/Makefile_setups, which was the case for the grstar and other star setup blocks

The other issue about failure with the relaxation with GR I think is the same as #465

I tracked #465 down, it was broken in 09e337c . The solution is to uncomment the relevant line in derivs.F90, as outlined by @tajjankovic