JuliaAstroSim / AstroNbodySim.jl

Unitful and differentiable gravitational N-body simulation code in Julia
GNU General Public License v3.0
32 stars 0 forks source link

Building examples 04-collision #10

Closed glanzkaiser closed 2 years ago

glanzkaiser commented 2 years ago

I want to ask, whether the build is successful or not, I do not know how to view it, I double click one of the file it just showing some GUIs that I do not comprehend.

It become 100%, but then there is Error warning. I have to wait almost 2 days.

Capture d’écran_2022-07-22_20-07-52 Capture d’écran_2022-07-22_20-07-37 Capture d’écran_2022-07-22_20-08-12

islent commented 2 years ago

The error came from Makie, can you find your version of GLMakie?

whether the build is successful or not

The simulation job of AstroNbodySim has been finished (snapshots are successfully generated).

I do not know how to view it, I double click one of the file it just showing some GUIs that I do not comprehend.

Next step is visualization by AstroPlot. Snapshot files is in Gadget2 (binary) format by default. You can copy and paste lines below run(gpu) to skip to visualization procedures.

It seems that you are not familiar with astrophysical scientific computing. I suggest https://wwwmpa.mpa-garching.mpg.de/gadget/ and papers therein.

I have to wait almost 2 days

It takes less than one hour on a RTX4000 GPU.

image
islent commented 2 years ago

Cannot reproduce your problem. Maybe there is incompatibility in the version of Makie you are using.

image image
glanzkaiser commented 2 years ago

Your GPU is one high-end no wonder it can compile very fast.

My Makie version( I add Makie just now, it seems it hasn't been added before on this environment): Capture d’écran_2022-07-23_20-45-19

Next step is visualization by AstroPlot. Snapshot files is in Gadget2 (binary) format by default. You can copy and paste lines below run(gpu) to skip to visualization procedures.

I try the code below `run(gpu):

plot_positionslice(gpu.config.output.dir, "snapshot_", collect(0:100), ".gadget2", gadget2(),
    dpi = 300, resolution =(400,400),
    xlims = (-200.0, +200.0), ylims = (-200.0, +200.0),
    times = collect(0.0:0.03:3.0) * u"Gyr",
    collection = DISK,
    markersize = 2.0,
    )

It produces an error (tried with cpu.config.output.dir too and still can't work. Capture d’écran_2022-07-23_20-36-20

It seems that you are not familiar with astrophysical scientific computing. I suggest https://wwwmpa.mpa-garching.mpg.de/gadget/ and papers therein.

Yes, I am not familiar. Alright then I will see and read.

islent commented 2 years ago

It produces an error (tried with cpu.config.output.dir too and still can't work.

That should not blame AstroNbodySim. The error of @u_str not defined is telling you that u" string is not defined in your current work space. To solve it, you have to import Unitful package:

using Unitful, UnitfulAstro
using Distributed
using PhysicalParticles
using AstroIC, AstroIO
using AstroNbodySim
using AstroPlot
using GLMakie
using FFMPEG
using Printf
glanzkaiser commented 2 years ago

After another 3 days to recompile example 4 I finally get the pngs.

Wow, great.. I will try another example and read the website that you told me.

Thanks a lot.

Capture d’écran_2022-07-27_03-20-16

Capture d’écran_2022-07-27_03-18-08