Skip to content

Instantly share code, notes, and snippets.

View niklasfi's full-sized avatar

Niklas Fischer niklasfi

View GitHub Profile
I have three devices which I use for testing a btrfs-based backup solution on a fedora rawhide machine with the 3.14.0-0.rc3.git2.1.fc21.x86_64 kernel. I have created a d=raid1, m=raid1 array by first filling a disk and then running balance -dconvert=raid1 -mconvert=raid1. The second part of my routine is failing a drive and replacing it with the third, spare drive. For the first test, I wanted to go the simplest of all routes: the drive fails, while the btrfs partition is not mounted and I notice this before I even try to mount it again. This should be a wash
1. mount -t btrfs -o degraded /dev/sdg /data #mount btrfs
2. btrfs device add /dev/sdh /data #add new device to btrfs
3. btrfs device delete missing #delete missing device
Now the second step already fails, because btrfs device add never finishes, allthough iotop shows no activity at all. What you see in [03] and [04] is the dmesg output.
#include <mkl.h>
#include <stdlib.h>
void dgeqrf_test(){
//dgeqrf calculates a qr factorization
MKL_INT n = 4;
double* a = malloc(sizeof(double) * n * n);
{
int i;
#include <omp.h>
int main(){
//Algorithm alg(double* m) uses m to calculate result
double sum=0;
int i;
#pragma omp parallel for
for(i=0; i < 1000; ++i)
void set_threads(){
#ifdef SCSL
openblas_set_num_threads(1);
#elifdef SCPL
openblas_set_num_threads(num_threads());
#elifdef PCSL
openblas_set_num_threads(1);
#else
_Static_assert (0, "you did not pass appropriate compiler flags. Make sure that either SCSL, SCPL or PCSL is set.");
#endif
add_library(scsl eigensolvers.c)
set_target_properties (scsl PROPERTIES COMPILE_DEFINITIONS SCSL)
target_link_libraries(scsl multithreading ${LAPACK_LIBS})
add_library(pcsl eigensolvers.c)
set_target_properties (scsl PROPERTIES COMPILE_DEFINITIONS "PCSL=1")
target_link_libraries(pcsl multithreading ${LAPACK_LIBS})
add_library(scpl eigensolvers.c)
set_target_properties (scsl PROPERTIES COMPILE_DEFINITIONS SCPL=1)
@niklasfi
niklasfi / gist:5379646
Created April 13, 2013 19:06
OwnCloud crashes with assertion error csyncthread.cpp:333
04-13 20:58:40:419 Logging into logfile: "owncloud.log" with flush true
04-13 20:58:40:426 "################## ownCloud de_DE (de_DE) 1.2.4"
04-13 20:58:40:484 "sni-qt/3816" WARN 20:58:40.484 void StatusNotifierItemFactory::connectToSnw() Invalid interface to SNW_SERVICE
04-13 20:58:40:485 * Setup folders from "/home/niklas/.local/share/data//ownCloud/folders"
04-13 20:58:40:485 ` -> setting up: "ownCloud"
04-13 20:58:40:485 -> file path: "/home/niklas/.local/share/data/ownCloud/folders/ownCloud"
04-13 20:58:40:485 Returning configured owncloud url: "https://owncloud.niklasfi.de/remote.php/webdav/"
04-13 20:58:40:485 setting remote poll timer interval to 30348 msec for folder "ownCloud"
04-13 20:58:40:485 (+) Watcher: "/home/niklas/ownCloud"
04-13 20:58:40:486 `-> and 4 subdirectories
Environment:
Request Method: GET
Request URL: https://www.fsmpi.rwth-aachen.de/lerngruppen/admin/frontend/offering/1/
Django Version: 1.4.2
Python Version: 2.6.6
Installed Applications:
('django.contrib.auth',
cmake_minimum_required(VERSION 2.8)
project(foo)
message(STATUS "### MPI active ###")
find_package(MPI REQUIRED)
message(STATUS "MPI FOUND: ${MPI_FOUND}")
message(STATUS "include path: ${MPI_INCLUDE_PATH}")
include_directories(${MPI_INCLUDE_PATH})
message(STATUS "mpi compile flags: ${MPI_CXX_COMPILE_FLAGS}")
message(STATUS "cxx flags (before): ${CMAKE_CXX_FLAGS}")
@niklasfi
niklasfi / ???
Created February 16, 2012 17:26
var x = ['hello']
delete x[0]
x.length // === 1
var EventEmitter = require('events').EventEmitter
var me = function(){
ee = new EventEmitter()
ee.on("info",
function(){
console.log("hello world")
}
)