Skip to content

Instantly share code, notes, and snippets.

View yadudoc's full-sized avatar

Yadu Nand Babuji yadudoc

  • University of Chicago
  • Chicago
View GitHub Profile
@yadudoc
yadudoc / parsl_0.9.0.md
Last active October 15, 2019 18:09
Parsl 0.9.0 Release Checklist

Release Process

This is a first attempt at documenting the release process and the various testing/dev processes that go into making master release ready. Following is a checklist of items that are to be cleared for the 0.9.0 release

Checklist

Documentation updates :

org,core_hrs,lat,long\n</br>AS160 University of Chicago,1.47,41.7813,-87.6051\n</br>AS33491 Comcast Cable Communications. LLC,1.2,41.7975,-87.9548\n</br>AS160 University of Chicago,4430.91,41.7813,-87.6051\n</br>AS160 University of Chicago,1693.57,41.7813,-87.6051\n</br>
@yadudoc
yadudoc / foo.csv
Last active August 26, 2019 19:43
org core_hrs lat log
AS3671 SLAC National Accelerator Laboratory 10013 37.4538 -122.1822
AS160 University of Chicago 29298 41.7813 -87.6051
AS14618 Amazon.com. Inc. 2227 36.8512 -76.1692
{
"data": [
{
"core_hrs": 1.47,
"lat": "41.7813",
"long": "-87.6051",
"org": "AS160 University of Chicago"
},
{
"core_hrs": 1.2,
@yadudoc
yadudoc / parsl_runner.py
Last active August 15, 2019 17:43
For claire
#!/usr/bin/env python3
import argparse
import time
import os
import glob
import parsl
from parsl.app.app import python_app, bash_app
from parsl import File
@yadudoc
yadudoc / ad_hoc_config.py
Created July 24, 2019 17:59
Ad hoc cluster config
rom parsl.providers import LocalProvider
from parsl.channels import SSHChannel
from parsl.executors import HighThroughputExecutor
from parsl.config import Config
username = "yadunand"
remotes = ['midway2-login1.rcc.uchicago.edu', 'midway2-login2.rcc.uchicago.edu']
config = Config(
import parsl
import os
from sample_configs import threads_config, cori_config
if os.environ.get('PIPELINE_ENV', 'test'):
parsl.load(threads_config)
else:
parsl.load(cori_config)
#... rest of the pipeline...
@python_app
def pi(num_points):
from random import random
inside = 0
for i in range(num_points):
x, y = random(), random() # Drop a random point in the box.
if x**2 + y**2 < 1: # Count points within the circle.
inside += 1
return (inside*4 / num_points)
@yadudoc
yadudoc / python_timeout_wrapper.py
Created May 31, 2019 00:38
Python wrapper that implements a timeout for Parsl python_apps
import argparse
import time
import signal
from functools import wraps
import parsl
from parsl.configs.htex_local import config
from parsl.app.app import python_app
parsl.set_stream_logger()

Let's say you are connecting from SiteA to SiteB via OAuth SSH [1]. I assume that the oauth-ssh client is installed on SiteA and the server is installed and running on SiteB.

First try setting up the oath tokens:

oauth-ssh-token authorize -l <SiteB_URL>

Ensure that you can connect to the SiteB:

oauth-ssh <SiteB_URL>

Install the globus-ssh branch, into your python env. I recommend you use virtualenv or conda, whichever