Skip to content
Snippets Groups Projects
rapide.sh 665 B
Newer Older
#!/bin/bash

echo -e "pivot\tmelange\tpartiti\ttypeTab\ttaille\ttemps\tmem"

for pivot in 0 1 2;do
	for melange in 0 1;do
		( for partition in 0 1;do
			for typeTab in de cr co al;do
				taille=1000000
				while [ $taille -lt 10000000 ];do
					for i in $(seq 3);do
						#taille=$(( $(od -An -N4 -tu </dev/urandom) % 1000000 ))
						res=$(timeout 8 /usr/bin/time -f "%U\t%M" ./triRapide $typeTab $taille $pivot $melange $partition 2>&1)
						if [ $? -eq 124 ];then
							res="NA\tNA"
						fi
						echo -e "$pivot\t$melange\t$partition\t$typeTab\t$taille\t$res"
					done
					taille=$(($taille+1000000))
				done
			done
		done ) & # 3*2=6 threads
	done
done