File: run

package info (click to toggle)
massivethreads 1.02-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,924 kB
  • sloc: ansic: 27,814; sh: 4,559; cpp: 3,334; javascript: 1,799; makefile: 1,745; python: 523; asm: 373; perl: 118; lisp: 9
file content (31 lines) | stat: -rwxr-xr-x 505 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash

USAGE="usage: $0 N STEPS WORKERS"

if [ "$#" != 3 ]; then
	echo ${USAGE}
	exit 1
fi

N=$1
STEPS=$2
WORKERS=$3
EXE=./nbody

if [ ! -f ${EXE} ]; then
	echo "Executable does not exist, building..."
	make -f Makefile
	if [ "$?" -eq 0 ]; then
		echo "Done."
	else
		echo "Build failed"
		exit 1
	fi
	echo ""
fi

export LD_LIBRARY_PATH=../../.libs
export MYTH_WORKER_NUM=${WORKERS}
export MALLOC_TRACE=nbody.log
echo "Executing ${EXE} ${N} ${STEPS} with ${WORKERS} workers..."
${EXE} ${N} ${STEPS}