fastlisaresponse 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fastlisaresponse might be problematic. Click here for more details.
- fastlisaresponse-1.0.2/MANIFEST.in +30 -0
- fastlisaresponse-1.0.2/PKG-INFO +136 -0
- fastlisaresponse-1.0.2/README.md +120 -0
- fastlisaresponse-1.0.2/fastlisaresponse/__init__.py +1 -0
- fastlisaresponse-1.0.2/fastlisaresponse/_version.py +1 -0
- fastlisaresponse-1.0.2/fastlisaresponse/cutils/__init__.py +0 -0
- fastlisaresponse-1.0.2/fastlisaresponse/pointer_adjust.py +33 -0
- fastlisaresponse-1.0.2/fastlisaresponse/response.py +796 -0
- fastlisaresponse-1.0.2/fastlisaresponse/utils/__init__.py +1 -0
- fastlisaresponse-1.0.2/fastlisaresponse/utils/utility.py +81 -0
- fastlisaresponse-1.0.2/fastlisaresponse.egg-info/PKG-INFO +136 -0
- fastlisaresponse-1.0.2/fastlisaresponse.egg-info/SOURCES.txt +26 -0
- fastlisaresponse-1.0.2/fastlisaresponse.egg-info/dependency_links.txt +1 -0
- fastlisaresponse-1.0.2/fastlisaresponse.egg-info/not-zip-safe +1 -0
- fastlisaresponse-1.0.2/fastlisaresponse.egg-info/top_level.txt +2 -0
- fastlisaresponse-1.0.2/include/Detector.hpp +75 -0
- fastlisaresponse-1.0.2/include/LISAResponse.hh +22 -0
- fastlisaresponse-1.0.2/include/cuda_complex.hpp +1305 -0
- fastlisaresponse-1.0.2/pyproject.toml +25 -0
- fastlisaresponse-1.0.2/scripts/prebuild.py +51 -0
- fastlisaresponse-1.0.2/setup.cfg +4 -0
- fastlisaresponse-1.0.2/setup.py +246 -0
- fastlisaresponse-1.0.2/src/Detector.cpp +155 -0
- fastlisaresponse-1.0.2/src/LISAResponse.cpp +905 -0
- fastlisaresponse-1.0.2/src/pycppdetector.cpp +15496 -0
- fastlisaresponse-1.0.2/src/pycppdetector.pyx +183 -0
- fastlisaresponse-1.0.2/src/responselisa_cpu.cpp +11068 -0
- fastlisaresponse-1.0.2/src/responselisa_cpu.pyx +65 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Include the README
|
|
2
|
+
include README
|
|
3
|
+
|
|
4
|
+
# Include the license file
|
|
5
|
+
include LICENCE
|
|
6
|
+
include THIRD.txt
|
|
7
|
+
|
|
8
|
+
# Include dependencies
|
|
9
|
+
include requirements*.txt
|
|
10
|
+
|
|
11
|
+
# Include makefile
|
|
12
|
+
include Makefile
|
|
13
|
+
|
|
14
|
+
# Include docs
|
|
15
|
+
recursive-include docs
|
|
16
|
+
|
|
17
|
+
# Include Changelog
|
|
18
|
+
include CHANGELOG
|
|
19
|
+
|
|
20
|
+
# Include tests
|
|
21
|
+
recursive-include tests/testsuites *
|
|
22
|
+
|
|
23
|
+
# Include scripts
|
|
24
|
+
recursive-include scripts *
|
|
25
|
+
|
|
26
|
+
# Include tuto
|
|
27
|
+
include tutorial/*.ipynb
|
|
28
|
+
|
|
29
|
+
# Include include files
|
|
30
|
+
include include/*
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: fastlisaresponse
|
|
3
|
+
Version: 1.0.2
|
|
4
|
+
Home-page: https://github.com/mikekatz04/lisa-on-gpu
|
|
5
|
+
Author: Michael Katz
|
|
6
|
+
Author-email: mikekatz04@gmail.com
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
|
|
9
|
+
Classifier: Environment :: GPU :: NVIDIA CUDA
|
|
10
|
+
Classifier: Natural Language :: English
|
|
11
|
+
Classifier: Programming Language :: C++
|
|
12
|
+
Classifier: Programming Language :: Cython
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
14
|
+
Requires-Python: >=3.6
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# fastlisaresponse: Generic LISA response function for GPUs
|
|
18
|
+
|
|
19
|
+
This code base provides a GPU-accelerated version of the generic time-domain LISA response function. The GPU-acceleration allows this code to be used directly in Parameter Estimation.
|
|
20
|
+
|
|
21
|
+
Please see the [documentation](https://mikekatz04.github.io/lisa-on-gpu/) for further information on these modules. The code can be found on Github [here](https://github.com/mikekatz04/lisa-on-gpu). It can be found on # TODO fix [Zenodo](https://zenodo.org/record/3981654#.XzS_KRNKjlw).
|
|
22
|
+
|
|
23
|
+
If you use all or any parts of this code, please cite (TODO: fill in ). See the [documentation](https://mikekatz04.github.io/lisa-on-gpu/) to properly cite specific modules.
|
|
24
|
+
|
|
25
|
+
## Getting Started
|
|
26
|
+
|
|
27
|
+
Below is a quick set of instructions to get you started with `fastlisaresponse`.
|
|
28
|
+
|
|
29
|
+
0) [Install Anaconda](https://docs.anaconda.com/anaconda/install/) if you do not have it.
|
|
30
|
+
|
|
31
|
+
1) 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.
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
conda create -n lisa_env -c conda-forge gcc_linux-64 gxx_linux-64 numpy Cython scipy jupyter ipython h5py matplotlib python=3.9
|
|
35
|
+
conda activate lisa_env
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
If on MACOSX, substitute `gcc_linux-64` and `gxx_linus-64` with `clang_osx-64` and `clangxx_osx-64`.
|
|
39
|
+
|
|
40
|
+
2) Clone the repository.
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
git clone https://github.com/mikekatz04/lisa-on-gpu.git
|
|
44
|
+
cd lisa-on-gpu
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
3) Run install.
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
python setup.py install
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
4) To import fastlisaresponse:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
from fastlisaresponse import ResponseWrapper
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
See [examples notebook](https://github.com/mikekatz04/lisa-on-gpu/blob/master/examples/fast_LISA_response_tutorial.ipynb).
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Prerequisites
|
|
63
|
+
|
|
64
|
+
To install this software for CPU usage, you need Python >3.4 and NumPy. To run the examples, you will also need jupyter and matplotlib. 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 will need to make sure all necessary information is passed to the setup command (see below). You also may need to add information to the `setup.py` file.
|
|
65
|
+
|
|
66
|
+
To install this software for use with NVIDIA GPUs (compute capability >2.0), you need the [CUDA toolkit](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html) and [CuPy](https://cupy.chainer.org/). 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.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Installing
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
0) [Install Anaconda](https://docs.anaconda.com/anaconda/install/) if you do not have it.
|
|
73
|
+
|
|
74
|
+
1) Create a virtual environment.
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
conda create -n lisa_env -c conda-forge gcc_linux-64 gxx_linux-64 numpy Cython scipy jupyter ipython h5py matplotlib python=3.9
|
|
78
|
+
conda activate few_env
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
If on MACOSX, substitute `gcc_linux-64` and `gxx_linus-64` with `clang_osx-64` and `clangxx_osx-64`.
|
|
82
|
+
|
|
83
|
+
If you want a faster install, you can install the python packages (numpy, Cython, scipy, tqdm, jupyter, ipython, h5py, requests, matplotlib) with pip.
|
|
84
|
+
|
|
85
|
+
2) Clone the repository.
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
git clone https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms.git
|
|
89
|
+
cd FastEMRIWaveforms
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
3) If using GPUs, use pip to [install cupy](https://docs-cupy.chainer.org/en/stable/install.html). If you have cuda version 9.2, for example:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
pip install cupy-cuda92
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
4) Run install. Make sure CUDA is on your PATH.
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
python setup.py install
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Running the Tests
|
|
105
|
+
|
|
106
|
+
Since the code package in minimal in size, the example notebook should be run to verify it is running correctly.
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
## Contributing
|
|
110
|
+
|
|
111
|
+
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
|
|
112
|
+
|
|
113
|
+
## Versioning
|
|
114
|
+
|
|
115
|
+
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/mikekatz04/lisa-on-gpu/tags).
|
|
116
|
+
|
|
117
|
+
Current Version: 1.0.2
|
|
118
|
+
|
|
119
|
+
## Authors
|
|
120
|
+
|
|
121
|
+
* **Michael Katz**
|
|
122
|
+
* Jean-Baptiste Bayle
|
|
123
|
+
* Alvin J. K. Chua
|
|
124
|
+
* Michele Vallisneri
|
|
125
|
+
|
|
126
|
+
### Contibutors
|
|
127
|
+
|
|
128
|
+
* Maybe you!
|
|
129
|
+
|
|
130
|
+
## License
|
|
131
|
+
|
|
132
|
+
This project is licensed under the GNU License - see the [LICENSE.md](LICENSE.md) file for details.
|
|
133
|
+
|
|
134
|
+
## Acknowledgments
|
|
135
|
+
|
|
136
|
+
* It was also supported in part through the computational resources and staff contributions provided for the Quest/Grail high performance computing facility at Northwestern University.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# fastlisaresponse: Generic LISA response function for GPUs
|
|
2
|
+
|
|
3
|
+
This code base provides a GPU-accelerated version of the generic time-domain LISA response function. The GPU-acceleration allows this code to be used directly in Parameter Estimation.
|
|
4
|
+
|
|
5
|
+
Please see the [documentation](https://mikekatz04.github.io/lisa-on-gpu/) for further information on these modules. The code can be found on Github [here](https://github.com/mikekatz04/lisa-on-gpu). It can be found on # TODO fix [Zenodo](https://zenodo.org/record/3981654#.XzS_KRNKjlw).
|
|
6
|
+
|
|
7
|
+
If you use all or any parts of this code, please cite (TODO: fill in ). See the [documentation](https://mikekatz04.github.io/lisa-on-gpu/) to properly cite specific modules.
|
|
8
|
+
|
|
9
|
+
## Getting Started
|
|
10
|
+
|
|
11
|
+
Below is a quick set of instructions to get you started with `fastlisaresponse`.
|
|
12
|
+
|
|
13
|
+
0) [Install Anaconda](https://docs.anaconda.com/anaconda/install/) if you do not have it.
|
|
14
|
+
|
|
15
|
+
1) 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.
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
conda create -n lisa_env -c conda-forge gcc_linux-64 gxx_linux-64 numpy Cython scipy jupyter ipython h5py matplotlib python=3.9
|
|
19
|
+
conda activate lisa_env
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
If on MACOSX, substitute `gcc_linux-64` and `gxx_linus-64` with `clang_osx-64` and `clangxx_osx-64`.
|
|
23
|
+
|
|
24
|
+
2) Clone the repository.
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
git clone https://github.com/mikekatz04/lisa-on-gpu.git
|
|
28
|
+
cd lisa-on-gpu
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
3) Run install.
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
python setup.py install
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
4) To import fastlisaresponse:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
from fastlisaresponse import ResponseWrapper
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
See [examples notebook](https://github.com/mikekatz04/lisa-on-gpu/blob/master/examples/fast_LISA_response_tutorial.ipynb).
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### Prerequisites
|
|
47
|
+
|
|
48
|
+
To install this software for CPU usage, you need Python >3.4 and NumPy. To run the examples, you will also need jupyter and matplotlib. 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 will need to make sure all necessary information is passed to the setup command (see below). You also may need to add information to the `setup.py` file.
|
|
49
|
+
|
|
50
|
+
To install this software for use with NVIDIA GPUs (compute capability >2.0), you need the [CUDA toolkit](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html) and [CuPy](https://cupy.chainer.org/). 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.
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### Installing
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
0) [Install Anaconda](https://docs.anaconda.com/anaconda/install/) if you do not have it.
|
|
57
|
+
|
|
58
|
+
1) Create a virtual environment.
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
conda create -n lisa_env -c conda-forge gcc_linux-64 gxx_linux-64 numpy Cython scipy jupyter ipython h5py matplotlib python=3.9
|
|
62
|
+
conda activate few_env
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
If on MACOSX, substitute `gcc_linux-64` and `gxx_linus-64` with `clang_osx-64` and `clangxx_osx-64`.
|
|
66
|
+
|
|
67
|
+
If you want a faster install, you can install the python packages (numpy, Cython, scipy, tqdm, jupyter, ipython, h5py, requests, matplotlib) with pip.
|
|
68
|
+
|
|
69
|
+
2) Clone the repository.
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
git clone https://github.com/BlackHolePerturbationToolkit/FastEMRIWaveforms.git
|
|
73
|
+
cd FastEMRIWaveforms
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
3) If using GPUs, use pip to [install cupy](https://docs-cupy.chainer.org/en/stable/install.html). If you have cuda version 9.2, for example:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
pip install cupy-cuda92
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
4) Run install. Make sure CUDA is on your PATH.
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
python setup.py install
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Running the Tests
|
|
89
|
+
|
|
90
|
+
Since the code package in minimal in size, the example notebook should be run to verify it is running correctly.
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
## Contributing
|
|
94
|
+
|
|
95
|
+
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
|
|
96
|
+
|
|
97
|
+
## Versioning
|
|
98
|
+
|
|
99
|
+
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/mikekatz04/lisa-on-gpu/tags).
|
|
100
|
+
|
|
101
|
+
Current Version: 1.0.2
|
|
102
|
+
|
|
103
|
+
## Authors
|
|
104
|
+
|
|
105
|
+
* **Michael Katz**
|
|
106
|
+
* Jean-Baptiste Bayle
|
|
107
|
+
* Alvin J. K. Chua
|
|
108
|
+
* Michele Vallisneri
|
|
109
|
+
|
|
110
|
+
### Contibutors
|
|
111
|
+
|
|
112
|
+
* Maybe you!
|
|
113
|
+
|
|
114
|
+
## License
|
|
115
|
+
|
|
116
|
+
This project is licensed under the GNU License - see the [LICENSE.md](LICENSE.md) file for details.
|
|
117
|
+
|
|
118
|
+
## Acknowledgments
|
|
119
|
+
|
|
120
|
+
* It was also supported in part through the computational resources and staff contributions provided for the Quest/Grail high performance computing facility at Northwestern University.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .response import pyResponseTDI, ResponseWrapper
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '1.0.2'
|
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
|
|
3
|
+
try:
|
|
4
|
+
import cupy as cp
|
|
5
|
+
|
|
6
|
+
gpu = True
|
|
7
|
+
|
|
8
|
+
except (ImportError, ModuleNotFoundError) as e:
|
|
9
|
+
gpu = False
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def pointer_adjust(func):
|
|
13
|
+
def func_wrapper(*args, **kwargs):
|
|
14
|
+
targs = []
|
|
15
|
+
for arg in args:
|
|
16
|
+
if gpu:
|
|
17
|
+
if isinstance(arg, cp.ndarray):
|
|
18
|
+
targs.append(arg.data.mem.ptr)
|
|
19
|
+
continue
|
|
20
|
+
|
|
21
|
+
if isinstance(arg, np.ndarray):
|
|
22
|
+
targs.append(arg.__array_interface__["data"][0])
|
|
23
|
+
continue
|
|
24
|
+
|
|
25
|
+
try:
|
|
26
|
+
targs.append(arg.ptr)
|
|
27
|
+
continue
|
|
28
|
+
except AttributeError:
|
|
29
|
+
targs.append(arg)
|
|
30
|
+
|
|
31
|
+
return func(*targs, **kwargs)
|
|
32
|
+
|
|
33
|
+
return func_wrapper
|