diff --git a/src/libecoprimer/strictprimers.c b/src/libecoprimer/strictprimers.c index 5a1eaaa..d54bde7 100644 --- a/src/libecoprimer/strictprimers.c +++ b/src/libecoprimer/strictprimers.c @@ -5,14 +5,18 @@ * Author: coissac */ +#define _GNU_SOURCE #include "ecoprimer.h" #include #include #include #include +#include +#ifndef RUSAGE_SELF #define RUSAGE_SELF 0 #define RUSAGE_CHILDREN -1 +#endif static double timeval_subtract (struct timeval *x, struct timeval *y); @@ -187,7 +191,8 @@ pwordcount_t lookforStrictPrimer(pecodnadb_t database, uint32_t seqdbsize, seconde = timeval_subtract(&(usage.ru_utime),&(start.ru_utime)) + timeval_subtract(&(usage.ru_stime),&(start.ru_stime)); fprintf(logfile,"%d\t%llu\t%lu\t%8.3f\t%8.3e\n",i, - totallength,strictprimers->size*sizeof(int64_t), + (long long unsigned)totallength, + strictprimers->size*sizeof(int64_t), seconde,seconde/(double)totallength); fclose(logfile); } @@ -195,7 +200,9 @@ pwordcount_t lookforStrictPrimer(pecodnadb_t database, uint32_t seqdbsize, else strictprimers->outseqcount++; - fprintf(stderr," Indexed sequences %5d/%5d : considered words %-10d \r",(int32_t)i+1,(int32_t)seqdbsize,strictprimers->size); + fprintf(stderr," Indexed sequences %5d/%5d : considered words %-10llu \r", + (int32_t)i+1,(int32_t)seqdbsize, + (long long unsigned)strictprimers->size); // DEBUG_LOG("First word : %s ==> %d",ecoUnhashWord(strictprimers->words[0],18),strictprimers->incount[0]) // DEBUG_LOG("Second word : %s ==> %d",ecoUnhashWord(strictprimers->words[1],18),strictprimers->incount[1])