This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swot: https://github.com/jcoupon/swot/ | |
corrfunc: https://github.com/manodeep/Corrfunc | |
To test the speed and agreement of swot vs corrfuc, we generated random | |
datasets of increasing size and measured the w(theta) autocorrelation function. | |
Swot has an approximation parameter 'OA' (opening angle) that critically impacts its runtime. | |
We tried OA=0.03 and OA='no'. However, even the conservative value of OA=0.03 | |
caused >10% errors in wtheta for this randomized configuration. Thus, it should | |
be used with caution. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: this function uses the term 'radius', but the histogramming is completely general | |
import numpy as np | |
def RadialBin(radii, values, bin_edges, bin_indices=None): | |
""" | |
Radial histogramming that supports fast re-evaluation | |
for the same `radii` with new `values` by passing back `bin_indices`. | |
Parameters |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is a "minimal" reproducer for an apparent GCC-7 bug related to AVX-512. | |
It has a 100% reproduction rate on my machine (Cascade Lake). | |
A simple loop that copies the values from a double array to a float array | |
sometimes gives the wrong answer in the first few elements (zero, nan, or garbage). | |
The bug seems correlated with alignment values of the input and output | |
arrays, but it's not a one-to-one relationship. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
''' | |
This script facilitates Globus transfers of Abacus simulation data. | |
In particular, for AbacusSummit we want to transfer particle data and | |
halo catalogs from OLCF to NERSC after each simulation is done. | |
Both sites already have Globus endpoints, so the job of this script | |
is to initiate a transfer between the two, saving the transfer ID | |
number so we can query the transfer status later. | |
The intention of this script is primarily to do disk-to-disk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
A simple multi-threaded Python file writer. | |
Author: Lehman Garrison (lgarrison.github.io) | |
''' | |
import threading | |
import queue | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numba as nb | |
import numpy as np | |
def nb_ecdf(X,Rmax,ngrid=64,nthreads=1): | |
'''Compute the empirical CDF of points X (shape (N,D)) | |
in domain [0,Rmax) using a histogram with `ngrid` cells | |
per dimension. | |
Rmax and ngrid can also be length D arrays. | |
''' |
OlderNewer