Skip to content

Instantly share code, notes, and snippets.

View aterrel's full-sized avatar
💻

Andy R. Terrel aterrel

💻
  • NVIDIA
  • Austin, TX
View GitHub Profile
@aterrel
aterrel / pretty_prompt.sh
Created January 19, 2011 02:14
Relevant bash for my prompt
# Set the prompt
export CLICOLOR=1
source $HOME/.git-completion.sh
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
win-divider() {
s="_"
o=""
def _rev_top_sort (self, dag):
"""Simple reverse top sorter given dag
dag: a dictionary with node:(neighbors)
returns a list of nodes in reversed topological order.
Used to determine update sequence.
"""
@aterrel
aterrel / advection_rp_step_ispc.ispc
Created March 14, 2012 15:18
Advection Riemann problem using the ispc
#define NUM_GHOST 2
#define NUM_STATES 1
#define NUM_WAVES 1
void advection_rp(uniform double* q_left, uniform double* q_right,
uniform double* amdq, uniform double* apdq, uniform double* wave, uniform double* s)
{
// Wave and speed
wave[0] = q_right[0] - q_left[0];
s[0] = 1.0;
@aterrel
aterrel / gist:2219565
Created March 27, 2012 19:36
errors in call
c210-104$ ./src/benchmarks/benchmarkExample.py --events IntegBatchCPU IntegBatchGPU IntegGPUOnly --num 52 DMComplex --refine 0.0625 0.00625 0.000625 0.0000625 0.00003125 0.000015625 0.0000078125 0.00000390625 --blockExp 4 --order 1 CPU='dm_view show_residual=0 compute_function batch' GPU='dm_view show_residual=0 compute_function batch gpu gpu_batches=8'
Namespace(batch=False, blockExp=['4'], dim=2, events=['IntegBatchCPU', 'IntegBatchGPU', 'IntegGPUOnly'], library='SNES', module='summary', num=52, operator='laplacian', order=1, refine=['0.0625', '0.00625', '0.000625', '0.0000625', '0.00003125', '0.000015625', '0.0000078125', '0.00000390625'], runs=['CPU=dm_view show_residual=0 compute_function batch', 'GPU=dm_view show_residual=0 compute_function batch gpu gpu_batches=8'], stage='Main_Stage')
./bin/pythonscripts/PetscGenerateFEMQuadrature.py 2 1 1 16 laplacian /home/01392/aterrel/petsc-dev/src/snes/examples/tutorials/ex52.h
[{(-1.0, -1.0): [(1.0, ())]}, {(1.0, -1.0): [(1.0, ())]}, {(-1.0, 1.0): [(1.0, ())]}]
| [10-30 13:26] aterrel@172-30-28-152:~/scratch (13.996 Mb)
$ hg clone http://petsc.cs.iit.edu/petsc/BuildSystem
destination directory: BuildSystem
requesting all changes
adding changesets
adding manifests
adding file changes
added 2876 changesets with 4053 changes to 208 files
updating to branch default
119 files updated, 0 files merged, 0 files removed, 0 files unresolved
@aterrel
aterrel / README
Last active December 15, 2015 08:59
Easybuild lmod errors
$ cat /etc/redhat-release
Scientific Linux release 6.3 (Carbon)
$ module --version
Modules based on Lua: Version 3.4.1 2012-05-23 13:21
by Robert McLay [email protected]
$ ls -l `which modulecmd`
lrwxrwxrwx 1 aterrel chg 33 Mar 22 21:15 /workspace/opt/apps/easybuild/1.2.0/bin/modulecmd -> /usr/local/lmod/lmod/libexec/lmod
@aterrel
aterrel / convolve.pyx
Last active December 29, 2015 14:28
Cython Test
from __future__ import division
import numpy as np
# "cimport" is used to import special compile-time information
# about the numpy module (this is stored in a file numpy.pxd which is
# currently part of the Cython distribution).
cimport numpy as np
# We now need to fix a datatype for our arrays. I've used the variable
# DTYPE for this, which is assigned to the usual NumPy runtime
# type info object.
DTYPE = np.int
@aterrel
aterrel / 1PasswordDualMonitorBug.png
Last active January 1, 2016 01:19
1password bug
1PasswordDualMonitorBug.png
import bokeh.plotting as plt
words = ['air', 'atm', 'atm', 'complexes', 'internal', 'oxidizer']
topics = ['b', 'a', 'b', 'a', 'a', 'b']
sizes = [0.17070214219087501,
0.20783267646346201,
0.17070214219087501,
0.20783267646346201,
0.20783267646346201,