Skip to content

Instantly share code, notes, and snippets.

View LouisJenkinsCS's full-sized avatar
💭
Fellow of the Department of Energy's Computational Sciences Graduate Fellowship.

Louis Jenkins LouisJenkinsCS

💭
Fellow of the Department of Energy's Computational Sciences Graduate Fellowship.
View GitHub Profile
@LouisJenkinsCS
LouisJenkinsCS / mpstat_converter.py
Created June 22, 2022 19:23
Convert JSON from mpstat command into a graph that shows CPU utilization over time (lightweight) while also giving maximum and minimum snapshots
#!/usr/bin/env python
# coding: utf-8
import argparse
import pandas
import sys
import subprocess
import time
import json
import signal
@LouisJenkinsCS
LouisJenkinsCS / idea.md
Created December 9, 2021 15:48
Batch System Generator - Sketch of Idea

One of the major pains I have in using HPC resources is figuring out/remembering the syntax required to create certain jobs, check the state of the queue(s) I am interested in, figure out, based on how heavily utilized the cluster is, how much time I spend waiting to get one of my jobs to run, figuring out how many nodes are available for the given queue(s), etc...

One thing I would love to have, to make this all the easier, would be to have a script that generated a script for me based on the system I was running on, whether it be Slurm or Torque (PBS/PBS-Pro) and can easily give me what I want. As well, I would want to be able to generate some template batch scripts and to append to them, so being able to define a base template for my project would be very useful (i.e. a base template generated from this script, and then using that template to generate more specific (less generalized) fully complete scripts.

Generation of Scripts

  1. Detect whether or not the script is being run on PBS/PBS-Pro or Slurm
@LouisJenkinsCS
LouisJenkinsCS / 2D-Jacobi.ipynb
Last active August 31, 2021 20:35
Scientific Computing Examples
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LouisJenkinsCS
LouisJenkinsCS / DiscordDeleteDMs.py
Last active December 21, 2020 12:37
[Linux] Discord - Delete All DMs, Screenshot (Archive) DMs, Kill Switch, PNG to PDF Conversion
# Enter script code
import time;
store.set_global_value("STOP", True)
while store.GLOBALS.get("STOP", True):
keyboard.send_key("<space>")
time.sleep(0.25)
keyboard.send_key("<backspace>")
time.sleep(0.25)
keyboard.send_key("<up>")
@LouisJenkinsCS
LouisJenkinsCS / template.gp
Created June 9, 2020 15:27
GNUPlot Template
# From https://github.com/hesstobi/Gnuplot-Templates
load 'defaults.gp'
# Removes the annoying labels on X and Y axis that persist even after manually setting ylabel and xlabel
unset label
# Decent defaults for creating png
set terminal pngcairo enhanced size 1440,768 font 'Verdana,16';
set output 'template.png'

Globals

    // List of waiters...
    node *head;
    // -1: Free-for-All
    // 0 - N: Owned by thread id corresponding to lock value
    atomic<int> lock;
@LouisJenkinsCS
LouisJenkinsCS / PMAT_Durable_Queue_Experiment_Log.md
Last active March 11, 2020 22:44
PMAT Durable Queue Bugs Found

The Durable Queue was slightly modified to ignore return value, and so the verifier does not look at this at all.

Bug #1 - Remove CLFLUSH of node->value [Found]

This bug will not explicitly CLFLUSH the value associated with the node. Within a single verification this bug was caught. The dumped information did show the location of the store.

Bug #2 - Remove CLFLUSH of last->next in successful enqueue [Found]

The bug will not explicitly CLFLUSH the last-&gt;next value, making inconsistency possible. Within two verifications, this bug was caught due to the tail not being found while traversing the list.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/sh
{
rm -rf Atlas
wget https://github.com/HewlettPackard/Atlas/archive/master.tar.gz
if [ $? -ne 0 ]; then
echo 'Unable to download Atlas'
exit 1
fi
tar -xzvf master.tar.gz
if [ $? -ne 0 ]; then
@LouisJenkinsCS
LouisJenkinsCS / dist_atomics.gnuplot
Last active February 7, 2020 22:22 — forked from dgarvit/acq_release.txt
Benchmark results for atomic int and atomicobjects (strong scaling)
set terminal postscript enhanced color
set output 'atomic_object.ps'
set multiplot layout 1,2 title "AtomicObject vs atomic int" font ",14"
set xtics rotate
set bmargin 5
#
set title "Distributed Memory"
set logscale x 2
set logscale y 10