stingergraph / stinger

The STINGER in-memory graph store and dynamic graph analysis platform. Millions to billions of vertices and edges at thousands to millions of updates per second.
http://www.stingergraph.com
Other
209 stars 63 forks source link

Running bin/server in background fails #32

Closed jpfairbanks closed 10 years ago

jpfairbanks commented 10 years ago

It seems like a good idea to have a script like this work

#!/usr/bin/env bash
#stingerlaunch: Launches a stinger server and computes things.
#example: stingerlaunch NV BSIZE NBATCHES
#will generate pageranks on a NV vertex RMAT graph.

#PARAMETERS to the algorithms
NV=$1
BSIZE=$2
NBATCHES=$3

#DIRECTORY SET UP
STINGERROOT="$HOME/stinger/build"
SBIN="$STINGERROOT/bin"
LOGDIR="./log"
mkdir -p $LOGDIR
DATADIR="./rslt"
mkdir -p $DATADIR

$SBIN/pagerank 1> $LOGDIR/pagerank.out 2> $LOGDIR/pagerank.err &
$SBIN/rmat_edge_generator -n $NV -x $BSIZE -y $NBATCHES 1> $LOGDIR/rmat.out 2> $LOGDIR/rmat.err &
$SBIN/server -k 1> $LOGDIR/server.out 2> $LOGDIR/server.err 

That way you could launch a bunch of algorithms and recover the logs in an automated way. Right now this works if I run the algorithms and server in screen/tmux windows but not if I bg the processes as they are spawned. Is there a workaround or is tmux the way to go?

davidediger commented 10 years ago

The server is waiting on stdin for the "q" key to end. Start the server with "-d".

You probably want this order, though:

$SBIN/server -d pause 2 $SBIN/pagerank $SBIN/rmat_edge_generator

jpfairbanks commented 10 years ago

So how do you stop it with -d? Send a signal to the process?

robmccoll commented 10 years ago

We should add proper signal handling, but for now, I guess SIGKILL :-/