Skip to content

Instantly share code, notes, and snippets.

@sithhell
sithhell / A.cpp
Last active February 6, 2018 12:34
Outcome ODR
#include "A.hpp"
namespace A
{
A::result foo()
{
return 5;
}
}
PARTITION NODES SOCKETS CORES THREAD GRES NODES(A/I/O/T)
siegfried* 2 2 8 2 gpu:k40m:2 0/2/0/2
siegfried* 1 2 8 2 gpu:k20c:2 0/1/0/1
siegfried* 1 2 8 2 gpu:k20c:1,mic:knc:1 0/1/0/1
whistler 20 2 2 1 (null) 0/20/0/20
accel 1 2 6 1 gpu:k20c:5 0/1/0/1
accel 2 2 12 2 (null) 0/2/0/2
cell 0 0 0 0 (null) 0/0/0/0
knc 1 2 8 2 mic:knc:2 0/1/0/1
intel 1 1 1 1 (null) 0/1/0/1
double run_parallel_algorithm(std::size_t n)
{
std::vector<double> d = make_vector(n);
hpx::util::high_resolution_timer t;
std::size_t cores = hpx::get_os_thread_count();
std::size_t chunk_size = (d.size() + cores - 1) / cores;
std::size_t count = n + chunk_size - 1;
std::vector<hpx::future<void>> chunks;
This file has been truncated, but you can view the full file.
TACC: Starting up job 2877659
TACC: Setting up parallel environment for MVAPICH2+mpispawn.
TACC: Starting parallel tasks...
/agas{locality#0/total}/count/decrement_credit,1,8.145300,[s],17
/agas{locality#1/total}/count/decrement_credit,1,8.009955,[s],5
/agas{locality#2/total}/count/decrement_credit,1,8.008736,[s],5
/agas{locality#3/total}/count/decrement_credit,1,7.989132,[s],7
/agas{locality#4/total}/count/decrement_credit,1,8.008141,[s],5
/agas{locality#5/total}/count/decrement_credit,1,8.000879,[s],7
/agas{locality#6/total}/count/decrement_credit,1,8.005112,[s],5
#include <boost/phoenix.hpp>
int main()
{
using boost::phoenix::arg_names::arg1;
using boost::phoenix::arg_names::arg2;
using boost::phoenix::arg_names::arg3;
using boost::phoenix::local_names::_a;
using boost::phoenix::local_names::_b;
using boost::phoenix::lambda;
@sithhell
sithhell / gist:6768237
Created September 30, 2013 18:45
valgrind example
[13:43:37]:heller@c558-302.stampede.tacc.utexas.edu:/work/02405/heller/build/hpx/relwithdeb-host:0:$ time ./bin/hello_world
hello world from OS-thread 4 on locality 0
hello world from OS-thread 7 on locality 0
hello world from OS-thread 0 on locality 0
hello world from OS-thread 14 on locality 0
hello world from OS-thread 13 on locality 0
hello world from OS-thread 9 on locality 0
hello world from OS-thread 2 on locality 0
hello world from OS-thread 12 on locality 0
hello world from OS-thread 3 on locality 0
@sithhell
sithhell / config.sh
Last active December 22, 2015 04:19
Example SLURM script to be used on Stampede. This script can be submitted with "sbatch sample.job". It runs the application on two nodes, using 16 cores per node.
#!/bin/bash
if [ -f CMakeCache.txt ]; then
rm -rf CMakeCache.txt
fi
cmake -DHPX_NO_INSTALL=True \
-DCMAKE_AR=$ICC_BIN/xiar \
-DCMAKE_CXX_COMPILER=$ICC_BIN/icpc \
-DCMAKE_C_COMPILER=$ICC_BIN/icc \
diff -r 1400018dc59a src/parallelization/hiparsimulator/partitionmanager.h
--- a/src/parallelization/hiparsimulator/partitionmanager.h Thu Aug 08 06:31:20 2013 -0500
+++ b/src/parallelization/hiparsimulator/partitionmanager.h Tue Aug 20 07:59:22 2013 -0500
@@ -66,12 +66,7 @@
CoordBox<DIM> ownBoundingBox = ownExpandedRegion().boundingBox();
for (unsigned i = 0; i < boundingBoxes.size(); ++i) {
- if (i != rank &&
- boundingBoxes[i].intersects(ownBoundingBox) &&
- (!(getRegion(rank, ghostZoneWidth) &
@sithhell
sithhell / latency.html
Created July 25, 2013 14:28
HPX Parcelport latencies
<script type="text/javascript" src="//ajax.googleapis.com/ajax/static/modules/gviz/1.0/chart.js"> {"dataSourceUrl":"//docs.google.com/spreadsheet/tq?key=0AlIgT7hBEdsndDVKVjV2Yks5OFNNTHJqQnNzSmJhc2c&transpose=0&headers=1&range=A1%3AE22&gid=0&pub=1","options":{"titleTextStyle":{"bold":true,"color":"#000","fontSize":16},"vAxes":[{"title":null,"useFormatFromData":true,"minValue":null,"viewWindowMode":"explicit","viewWindow":{"min":null,"max":2000},"maxValue":2000},{"useFormatFromData":true,"minValue":null,"viewWindow":{"min":null,"max":null},"maxValue":null}],"title":"Latency of different HPX Parcelports","curveType":"","booleanRole":"certainty","animation":{"duration":500},"legend":"right","lineWidth":2,"useFirstColumnAsDomain":true,"hAxis":{"useFormatFromData":false,"formatOptions":{"source":"inline","scaleFactor":"1000000"},"minValue":null,"format":"0.##","viewWindow":{"min":null,"max":null},"logScale":true,"maxValue":null},"tooltip":{},"width":955,"height":671},"state":{},"view":{},"isDefaultVisualization":tr
@sithhell
sithhell / Makefile
Created July 12, 2013 13:30
cereal multiple definition example. compile with: CEREAL_INCLUDE=/path/to/cereal/include make
all: main
b.o: b.cpp b.hpp a.hpp
g++ -std=c++11 -c b.cpp -I$(CEREAL_INCLUDE)
c.o: c.cpp c.hpp a.hpp
g++ -std=c++11 -c c.cpp -I$(CEREAL_INCLUDE)
main: main.cpp b.o c.o