-# check if we still have at least one parameter beyond options
-if [ $# -eq 0 ]
-then
- echo "Error: no program to execute!"
- usage
- exit
-fi
+if [ -n "${APP_TRACES}" ] ; then
+ if [ $# -eq 0 ] ; then
+ EXEC="@SMPIREPLAYMAIN@"
+ else
+ EXEC="$1"
+ shift
+ fi
+else
+ # check if we still have at least one parameter beyond options
+ if [ $# -eq 0 ]
+ then
+ echo "Error: no program to execute!"
+ usage
+ exit
+ fi