Skip to content

Instantly share code, notes, and snippets.

View nmnobre's full-sized avatar

Nuno Nobre nmnobre

View GitHub Profile
@nmnobre
nmnobre / lbann.sh
Last active April 22, 2024 11:20
A script that uses Spack to automate the installation of LBANN with CUDA support on Scafell Pike, the Hartree Centre's supercomputer
#!/bin/bash
## Copyright (c) 2024, Nuno Nobre, STFC Hartree Centre
## A script that uses Spack to automate the installation of LBANN with CUDA support
## on Scafell Pike, the Hartree Centre's supercomputer
### Use python3 as required by Spack
module load python3/3.10.13
@nmnobre
nmnobre / as
Last active January 11, 2018 16:09 — forked from xianyi/as
Replace the native and ancient macOS assembler (/usr/bin/as) or the MacPorts assembler (/opt/local/bin/as) by a script which calls the clang assembler. Now removing "-I dir" options from the arguments passed to the assembler and taking into account possible spaces in ARG in the condition for the first if statement.
#!/bin/sh
HAS_INPUT_FILE=0
ARGS=$@
ARGS=$(echo $ARGS | perl -pe 's/-I.*?(\s-[^I])/\1/')
while [ $# -ne 0 ]; do
ARG=$1
# Skip options
if [ "$ARG" == "-arch" ] || [ "$ARG" == "-o" ]; then
# Skip next token
shift