quad_tracing [SRC] [CPP] [JOB] [SCAN]
TOOLS / SCRIPTS



   1 | #!/bin/sh
   2 | 
   3 | echo " QUAD_TRACING v1.0"
   4 | echo " Description :  Calculate how many times a cell is used for the quadrature"
   5 | 
   6 | #
   7 | # Path definitions
   8 | #
   9 | 
  10 | LOCALDIR=`pwd`
  11 | CHOICESD=$DOMHOME/TOOLS/CHOICES
  12 | TOOLEXEDIR=$DOMHOME/HOSTS/$DOM_HOSTTYPE
  13 | 
  14 | #
  15 | # Detect if all files are ready for run
  16 | #
  17 | 
  18 | if [ -f 'quad_tracing.choices' ]
  19 | then
  20 | 
  21 | #
  22 | #  Number of threads ?
  23 | #
  24 | numthread=$1
  25 | 	if [  $# -ne 1 ]
  26 | 	then
  27 | 		echo " How many threads do you want to perform the calculation?"
  28 | 		read numthread
  29 | 	fi 
  30 | 
  31 | 	export OMP_NUM_THREADS=$numthread
  32 |   	make clean -f $DOMHOME/TOOLS/QUAD_TRACING/Makefile 
  33 |   	
  34 | 	if [ $OMP_NUM_THREADS = 1 ]
  35 | 	then
  36 | 	make SEQ=yes -f $DOMHOME/TOOLS/QUAD_TRACING/Makefile all
  37 | 	else
  38 | 	make -f $DOMHOME/TOOLS/QUAD_TRACING/Makefile all
  39 |   	fi
  40 | 
  41 | 	$TOOLEXEDIR/quad_tracing_$DOM_VERSION.e_$DOM_HOSTTYPE
  42 | 
  43 | else
  44 |   echo " -- No quad_tracing.choices file found, copying default file."
  45 |   echo "    Fill choices file and run again quad_tracing"
  46 |   cp $CHOICESD/quad_tracing.choices .
  47 | fi