Coder Social home page Coder Social logo

zachetienne / nrpytutorial Goto Github PK

View Code? Open in Web Editor NEW
88.0 15.0 38.0 79.02 MB

NRPy+, BlackHoles@Home, SENRv2, and the NRPy+ Jupyter Tutorial: Python-Based Code Generation for Numerical Relativity... and Beyond!

Home Page: https://blackholesathome.net

License: BSD 2-Clause "Simplified" License

Python 23.83% Jupyter Notebook 74.83% Shell 0.08% C 1.04% TeX 0.07% Makefile 0.01% Jinja 0.14%
automatic code generation bssn hyperbolic pdes python sympy numerical relativity

nrpytutorial's People

Contributors

assumpcaothiago avatar deepsourcebot avatar eschnett avatar gmblackjack avatar karinnes avatar kennethsible avatar leowerneck avatar lgtm-migrator avatar mbabiuc avatar penelson16 avatar philchang avatar rhaas80 avatar samuelcupp avatar stevenrbrandt avatar terrencepierrej avatar tyndalestutz avatar zachetienne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nrpytutorial's Issues

One error happens when using cmdline_helper.

Code:

import cmdline_helper as cmd
cmd.new_C_compile(Ccodesrootdir, os.path.join("output", "BrillLindquist_Playground"),
                  uses_free_parameters_h=True, compiler_opt_option="fast") # fastdebug or debug also supported

# Change to output directory
os.chdir(os.path.join(Ccodesrootdir, "output"))
# Clean up existing output files
cmd.delete_existing_files("out*.txt")
cmd.delete_existing_files("out*.png")
# Run executable with CFL_FACTOR = 1.0, which is allowed since
#   simulation is axisymmetric and all phi derivs are set to zero.
# cmd.Execute("BrillLindquist_Playground", "72 12 2 "+str(CFL_FACTOR))
# cmd.Execute("BrillLindquist_Playground", "800 16 2 "+str(CFL_FACTOR))
cmd.Execute("BrillLindquist_Playground", str(Nr) + " " + str(Nth) + " " + str(Nph) + " " + str(CFL_FACTOR))
os.chdir(os.path.join("..", ".."))

Then jupyter shows an error:

File D:\Anaconda3_2309\Lib\subprocess.py:1538, in Popen._execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_gid, unused_gids, unused_uid, unused_umask, unused_start_new_session, unused_process_group)
   1536 # Start the process
   1537 try:
-> 1538     hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
   1539                              # no special security
   1540                              None, None,
   1541                              int(not close_fds),
   1542                              creationflags,
   1543                              env,
   1544                              cwd,
   1545                              startupinfo)
   1546 finally:
   1547     # Child is launched. Close the parent's copy of those pipe
   1548     # handles that only the child should have open.  You need
   (...)
   1551     # pipe will not close when the child process exits and the
   1552     # ReadFile will hang.
   1553     self._close_pipe_fds(p2cread, p2cwrite,
   1554                          c2pread, c2pwrite,
   1555                          errread, errwrite)

OSError: [WinError 193] %1 不是有效的 Win32 应用程序。

OMP pragmas for higher core counts

Good evening all,

I encountered a possible issue with the OpenMP parallelization of NRPy+/SENR.
I am outputting C code for the BSSN RHSs in the way that it's done in the "Colliding black holes" tutorial. Currently, the OMP parallelization only happens in the exterior loop, over i2. The problem with this is that, in spherical- or cylindrical-like coordinates, this will be the azimuthal direction which, from my experience, does not require that many points (I typically use 16 for what I'm doing) to accurately sample the physical space. Therefore, if one tries to use more threads than the number of points in direction 2, there is no performance gain.

I tried circumventing this issue by using a custom OMP pragma, in the form "#pragma omp parallel for collapse(3)", but if rfm_precompute is enabled, there are lines of code inserted between the nested loops which result in errors, because with the collapse clause only works if the loops are perfectly nested.

Is there a good way of doing this in NRPy+ implemented right now?

Thank you :)

Feature request: number of orbits and time to merger in NRPyPN

I use NRPyPN to set up my binary black hole simulations. It would be very useful for me to have an estimate of the time to merger given some initial data. This is so that I can have a sense of how long the simulations is going to be, and to set up horizon finders more precisely. Additionally, sometimes I want to run simulations for N orbit and I don't care about the initial separation. It would be lovely if NRPyPN could tell me the initial separation given the number of orbits that I want to simulate.

Tutorial notebook fails at installing ffmpeg.

It runs "!cp ffmpeg-static-amd64-johnvansickle/ffmpeg ~/.local/bin/" , but when i manually extract ffmpeg-static-amd64-johnvansickle.tar.xz ffmpeg-5.0.1-amd64-static directory gets extracted.

Atmosphere improperly set with rhostar fix in IllinoisGRMHD (typo)

I think that there's a minor copy&paste error at line 853 of the file IllinoisGRMHD/doc/Tutorial-IllinoisGRMHD__the_conservative_to_primitive_algorithm.ipynb.

Extract of the current file (lines 852-853):

"          CCTK_REAL K_ppoly_tab     = eos.K_ppoly_tab[polytropic_index];\n",
"          CCTK_REAL Gamma_ppoly_tab = eos.K_ppoly_tab[polytropic_index];\n",

Shouldn't it be

"          CCTK_REAL K_ppoly_tab     = eos.K_ppoly_tab[polytropic_index];\n",
"          CCTK_REAL Gamma_ppoly_tab = eos.Gamma_ppoly_tab[polytropic_index];\n",

?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.