Is there any way to speed up the search process?

Suggestions for improvements, new features, etc.
cdd
Posts: 22
Joined: Thu Jul 02, 2015 7:44 am

Is there any way to speed up the search process?

Post by cdd » Sun Feb 23, 2020 9:36 am

Hi,

When i use GYRE to search the oscillation frequency, i find that when the search dimensionless frequency interval lies in a very low region, the search time is too long. For example, when i search with below parameters:

freq_min = 4.8e-7
freq_max = 4.81e-7
freq_min_units = 'NONE'
freq_max_units = 'NONE'
n_freq = 100

the Root bracketing step takes 6820.778 s and the Root Solving step also takes a lot of time, even if they finally do not find any suitable frequency.

So i want to ask whether there are any way to speed up the searching and solving process, since i want to search the dimensionless frequency interval between 0.4809E-06 and 0.1443E-05, that will need too much time.

Is there a way?

Best Regards
Chen

User avatar
rhtownsend
Site Admin
Posts: 397
Joined: Sun Mar 31, 2013 4:22 pm

Re: Is there any way to speed up the search process?

Post by rhtownsend » Sun Feb 23, 2020 10:44 am

Hi Chen --

I imagine your calculations are taking a lot of time because low frequencies require a large number of grid points, in order to properly resolve the spatial oscillation of the modes. Out of interest, how many grid points is GYRE using in your calculations? And more generally, what science question are you trying to answer?

cheers,

Rich

cdd
Posts: 22
Joined: Thu Jul 02, 2015 7:44 am

Re: Is there any way to speed up the search process?

Post by cdd » Sun Feb 23, 2020 10:07 pm

Hi Rich,

Below is the screen output of this running related to the grid:

gyre [5.2]
----------
Compiler : GCC version 8.3.0
Compiler options : -I /usr/include/x86_64-linux-gnu -I /home/ubuntu64/software/mesasdk/include -mtune=generic -march=x86-64 -ggdb -Wall -Wno-unused-dummy-argument -Wno-maybe-uninitialized -std=f2008 -ffpe-summary=none -finit-real=snan -fbacktrace -fmax-errors=25 -ffpe-trap=invalid,overflow,zero -fcheck=all -finline-limit=0 -fopenmp
OpenMP Threads : 2
Input filename : test.in

Model Init
----------

Reading from MESA file
File name ns9ro0.GYRE
File version 1.01
Read 894 points
No need to add central point

Mode Search
-----------

Mode parameters
l : 2
m : 0

Building frequency scan
added scan interval : 0.4800E-06 -> 0.4810E-06 (100 points, LINEAR)

Building x grid
Found inner turning points, x range 0.0000 -> 0.0000
Adding 581503 inner point(s)
Adding 1009461 global point(s) in iteration 1
Adding 1022 global point(s) in iteration 2
Adding 0 global point(s) in iteration 3
Final grid has 1 segment(s) and 1592880 point(s):
Segment 1 : x range 0.0000 -> 1.0000 (1 -> 1592880)

Starting search (adiabatic)...............

The science question is that what kind of frequency a neutron star with thick atomsphere around it (envelope) can pulsate. The neutron star has a white dwarf as the donor company. I want to search the frequency around the orbital period (which is very short around several hundred seconds, about 1000-3000uHz). Since the neutron star radius is small, the scaled dimensionless frequency is low. And after the running, i find the calculating time is long. So I want to know whether such frequency searching algorithm can be optimized to speed up ?

Best Regards
Chen

User avatar
rhtownsend
Site Admin
Posts: 397
Joined: Sun Mar 31, 2013 4:22 pm

Re: Is there any way to speed up the search process?

Post by rhtownsend » Mon Feb 24, 2020 11:15 am

Hi Chen --

Given that GYRE is using around 1.5 million points, it seems its trying to resolve modes with radial orders of a few hundred thousand. It should be able to find these modes; not sure why it isn't. Can you post your stellar model and inlist files?

cheers,

Rich

cdd
Posts: 22
Joined: Thu Jul 02, 2015 7:44 am

Re: Is there any way to speed up the search process?

Post by cdd » Tue Feb 25, 2020 10:05 pm

Hi Rich,

Attached files are the inlist, model and screen output files. The models i use is modified from mesa test_suite neutron_star_envelope. Among them ns9.* and ns10.* are the results of the last two steps. Model ns9.* is from an empty neutron core and ns10.* accrectes material for about 50 steps.So the radius of these two models are both small. Model ns9 will need more grids than ns10 in gyre, so i do not run it today and only run ns10 with a small frequency interval(0.4810E-06 -> 0.4820E-06) to produce the screen output(in ns10output.log file). The output in the last post is the result of model ns9, you can see the grid are much more than ns10. Running model ns10 is still need many hours. And from the output file, it seems all modes have problems converging.
So whether there is a way to optimize the search procedure to shorten the time?

Hope to find a way.
Chen
Attachments
test.in
inlist
(1010 Bytes) Downloaded 263 times
ns10output.log
screen output
(11.63 KiB) Downloaded 273 times
ns10.txt
result of model ns10
(30.41 KiB) Downloaded 281 times
ns10.GYRE
model of ns10
(850.81 KiB) Downloaded 283 times
ns9.GYRE
model of ns9
(430.5 KiB) Downloaded 281 times

User avatar
rhtownsend
Site Admin
Posts: 397
Joined: Sun Mar 31, 2013 4:22 pm

Re: Is there any way to speed up the search process?

Post by rhtownsend » Wed Feb 26, 2020 11:02 am

Hi Chen --

Thanks for the info. I think you can get a modest speedup by changing the diff_scheme parameter to 'COLLOC_GL2'. But more generally, I don't think GYRE will give you particularly accurate/meaningful answers for your neutron star models, for a number of reasons:
  • you are searching for modes with ~ 100,000 nodes in the radial eigenfunctions. Such modes will be incredibly strongly damped by radiative dissipation, and therefore seem very unlikely to be observable
  • for such high-order modes, the eigenfrequencies and eigenfunctions are extremely sensitive to how well your input model respects hydrostatic equilibrium and mass conservation. I expect that the uncertainties introduced by departures from HSE and mass conservation will render any results produced by GYRE unreliable.
  • GYRE neglects any general relativistic corrections, which I believe are non-negligible in NS
So, to summarize: I don't think GYRE is the right tool for your job. If you're interested in tidal forcing, then you would be better off looking for equilibrium tide solutions than using GYRE to obtain adiabatic eigenfunctions. But I remain concerned about the GR corrections.

cheers,

Rich

cdd
Posts: 22
Joined: Thu Jul 02, 2015 7:44 am

Re: Is there any way to speed up the search process?

Post by cdd » Thu Feb 27, 2020 9:13 am

Hi Rich,

Thank you for your reply and the explanation. Yes, i think model ns9 and ns10 are only radiative shells and should have problem to calculate the frequencies. I just curious why the calculation of these models are so slow. As a comparison, i make a he write dwarf with mesa and calculate the frequency and find the procedure so fast, only 5 more seconds, with the same frequency interval. Maybe because the wd model is more convective than the radiative ns model ? Then if the result frequency do not exist, is there any way to know this in advance ?
And with the equilibrium tide solutions you mention, i notice the package of gyre-tasc5 and the source code contain tide directory. So i want to ask whether i can use these codes to calcuate the tide effects on a wd or a ns with a very thick atompsphere (if i let the ns accrect material to get a convective envelope) ? GR is another problem, now i can only compare the result to the observation to see whether there are so much difference and then consider whether i need GR correction. Do you have any suggestion on the GR correction?

Best Wishes
Chen

User avatar
rhtownsend
Site Admin
Posts: 397
Joined: Sun Mar 31, 2013 4:22 pm

Re: Is there any way to speed up the search process?

Post by rhtownsend » Thu Feb 27, 2020 9:30 pm

cdd wrote:
Thu Feb 27, 2020 9:13 am
Hi Rich,

Thank you for your reply and the explanation. Yes, i think model ns9 and ns10 are only radiative shells and should have problem to calculate the frequencies. I just curious why the calculation of these models are so slow. As a comparison, i make a he write dwarf with mesa and calculate the frequency and find the procedure so fast, only 5 more seconds, with the same frequency interval. Maybe because the wd model is more convective than the radiative ns model ? Then if the result frequency do not exist, is there any way to know this in advance ?
The time difference between your WD and NS calculations likely comes down to the number of grid points used; for the NS calculations using the inlist you posted, GYRE needs around 1.5 million grid points to resolve g modes with radial orders 100,000. Put simply: if you really want to model modes with such large radial orders, then you are going to need lots of grid points, and the computation will be expensive.

You can predict ahead of time when GYRE won't find any g modes: if the pulsations are radial, and/or if the star is fully convective. Otherwise, you will always have g modes.
And with the equilibrium tide solutions you mention, i notice the package of gyre-tasc5 and the source code contain tide directory. So i want to ask whether i can use these codes to calcuate the tide effects on a wd or a ns with a very thick atompsphere (if i let the ns accrect material to get a convective envelope) ? GR is another problem, now i can only compare the result to the observation to see whether there are so much difference and then consider whether i need GR correction. Do you have any suggestion on the GR correction?

Best Wishes
Chen
In principle the tidal forcing code can be used to model WD or NS models. Right now we're testing the code against other published results; we plan to put out the full release this coming summer. I can't give you any suggestions about GR corrections, as that's not my area of expertise. Out of interest, what sort of orbital periods are you thinking about?

User avatar
warrick
Posts: 84
Joined: Wed Aug 28, 2013 2:47 am

Re: Is there any way to speed up the search process?

Post by warrick » Fri Feb 28, 2020 4:53 am

Rich has already explained why the calculation is inescapably slow but I'm curious about your models. Specifically, I'd say they don't actually include the structure of the neutron star. e.g. in ns10.GYRE, there's a point at the centre and then the remaining structure starts from 10⁶ cm (= 10 km). This probably differs from calculations involving a white dwarf, for which MESA can presumably include the white dwarf's actual structure.

cdd
Posts: 22
Joined: Thu Jul 02, 2015 7:44 am

Re: Is there any way to speed up the search process?

Post by cdd » Fri Feb 28, 2020 8:18 am

Hi Rich and Warrick,

Thank you for your reply. Since MESA only model ns envelope, so my models only contain the outer most part of the star. Is that another reason for the slow calculation ? And if i let the model accrete and accrete... many material, to form a very thick and convective atomsphere, then maybe GYRE can calculate out any pulsating mode ?
Now i want to make models to the ultracompact binary, which has a extreme short orbital period, around tens of minutes. I think the tidal effect should be strong to these UCXBs, so i want to use GYRE or gyre-tasc5 to calculate the effect to both ns and wd component.
If you have any new release to calculate the binaries, i hope i can be the first user.

Best Wishes
Chen

Post Reply