Skip to content

Commit

Permalink
Merge branch 'master' into esa_opt
Browse files Browse the repository at this point in the history
  • Loading branch information
kloetzl committed Apr 10, 2015
2 parents 5403ae9 + c0df08d commit 420bf0a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
9 changes: 6 additions & 3 deletions src/andi.c
Expand Up @@ -125,9 +125,9 @@ int main( int argc, char *argv[]){
case 'j':
FLAGS |= F_JOIN;
break;
#ifdef _OPENMP
case 't':
{
#ifdef _OPENMP
errno = 0;
char *end;
long unsigned int threads = strtoul( optarg, &end, 10);
Expand All @@ -149,9 +149,12 @@ int main( int argc, char *argv[]){
}

THREADS = threads;
#else
warnx("This version of andi was built without OpenMP and thus "
"does not support multi threading. Ignoring -t argument.");
#endif
}
break;
#endif
case '?': /* intentional fall-through */
default:
usage();
Expand Down Expand Up @@ -239,7 +242,7 @@ void usage(void){
" -r, --raw Calculates raw distances; default: Jukes-Cantor corrected\n"
" -v, --verbose Prints additional information\n"
#ifdef _OPENMP
" -t <INT> The number of threads to be used; default: 1\n"
" -t <INT> The number of threads to be used; by default, all available processors are used\n"
#endif
" -h, --help Display this help and exit\n"
" --version Output version information and acknowledgments\n"
Expand Down
6 changes: 3 additions & 3 deletions test/test_join.sh
Expand Up @@ -11,7 +11,7 @@ tail -qn 2 p1.fasta p2.fasta p3.fasta > S1.fasta
rm p1.fasta p2.fasta p3.fasta;


RES=$($srcdir/src/andi -r -j S0.fasta S1.fasta |
RES=$($srcdir/src/andi -rt 1 -j S0.fasta S1.fasta |
tail -n 1 |
awk '{print ($2 - 0.1)}' |
awk 'function abs(x){return ((x < 0.0) ? -x : x)} {print abs($1-$2) < 0.01}'
Expand All @@ -33,7 +33,7 @@ tail -qn 2 p2.fasta p3.fasta > S1.fasta
rm p2.fasta p3.fasta;


RES=$($srcdir/src/andi -r -j S0.fasta S1.fasta |
RES=$($srcdir/src/andi -rt1 -j S0.fasta S1.fasta |
tail -n 1 |
awk '{print ($2 - 0.1)}' |
awk 'function abs(x){return ((x < 0.0) ? -x : x)} {print abs($1-$2) < 0.01}'
Expand All @@ -57,7 +57,7 @@ tail -qn 2 p1.fasta p2.fasta p3.fasta > S1.fasta
rm p1.fasta p2.fasta p3.fasta;


RES=$($srcdir/src/andi -r -j S0.fasta S1.fasta |
RES=$($srcdir/src/andi -rt 1 -j S0.fasta S1.fasta |
tail -n 1 |
awk '{print ($2 - 0.1)}' |
awk 'function abs(x){return ((x < 0.0) ? -x : x)} {print abs($1-$2) < 0.01}'
Expand Down
2 changes: 1 addition & 1 deletion test/test_random.sh
Expand Up @@ -8,7 +8,7 @@ do
do
res=$(./test/test_fasta -l $LENGTH -d $dist |
tee ./test/test_random.fasta |
./src/andi -r |
./src/andi -r -t 1 |
tail -n 1 |
awk -v dist=$dist '{print $2, dist}' |
awk 'function abs(x){return ((x < 0.0) ? -x : x)} {print abs($1-$2) < 0.01}')
Expand Down

0 comments on commit 420bf0a

Please sign in to comment.