Skip to content

Instantly share code, notes, and snippets.

View ChristopherHogan's full-sized avatar

Christopher Hogan ChristopherHogan

View GitHub Profile
@ChristopherHogan
ChristopherHogan / pymeep_install.md
Last active November 19, 2021 03:44
PyMeep Conda Package Installation

PyMeep Conda Package Installation

PyMeep conda packages are currently only available for python 2.7 and 3.6 on Linux (tested on Debian Jessie and Ubuntu Xenial). Note that PyMeep is still in its development stages, and should be considered alpha software. The conda packages are subject to change at any time.

1. Install Miniconda

It doesn't really matter if you install the python 2.7 or 3.6 version, since you can create conda environments with any version you want.

wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p <desired_prefix>/miniconda3
export PATH=<desired_prefix>/miniconda3/bin:$PATH
import time
from multiprocessing import Pool
import boto3
import botocore
import meep as mp
def make_dft_data(flx_reg=None, n2f_reg=None, frc_reg=None, fldc=None, flds=None, fldw=None, fld_cmp=None):
dft_data = {
import math
import time
from multiprocessing import Pool
import boto3
import meep as mp
from meep.materials import Al
def get_results(fragment_stats, total_pixels, total_time):
@ChristopherHogan
ChristopherHogan / run_random_sims.py
Created October 29, 2018 21:11
Run random simulations
import argparse
from time import time
from math import pi
from random import randrange
import boto3
import meep as mp
from meep.materials import Al
@ChristopherHogan
ChristopherHogan / setup_and_run.sh
Created October 29, 2018 21:13
Script to run on AWS startup
#!/bin/bash
PREFIX=/root/miniconda
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p ${PREFIX}
CONDA=${PREFIX}/bin/conda
${CONDA} create -y -n mp -c chogan/label/dev -c chogan -c conda-forge pymeep boto3
@ChristopherHogan
ChristopherHogan / absorber_boundaries.png
Last active November 9, 2018 14:29
Plots when running simulations with only 1GB of memory
absorber_boundaries.png
@ChristopherHogan
ChristopherHogan / install_conda_meep.sh
Last active December 5, 2018 21:38
Setting up cfncluster to run Meep
#!/bin/bash
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
chmod +x miniconda.sh
./miniconda.sh -b -p /opt/miniconda
export PATH=/opt/miniconda/bin:$PATH
conda create -n mp -c chogan/label/dev -c chogan -c conda-forge pymeep-parallel boto3
chown -R ec2-user:ec2-user /opt/miniconda
function fix_boot_disable_ht() {
@ChristopherHogan
ChristopherHogan / mercury_gpu_test_plan.md
Last active August 5, 2022 15:41
Mercury GPU Test Plan

1. Install mochi components

Mochi Documentation

Make sure you're using the latest spack from the develop branch and the latest mochi-margo from the main branch. Note: The mochi-margo package is contained in the default spack repo, but we can't use that one. We must use the version at https://github.com/mochi-hpc/mochi-spack-packages. That is the only way we can get a new enough margo and mercury that have the GPU capabilities we're testing. For reference, the GPU capabilites were added to