Skip to main content

GPU/CPU Galactic Binary Waveforms

Project description

gbgpu: GPU/CPU Galactic Binary Waveforms

GBGPU is a GPU-accelerated version of the FastGB waveform which has been developed by Neil Cornish, Tyson Littenberg, Travis Robson, and Stas Babak. It computes gravitational waveforms for Galactic binary systems observable by LISA using a fast/slow-type decomposition. For more details on the original construction of FastGB see arXiv:0704.1808.

The current version of the code is very closely related to the implementation of FastGB in the LISA Data Challenges' Python code package. The waveform code is entirely Python-based. It is about 1/2 the speed of the full C version, but much simpler in Python for right now. There are also many additional functions including fast likelihood computations for individual Galactic binaries, as well as fast C-based methods to combine waveforms into global fitting templates.

The code is CPU/GPU agnostic. CUDA and NVIDIA GPUs are required to run these codes for GPUs.

See the documentation for more details. This code was designed for arXiv:2205.03461. If you use any part of this code, please cite arXiv:2205.03461, its Zenodo page, arXiv:0704.1808, and arXiv:1806.00500.

Getting Started

  1. Run pip install. This works only for CPU currently. For GPU, see below for installing from source.
pip install gbgpu
  1. To import gbgpu:
from gbgpu.gbgpu import GBGPU

Prerequisites

To install this software for CPU usage, you need Python >3.4, and NumPy. We generally recommend installing everything, including gcc and g++ compilers, in the conda environment as is shown in the examples here. This generally helps avoid compilation and linking issues. If you use your own chosen compiler, you may need to add information to the setup.py file.

To install this software for use with NVIDIA GPUs (compute capability >5.0), you need the CUDA toolkit and CuPy. The CUDA toolkit must have cuda version >8.0. Be sure to properly install CuPy within the correct CUDA toolkit version. Make sure the nvcc binary is on $PATH or set it as the CUDAHOME environment variable.

Installing

To pip install (only for CPU currently):

pip install gbgpu

To install from source:

  1. Install Anaconda if you do not have it.

  2. Create a virtual environment. Note: There is no available conda compiler for Windows. If you want to install for Windows, you will probably need to add libraries and include paths to the setup.py file.

conda create -n gbgpu_env -c conda-forge gcc_linux-64 gxx_linux-64 gsl numpy Cython scipy jupyter ipython h5py matplotlib python=3.12 cmake
conda activate gbgpu_env
If on MACOSX, substitute `gcc_linux-64` and `gxx_linus-64` with `clang_osx-64` and `clangxx_osx-64`.
  1. If using GPUs, use pip to install cupy. If you have cuda version 9.2, for example:
pip install cupy-cuda92
  1. Clone the repository.
git clone https://github.com/mikekatz04/GBGPU.git
cd GBGPU
  1. Run install. Make sure CUDA is on your PATH.
pip install -v -e .

Running the Tests

Change to the testing directory:

cd gbgpu/tests

Run in the terminal:

python -m unittest discover

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Current Version: 1.2.2

Authors

  • Michael Katz
  • Travis Robson
  • Neil Cornish
  • Tyson Littenberg
  • Stas Babak

Contributors

  • Mathieu Dubois
  • Maxime Pigou

License

This project is licensed under the Apache License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gbgpu_cuda12x-1.2.4-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (121.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

gbgpu_cuda12x-1.2.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (121.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

gbgpu_cuda12x-1.2.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (121.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

gbgpu_cuda12x-1.2.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (120.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

gbgpu_cuda12x-1.2.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (120.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

File details

Details for the file gbgpu_cuda12x-1.2.4-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gbgpu_cuda12x-1.2.4-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 84e2aa13016dc9170a8c9b9b90044365284628100d82af0b7d2e1b100c34599a
MD5 8b0c1a3e48d06ff6932e316d6b48d253
BLAKE2b-256 b79ba56b55199e0af5bbe191d004c76924b9356724c1be5c8f6f685dba6a5e4c

See more details on using hashes here.

File details

Details for the file gbgpu_cuda12x-1.2.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gbgpu_cuda12x-1.2.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 00fb2581d161ce48706b87350651d7d6d0ceecdd86407a29988256db25ff7d68
MD5 031a85a459a823312a259753e78fab1c
BLAKE2b-256 3b95159535f28fa13e7925c1d9c914f30ba2623000f3b7a240d7d5b638005eca

See more details on using hashes here.

File details

Details for the file gbgpu_cuda12x-1.2.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gbgpu_cuda12x-1.2.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b15ea9014f61e369d71b6683da8a8adcf74c6f66bd7174bf594d17e51adb70b4
MD5 5219d14623abc33cafc151074b45aaec
BLAKE2b-256 a3a0f7a6dbabb48eafd54ee1a7c303ea854982f556a43f6957c9dca5fd00f017

See more details on using hashes here.

File details

Details for the file gbgpu_cuda12x-1.2.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gbgpu_cuda12x-1.2.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5ead9c528417ef564c37feb60961f2a6f0c6b47ee1cb0be9a6cf3b2a998af40c
MD5 aea2bae4758cc4937b8b653cf3d4e3b9
BLAKE2b-256 1dc32841612c891845cd6f5435b37c2446203b43e3918a719b33bd297d3efb7d

See more details on using hashes here.

File details

Details for the file gbgpu_cuda12x-1.2.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gbgpu_cuda12x-1.2.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9751455b42900130b52da5708740c588776a86519aad9141fc6c73cef6f50311
MD5 9bfb32e2db420f778910df970fbe10f2
BLAKE2b-256 db1db3340dc2c668ac6d1e64351d73cf3be44613e887118e80c0fd8f663e73fd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page