Skip to content

Instantly share code, notes, and snippets.

View bebosudo's full-sized avatar
💾

Alberto Chiusole bebosudo

💾
View GitHub Profile
1. (serial) 2. (smpar) 3. (dmpar) 4. (dm+sm) PGI (pgf90/gcc)
5. (serial) 6. (smpar) 7. (dmpar) 8. (dm+sm) PGI (pgf90/pgcc): SGI MPT
9. (serial) 10. (smpar) 11. (dmpar) 12. (dm+sm) PGI (pgf90/gcc): PGI accelerator
13. (serial) 14. (smpar) 15. (dmpar) 16. (dm+sm) INTEL (ifort/icc)
17. (dm+sm) INTEL (ifort/icc): Xeon Phi (MIC architecture)
18. (serial) 19. (smpar) 20. (dmpar) 21. (dm+sm) INTEL (ifort/icc): Xeon (SNB with AVX mods)
22. (serial) 23. (smpar) 24. (dmpar) 25. (dm+sm) INTEL (ifort/icc): SGI MPT
26. (serial) 27. (smpar) 28. (dmpar) 29. (dm+sm) INTEL (ifort/icc): IBM POE
30. (serial) 31. (dmpar) PATHSCALE (pathf90/pathcc)
32. (serial) 33. (smpar) 34. (dmpar) 35. (dm+sm) GNU (gfortran/gcc)
@bebosudo
bebosudo / zhang_calibration_method.ipynb
Last active January 26, 2019 16:38
Project on Zhang calibration method, undistortion and super-imposition of an object, for CVPR @ units.it
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bebosudo
bebosudo / Dockerfile
Created February 15, 2019 12:54
rnaseq-nf + awscli to execute RNA sequencing inside AWS Batch + S3
# bebosudo/rnaseq-nf is just a fork of nextflow/rnaseq-nf
FROM bebosudo/rnaseq-nf
MAINTAINER Alberto Chiusole <[email protected]>
RUN pip install --no-cache awscli
@bebosudo
bebosudo / search_free_port.py
Created March 6, 2019 14:44
Search for a free TCP port in python 3 (not completely safe, since between the check and the usage, there could be a race-condition)
#!/usr/bin/env python3
import socket
def search_free_port():
port = 5000
while True:
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
if s.connect_ex(('localhost', port)) != 0:
return port
@bebosudo
bebosudo / RegCM-SVN6916_more-io-debug.patch
Last active March 27, 2019 16:10
Patch for more verbose debug on RegCM SVN 6916.
diff -Naur -x '*.o' -x '*.mod' -x '*.a' -x 'config.*' -x configure -x 'aclocal*' -x depcomp -x external -x .deps -x myabort__genmod.f90 -x missing -x '*Proc' -x libtool -x '*sh' -x 'stamp*' -x 'Makefile*' RegCM-SVN6916_orig/Main/mod_ncio.F90 RegCM-SVN6916_patch/Main/mod_ncio.F90
--- RegCM-SVN6916_orig/Main/mod_ncio.F90 2017-11-28 12:11:10.000000000 +0100
+++ RegCM-SVN6916_patch/Main/mod_ncio.F90 2019-03-27 17:07:56.704690606 +0100
@@ -28,6 +28,7 @@
use mod_memutil
use mod_nchelper
use mod_domain
+ use mod_service
implicit none
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><!--
Page saved with SingleFile
url: file:///tmp/lu8213od5iqt.tmp/lu8213od5iqz.tmp/plots_timings_ceph_cern.htm
saved date: Mon Mar 25 2019 14:43:19 GMT+0100 (Central European Standard Time)
--><meta charset=utf-8>
<title></title>
<meta name=generator content="LibreOffice 6.1.5.2 (Linux)">
<meta name=created content=2019-03-25T11:33:56.264232791>
<meta name=changed content=2019-03-25T14:04:22.127248758>
<style>body,table,tbody,tr,td,p{font-family:"Liberation Sans";font-size:x-small}</style>
#!/usr/bin/env bash
#SBATCH -p be-short
#SBATCH -J bescratch_test
#SBATCH -t 24:00:00
#SBATCH --hint=nomultithread
#SBATCH -d singleton
#SBATCH --ntasks-per-node=20
#SBATCH -n 640
# PBS at C3HPC submit info:
@bebosudo
bebosudo / ior-ceph-lazy-dirty.patch
Last active April 11, 2019 13:22
dirty patch for ior
diff -Naur -x '*.o' -x '*.mod' -x '*.a' -x 'config.*' -x configure -x 'aclocal*' -x depcomp -x external -x .deps -x myabort__genmod.f90 -x missing -x '*Proc' -x libtool -x '*sh' -x 'stamp*' -x 'Makefile*' -x 'autom4te*' -x test-driver ior-3.2.0/src/aiori-POSIX.c ior-3.2.0-lazy/src/aiori-POSIX.c
--- ior-3.2.0/src/aiori-POSIX.c 2018-12-23 05:28:03.000000000 +0100
+++ ior-3.2.0-lazy/src/aiori-POSIX.c 2019-04-11 13:24:57.500951794 +0200
@@ -369,6 +369,11 @@
gpfs_free_all_locks(*fd);
}
#endif
+
+#define CEPH_IOCTL_MAGIC 0x97
+#define CEPH_IOC_LAZYIO _IO(CEPH_IOCTL_MAGIC, 4)
@bebosudo
bebosudo / TIL.md
Last active May 9, 2025 15:05
Things I Learned/Today I Learned

Python

  • Extra requirement packages can be defined for a python package, using square brackets: pip install "project[extra]", see https://stackoverflow.com/a/46775606/
  • dask is a really cool framework for distributed tasks! For example, one may set an object in shared memory using .scatter: https://docs.dask.org/en/latest/futures.html#move-data
  • To uninstall a package installed with pip -e git which gives "No files were found to uninstall", search for a LIBRARYNAME.egg-link or LIBRARYNAME.egg-info file, and rename/delete it; a list of dirs where pip searches when doing a freeze can be found with python -c 'import sys; print(sys.path)'
  • Path configuration files can change the python path: https://stackoverflow.com/questions/60338280/
  • To test whether a port can be used, bind to the port on all the interfaces; see snippet in the bash section below
  • Convert 123MB into bytes
units = {"KB": 2**10, "MB": 2**20, "GB": 2**30
@bebosudo
bebosudo / darshan-util-3.4.0-fedora.Dockerfile
Last active November 7, 2022 17:54
Multi-stage dockerfile to build darshan-util: 'docker pull docker.io/bebosudo/darshan-util' (https://hub.docker.com/r/bebosudo/darshan-util)
# darshan-util
# http://www.mcs.anl.gov/research/projects/darshan/docs/darshan-util.html
#
# This container file collects all dependencies required to run the analysis
# tools on darshan log files.
# To build darshan-util we use a multi-stage build: the first FROM builds the
# program, while the second copies only the final files into it.
# The first image is discarded and we only keep the second image with the
# final executables. For more details see the official docs: