- Related Setup: https://gist.github.com/hofmannsven/6814278
- Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
- Interactive Beginners Tutorial: http://try.github.io/
- Git Cheatsheet by GitHub: https://services.github.com/on-demand/downloads/github-git-cheat-sheet/
Get the code here.
This python library generates SLURM submission scripts which launch multiple jobs to 'sweep' a given set of parameters; that is, a job is run for every possible configuration of the params.
For example, you might have a script which accepts parameters a
, b
and c
, which you call (passing a=1
, b=2
,
c=3
) like
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
# ---------------------------------------------------- # | |
# BYU supercomputer | |
# ---------------------------------------------------- # | |
# Interactive jobs - use salloc | |
salloc --nodes=1 --ntasks-per-node=1 --time=1:00:00 --mem-per-cpu=2GB # Doesn't support GPUS for now... | |
# ---------------------------------------------------- # | |
# GaTech PACE cluster | |
# ---------------------------------------------------- # |
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
#!/bin/bash | |
# | |
# Build GCC with support for offloading to NVIDIA GPUs. | |
# | |
set -o nounset -o errexit | |
# Location of the installed CUDA toolkit | |
cuda=/usr/local/cuda |
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 meep as mp | |
try: | |
import meep.adjoint as mpa | |
except: | |
import adjoint as mpa | |
import numpy as np | |
from autograd import numpy as npa | |
from autograd import tensor_jacobian_product | |
from enum import Enum | |
from matplotlib import pyplot as plt |
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 meep as mp | |
try: | |
import meep.adjoint as mpa | |
except: | |
import adjoint as mpa | |
import numpy as np | |
from autograd import numpy as npa | |
from autograd import tensor_jacobian_product | |
from enum import Enum | |
from matplotlib import pyplot as plt |
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 meep as mp | |
try: | |
import meep.adjoint as mpa | |
except: | |
import adjoint as mpa | |
import numpy as np | |
from autograd import numpy as npa | |
from autograd import tensor_jacobian_product | |
from enum import Enum | |
from matplotlib import pyplot as plt |
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 meep as mp | |
import numpy as np | |
import matplotlib.pyplot as plt | |
resolution = 10 | |
r_bank = np.linspace(1.0,1.0+1/resolution,100) | |
sum_bank = [] | |
for r in r_bank: | |
print(r) | |
sim = mp.Simulation( |
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
""" | |
Checks that the constraint function with constraint L applied to a circle | |
with diameter d has a return value based on the convention that a violation | |
(L > d) is >=0 and a non-violation is ~0. | |
""" | |
from typing import Tuple | |
import matplotlib |