Skip to content

GRHayL/GRHayL

Repository files navigation

GRHayL


Ubuntu-gcc Ubuntu-intel Ubuntu-clang MacOS-gcc MacOS-clang

The General Relativistic Hydrodynamic Library (GRHayL) is an infrastructure-agnostic magnetohydrodynamics code library designed for modular development of GRMHD code. The library is divided into independent modules, or "gems", which provide various features needed for GRMHD simulations.

The core GRHayL "chalice" provides core connective tissue in the form of C structs and very simple functions that act only on these structs. Adding onto GRHayL_Core are several gems which provide specific features. These currently include Atmosphere, Con2Prim, EOS, Flux_Source, Induction, Neutrinos, and Reconstruction. Each gem implements infrastructure-agnostic functions for computing quantities for GRMHD simulations.

More information about the details of the library functions are provided in the online wiki.

Building and Installing GRHayL

GRHayL includes a configure script which sets up a Makefile. For a full list of options, use the -h option for a list of all compilation flags.

Dependencies

GRHayL contains an optional HDF5 dependency, and the default configuration builds with HDF5 active. To compile without HDF5 use the --nohdf5 flag. To compile HDF5 on your local machine use the command

$ sudo apt-get install libhdf5-serial-dev

GRHayL is also actively tested on MacOS using the Homebrew package manager. To install HDF5 on MacOS we recommend using

$ brew install hdf5

We have not tested GRHayL with macports, although we do not expect users to have issues when using it.

The HDF5 dependency arises from the tabulated Equation of State (EOS) gem, as it currently only supports EOS tables in that format. We are also working supporting tables in the CompOSE format, which would allow for use of the tabulated EOS without HDF5.

System-wide Installation (default)

As an example, suppose you wish to install GRHayL on your system using gcc. To do so, run the following commands:

$ CC=gcc ./configure
$ make
$ make install

Local Installation

As an example, a local installation that uses the next-generation intel compilers is achieved as follows:

$ CC=icx ./configure --prefix=<local_path>
$ make
$ make install

CI Testing

GRHayL uses Github Actions to perform continuous integration (CI) testing for validating the code. The Unit_Tests directory contains the unit tests which are used for the CI. The subdirectory "data_gen" contains the functions for generating the test data. The actual test data is kept in the Test_Data repository. Tests with "ET_Legacy" in the name only generate input data, as the output is generated from the GRHayLTestPatch branch of IllinoisGRMHD in the Einstein Toolkit for validation with the old code. All the tests function by generating output data and perturbed output data. The perturbed data is generated by perturbing the input data by

perturbed input = input X (1 + 1e-14).

This output serves as error bars for the functions, and the tests validate that the computed output falls within this range.

Implementations

Most codes will simply link to the compiled library. However, some infrastructures (such as the Einstein Toolkit) interface with the library more easily by directly compiling the code. The implementations directory contains specific implementations of GRHayL in infrastructures that prefer this method of interfacing with GRHayL.

About

GRHayL: an infrastructure-agnostic library for GRMHD.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •