compile_dag_result.sh 2.51 KB
Newer Older
Martin Khannouz's avatar
Martin Khannouz committed
1 2
#!/bin/sh
export SCALFMM_SIMGRIDOUT='scalfmm.out'
3
export GROUP_SIZE=50
4
export TREE_HEIGHT=5
5
export NB_NODE=4
6
#export NB_PARTICLE_PER_NODE=$(( (`awk "BEGIN{print 8 ** ($TREE_HEIGHT-1)}"` / $NB_NODE) ))
7
export NB_PARTICLE_PER_NODE=50000
8 9
export STARPU_NCPU=1
export STARPU_FXT_PREFIX=`pwd`/
10

11 12 13 14 15
echo "GROUP_SIZE=$GROUP_SIZE"
echo "TREE_HEIGHT=$TREE_HEIGHT"
echo "NB_NODE=$NB_NODE"
echo "NB_PARTICLE_PER_NODE=$NB_PARTICLE_PER_NODE"

16
#Compile only what we need
17
time make testBlockedImplicitChebyshev testBlockedMpiChebyshev testBlockedImplicitAlgorithm testBlockedMpiAlgorithm compareDAGmapping  -j $((`nproc`*2))
Martin Khannouz's avatar
Martin Khannouz committed
18 19 20
if [ $? -ne 0 ]; then
	exit
fi
21

22 23 24 25 26 27 28 29 30 31
test_kernel()
{
	#Execute explicit mpi version
	mpiexec -n $NB_NODE ./Tests/Release/testBlockedMpiAlgorithm -nb $NB_PARTICLE_PER_NODE -bs $GROUP_SIZE -h $TREE_HEIGHT
	if [ $? -ne 0 ]; then
		echo
		echo " /!\\Error on explicit"
		echo
		exit
	fi
Martin Khannouz's avatar
Martin Khannouz committed
32

33 34 35 36 37 38 39
	#Aggregate task information from explicit execution
	a=`ls $SCALFMM_SIMGRIDOUT\_*`
	rm -f $SCALFMM_SIMGRIDOUT
	for i in $a; do
		cat $i >> $SCALFMM_SIMGRIDOUT
		rm -f $i
	done
40

41 42
	#Get task information
	cp -f $SCALFMM_SIMGRIDOUT scalfmm_explicit.out
43

44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
	#Execute implicit version
	mpiexec -n $NB_NODE ./Tests/Release/testBlockedImplicitAlgorithm -nb $NB_PARTICLE_PER_NODE -bs $GROUP_SIZE -h $TREE_HEIGHT
	if [ $? -ne 0 ]; then
		echo
		echo " /!\\Error on implicit"
		echo
		exit
	fi

	#Get task information
	cp -f $SCALFMM_SIMGRIDOUT\_0 scalfmm_implicit.out
	rm -f $SCALFMM_SIMGRIDOUT\_*


	#Compare DAGs
	./Tests/Release/compareDAGmapping -e scalfmm_explicit.out -i scalfmm_implicit.out -h $TREE_HEIGHT > output
}
chebyshev_kernel()
{
	mpiexec -n $NB_NODE ./Tests/Release/testBlockedMpiChebyshev -nb $NB_PARTICLE_PER_NODE -bs $GROUP_SIZE -h $TREE_HEIGHT
	if [ $? -ne 0 ]; then
		echo
		echo " /!\\Error on explicit Chebyshev"
		echo
		exit
	fi

	##Aggregate task information from explicit execution
	a=`ls $SCALFMM_SIMGRIDOUT\_*`
	rm -f $SCALFMM_SIMGRIDOUT
	for i in $a; do
		cat $i >> $SCALFMM_SIMGRIDOUT
		rm -f $i
	done

	#Get task information
	cp -f $SCALFMM_SIMGRIDOUT scalfmm_explicit.out

82
	mpiexec -n $NB_NODE ./Tests/Release/testBlockedImplicitChebyshev -nb $NB_PARTICLE_PER_NODE -bs $GROUP_SIZE -h $TREE_HEIGHT > pieuvre
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
	if [ $? -ne 0 ]; then
		echo
		echo " /!\\Error on implicit Chebyshev"
		echo
		exit
	fi

	#Get task information
	cp -f $SCALFMM_SIMGRIDOUT\_0 scalfmm_implicit.out
	rm -f $SCALFMM_SIMGRIDOUT\_*


	#Compare DAGs
	./Tests/Release/compareDAGmapping -e scalfmm_explicit.out -i scalfmm_implicit.out -h $TREE_HEIGHT > narval
}

99
#test_kernel
100
chebyshev_kernel
101