Commit c63ab510 authored by Ben Hazelwood's avatar Ben Hazelwood
Browse files

Start rank performance experiment - always sleep for 0.1s for simplicity

parent 34d04f0a
......@@ -24,18 +24,10 @@ void registerSignalHandler() {
shouldCorruptData = false;
}
void pauseThisRankSignalHandler( int signum ) {
const int startValue = 1e4;
#if SLEEP_MULT != 0
const int multiplier = SLEEP_MULT;
#else
const int multiplier = ((double) rand() / (RAND_MAX)) + 1;
#endif
static int sleepLength = startValue;
logInfo( "Signal received: sleep for " << (double)sleepLength / 1e6 << "s");
void pauseThisRankSignalHandler( int signum ) {
const double sleepLength = 0.1 * 1e6;
logInfo( "Signal received: sleep for 0.1s");
usleep(sleepLength);
sleepLength *= multiplier;
}
void corruptThisRankSignalHandler( int signum ) {
......
if (( $# < 4)); then
echo "ERROR: At least four parameters are required"
echo "Usage: { constant | increasing | random } { single | rr | random } application [application args...]"
exit 1
fi
echo "Execute ${@:3} &"
sleep 5
pids=($(pgrep $3))
while kill -0 ${pids[0]}; do
if [ $2 = "single" ]; then
# Select same rank each time
fi
if [ $2 = "rr" ]; then
#select next rank
fi
if [ $2 = "random" ]; then
#select a random rank
fi
kill -USR1 $rank
if [ $1 = "constant" ]; then
# wait 5s
fi
if [ $1 = "increasing" ]; then
#wait 50s, 25s, 12.5s...
fi
if [ $1 = "random"]; then
#wait rand(0.1, 100)
fi
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment