Skip to content

Instantly share code, notes, and snippets.

View SteVwonder's full-sized avatar

Stephen Herbein SteVwonder

View GitHub Profile
@SteVwonder
SteVwonder / dump_py_bindings.py
Last active February 15, 2019 23:41
Statistics and Raw Output on Coverage of Python Bindings
#!/user/bin/env python
import re
import inspect
from collections import defaultdict
import flux
from _flux import _core
from _flux._core import ffi
from flux import jsc
@SteVwonder
SteVwonder / job-event-log.org
Last active August 30, 2018 17:33
Notes from the Flux Team Brainstorming Sessions

Use-Cases

User-initiated

Handled by ingest module

  • Submitting a job for immediate scheduler processing (not held)
    • Ingest module creates the first event to “ingested” (maybe “submitted”)
  • Submitting a job as held

Proxied through job manager module

  • Cancelling a job
    • From submitted
    • From allocated
# herbein1 at sierra4361 in /nfs/tmp2/herbein1/sierra-test [13:42:17]
→ bsub -nnodes 1 -G guests -Is jsrun -n1 --bind=none taskset -c 0-87 bash -c 'CUDA_VISIBLE_DEVICES=0,1,2,3 CUDA_DEVICE_ORDER=PCI_BUS_ID hwloc-ls --restrict binding'
Job <143722> is submitted to default queue <pbatch>.
<<Waiting for dispatch ...>>
<<Starting on sierra4369>>
Machine (128GB total) + Group0 L#0 + NUMANode L#0 (P#0 128GB) [80/18667]
Package L#0
L3 L#0 (10MB) + L2 L#0 (512KB)
L1d L#0 (32KB) + L1i L#0 (32KB) + Core L#0
PU L#0 (P#0)
@SteVwonder
SteVwonder / parse_podcast.py
Created April 10, 2018 04:24
Count words in the transcript of Sam & Ezra's podcast
#!/usr/bin/env python
import re
sam_wc = 0
ezra_wc = 0
speaker = None
with open('podcast-transcript.txt', 'r') as infile:
{
"levels": [
{
"cores_per_child": 36,
"num_children": 8
},
{
"cores_per_child": 1,
"num_children": 36
}
detex paper.tex > paper.txt
java -jar /path/to/languagetool-commandline.jar --xmlfilter -d COMMA_PARENTHESIS_WHITESPACE,WHITESPACE_RULE -l en-US ./paper.txt | less
ROOT LEVEL
→ grep "sched_proxy_c" 0-broker.out
2017-08-18T22:56:31.738387Z init_prog.debug[0]: Loading sched_proxy_c module: ['flux', 'module', 'load', 'sched_proxy_c', 'root=1']
2017-08-18T22:56:31.813909Z broker.debug[0]: insmod sched_proxy_c
2017-08-18T22:56:31.817743Z sched_proxy_c.debug[0]: sched_proxy_c module is running on rank 0
2017-08-18T22:56:33.391903Z sched_proxy_c.debug[0]: child_needs_a_job_cb: received a request for work
2017-08-18T22:56:33.391932Z sched_proxy_c.debug[0]: child_needs_a_job_cb: Jobs are queued, responding immediately to request for work
2017-08-18T22:56:40.834900Z sched_proxy_c.debug[0]: new_job_cb: received a new job
2017-08-18T22:56:40.834956Z sched_proxy_c.debug[0]: new_job_cb: no outstanding requests for work, queueing job
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libgen.h>
#include <errno.h>
#include <libgen.h>
#include <czmq.h>
#include <dlfcn.h>
#include <stdbool.h>
#include <flux/core.h>
2016-10-25T16:29:28.971952Z broker.info[0]: pmi: bootstrap time 0.0s
2016-10-25T16:29:28.982407Z broker.info[0]: wireup: 1/1 (complete) 0.0s
2016-10-25T16:29:28.982445Z broker.info[0]: Run level 1 starting
2016-10-25T16:29:28.998158Z broker.debug[0]: insmod barrier
2016-10-25T16:29:29.011427Z broker.debug[0]: insmod content-sqlite
2016-10-25T16:29:29.012058Z broker.debug[0]: content backing store: enabled content-sqlite
2016-10-25T16:29:29.024753Z broker.debug[0]: insmod kvs
2016-10-25T16:29:29.066510Z broker.debug[0]: insmod aggregator
2016-10-25T16:29:29.090461Z broker.debug[0]: insmod resource-hwloc
2016-10-25T16:29:29.097656Z broker.debug[0]: insmod job
==> '/bin/bash' './autogen.sh'
Running libtoolize --automake --copy ...
Running autoreconf --verbose --install -I config
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I config -I config
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy
autoreconf: running: /usr/bin/autoconf --include=config
autoreconf: running: /usr/bin/autoheader --include=config