lwang-astro / PeTar

PeTar is a high-performance N-body code for modelling the evolution of star clusters and tidal streams, including the effect of galactic potential, dynamics of binary and hierarchical system, single and binary stellar evolution.
MIT License
71 stars 19 forks source link

mpi external potential configuration #43

Closed HerculeWu closed 1 year ago

HerculeWu commented 1 year ago

Dear Long Wang, I try to use a configuration file for galpy, but when I run with mpiexec -n 2, I always get the error massage:

-----  Finish parameter initialization -----
petar: ./galpy-interface/galpy_interface.h:1543: void GalpyManager::calcMovePotAccFromPot(double, const double*): Assertion `pot_sets.size()==pot_set_pars.size()' failed.
Galpy parameters, time: 0 Next update time: 0.6
Potential set 1 Mode: 0 GM: 0 Pos: 0 0 0 Vel: 0 0 0 Acc: 0 0 0
Potential type indice: 15 5 9 
Potential arguments: 251.63858935563 1.8 1900 306770418.38589 3000 280 1965095308.1922 16000 
Change argument [index mode rate]:
Potential set 2 Mode: 1 GM: 17.993239918378 Pos: 0 0 0 Vel: 0 0 0 Acc: 0 0 0
Potential type indice: 17 
Potential arguments: 17.993239918378 0.20584 
Change argument [index mode rate]:
[dynamix3:26920] *** Process received signal ***
[dynamix3:26920] Signal: Aborted (6)
[dynamix3:26920] Signal code:  (-6)
[dynamix3:26920] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12980)[0x7f0cc66f7980]
[dynamix3:26920] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f0cc6332e87]
[dynamix3:26920] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f0cc63347f1]
[dynamix3:26920] [ 3] /lib/x86_64-linux-gnu/libc.so.6(+0x303fa)[0x7f0cc63243fa]
[dynamix3:26920] [ 4] /lib/x86_64-linux-gnu/libc.so.6(+0x30472)[0x7f0cc6324472]
[dynamix3:26920] [ 5] petar(+0xe722a)[0x5641c727f22a]
[dynamix3:26920] [ 6] petar(+0x143552)[0x5641c72db552]
[dynamix3:26920] [ 7] petar(+0xfc70)[0x5641c71a7c70]
[dynamix3:26920] [ 8] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f0cc6315c87]
[dynamix3:26920] [ 9] petar(+0x1026a)[0x5641c71a826a]
[dynamix3:26920] *** End of error message ***

Without mpi, this will not happen and everything is OK. Below is the summary of my configuration for building:

configure: --Features:
configure:      Version:           1203_293
configure:      FDPS Version:      7.0
configure:      Using MPI:         yes
configure:      Using GPU:         no
configure:      Using arch:        x86
configure:      Using OpenMP:      yes
configure:      Debug mode:        no
configure:      Step mode:         kdk
configure:      interrupt mode:    bse
configure:      external mode:     galpy
configure:      Galpy version:     1.9.1.dev0
configure:      tidal tensor mode: 3rd
configure:      orbit mode:        pm
configure:      Using quad:        yes
configure: --Compilers:
configure:      C++ compiler:      mpic++
configure:      C compiler:        gcc
configure:      Fortran compiler:  gfortran

cheers, Wenjie Wu

lwang-astro commented 1 year ago

Thank you sharing this information. I have checked the code and found that this is a bug. Now I have fixed it in the new commit in Master branch. You can pull the update to fix the issue.