Skip to content

Instantly share code, notes, and snippets.

View planetA's full-sized avatar

Maksym Planeta planetA

View GitHub Profile
gcc -o conftest -DNDEBUG -DNVALGRIND -O2 -I/tmp/user/mvapich2-build/src/mpl/include -I/tmp/user/mvapich2/src/mpl/include -I/tmp/user/mvapich2/src/openpa/src -I/tmp/user/mvapich2-build/src/openpa/src -D_REENTRANT -I/tmp/user/mvapich2-build/src/mpi/romio/include -I/include -I/include -I/include -I/include -L/lib -L/lib -L/lib -Wl,-rpath,/lib -L/lib -Wl,-rpath,/lib -L/lib -L/lib conftest.c -libumad -libverbs -ldl -lrt -lm -lpthread -v
gcc -o conftest -DNDEBUG -DNVALGRIND -O2 -I/tmp/user/mvapich2-build/src/mpl/include -I/tmp/user/mvapich2/src/mpl/include -I/tmp/user/mvapich2/src/openpa/src -I/tmp/user/mvapich2-build/src/openpa/src -D_REENTRANT -I/tmp/user/mvapich2-build/src/mpi/romio/include -I/include -I/include -I/include -I/include -L/lib -L/lib -L/lib -Wl,-rpath,/lib -L/lib -Wl,-rpath,/lib -L/lib -L/lib conftest.c -libumad -libverbs -ldl -lrt -lm -lpthread -v -L/home/user/libibverbs/1.1.4/lib
Displaying memory usage in bytes.
Filling data structures with 1048576 elements and reporting the per element memory usage.
memory usage per element of a vector<uint32_t> : 4
memory usage per element of a list<uint32_t> : 24
memory usage per element of a deque<uint32_t> : 4.15672
memory usage per element of an unordered_set<uint32_t> : 24.0591
memory usage per element of a set<uint32_t> : 40
Comments :
This is an optimistic estimate: the overhead of the data structure and the allocations is ignored.
Because the per-value overhead might be fixed, the results might be less dramatic with larger elements, such as long strings.
@planetA
planetA / simple.c
Created April 28, 2017 14:16
Minimal example for race condition
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <dmtcp.h>
#define CRASH(format, ...) ({ \
fprintf(stderr, "DMTCPTESTEND:DMTCPCRASH:%s:%d " format, \
[11908] NOTE at dmtcp_coordinator.cpp:855 in onConnect; REASON='worker connected'
hello_remote.from = 55b24a7c80853818-30373-22c2200d527e
[11908] NOTE at dmtcp_coordinator.cpp:855 in onConnect; REASON='worker connected'
hello_remote.from = 55b24a7c80853818-30374-22c2202e8d96
[11908] NOTE at dmtcp_coordinator.cpp:855 in onConnect; REASON='worker connected'
hello_remote.from = 55b24a7c80853818-30376-22c2205c4835
[11908] NOTE at dmtcp_coordinator.cpp:643 in onData; REASON='Updating process Information after exec()'
progname = simple
msg.from = 55b24a7c80853818-221000-22c220b60ada
client->identity() = 55b24a7c80853818-30374-22c2202e8d96
@planetA
planetA / dists.ipynb
Created May 23, 2017 10:00
Distance distribution
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import matplotlib.pyplot as plt
import numpy as np
import networkx as nx
import pandas as pd
import random
def random_interleaving(a, b):
""" Generate a random interleaving for sequences a and b"""
if len(a) == 0 or len(b) == 0:
return a + b
@planetA
planetA / coordinator.log
Created August 22, 2017 15:51
Log from coordinator
[15886] NOTE at dmtcp_coordinator.cpp:757 in initializeComputation; REASON='Resetting computation'
[15886] NOTE at dmtcp_coordinator.cpp:975 in validateRestartingWorkerProcess; REASON='FIRST dmtcp_restart connection. Set numPeers. Generate timestamp'
numPeers = 8
curTimeStamp = 4844149844226136
compId = 4b3242429168a16a-40000-113564b9a89a88
[15886] NOTE at dmtcp_coordinator.cpp:1329 in updateCheckpointInterval; REASON='CheckpointInterval updated (for this computation only)'
oldInterval = 0
theCheckpointInterval = 0
[15886] NOTE at dmtcp_coordinator.cpp:900 in onConnect; REASON='worker connected'
hello_remote.from = 4b3242429168a16a-41000-113564bbb4abc2
@planetA
planetA / openssl.log
Created November 11, 2017 12:21
Certificate contents
$ openssl x509 -text -noout -in certs/domain.crt
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
c3:62:bb:00:42:c9:13:2b
Signature Algorithm: sha256WithRSAEncryption
Issuer: C = US, ST = Oregon, L = Portland, O = Company Name, OU = Org, CN = openmpi-dockerregistry.local
Validity
Not Before: Nov 11 12:06:14 2017 GMT
$ openssl x509 -text -noout -in certs/domain.crt
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
ab:8b:61:9a:20:ec:0b:a0
Signature Algorithm: sha256WithRSAEncryption
Issuer: C = US, ST = Oregon, L = Portland, O = Company Name, OU = Org, CN = *
Validity
Not Before: Nov 11 12:49:55 2017 GMT