Skip to content

Instantly share code, notes, and snippets.

Compiling Parflow

  • When building with configure specially if not using the gnu compilers this might pose problems as CXX compiling is not introduced correctly in the configure script. As PF's configure is going to be deprecated soon my recommendation is to use cmake. Still cmake has errors too especially when cross compiling for ibm's blue gene / Q architecture.

Debugging

  • compile with -g -fbounds-check (second option is especial of interest for the fortran compiler)
  • start in debugger (gdb $PARFLOW_DIR/bin/parflow <ProblemName>)
  • simplify the simulation problem as much as possible!
  • Start from a working simulation (e.g. Testcases) and add the things one by one you want in your simulation
  • Use the PFBChecker to check all inputs
@xy124
xy124 / parflow_pre-commit
Created December 23, 2017 19:52
pre-commit hook that checks the format of all files to be committed
#!/bin/bash
p=`git rev-parse --show-toplevel`
cd $p
files=$(git status --porcelain | grep '^M ' | cut -d ' ' -f 3)
for i in $files
do
uncrustify --check -l C -c bin/parflow.cfg $i
RESULT=$?
if [ "$RESULT" != "0" ]; then
@xy124
xy124 / installer_parflow.sh
Last active November 9, 2017 11:14
installs parflow. Change PREFIX and N before execution!
#!/bin/bash -x
#cores:
N=16
#PREFIX=$HOME
PREFIX=$HOME/test
SRC=$PREFIX/src
mkdir -p $SRC
export PATH=$PREFIX/bin:$PATH
@xy124
xy124 / gist:f45804d659e1eb6cea36
Last active August 29, 2015 14:21
midi pitch wheel as pageup/down on xpdf server
#!/bin/bash
# Script to perform next / prev page on note screen when midi-pitch-weel is turned
# Assuming:
# - notes are displayed on a $server in the only open xpdf session
# - $user can log into server via ssh without password authentification.
# - $dump returns when executed the hex-midi dump of the used midi-device
# Dependencies:
# sudo apt-get install xdotool xpdf/epdftool
@xy124
xy124 / LICENSE.txt
Created April 11, 2012 15:34 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE