diff --git a/include/main.h b/include/main.h index 884788d827c57bb8edf45c2f31f7bd0cc3ee511f..0b4422d3b144efd4f14a5bd5433e770c0a030a85 100644 --- a/include/main.h +++ b/include/main.h @@ -1,16 +1,5 @@ #pragma once #include "config.h" - -/* ================================================================================= */ -/*! \brief Flag allowing unique global data declaration - - \sa ___TEST_FEMBEM___ */ -#ifdef ___TEST_FEMBEM___ -#define _EXTERN_TEST_FEMBEM_ -#else -#define _EXTERN_TEST_FEMBEM_ extern -#endif -/* ================================================================================= */ #include <math.h> #include <complex.h> #include "hmat/hmat.h" diff --git a/include/util.h b/include/util.h index a135ef949cbd7db460c60580e93f8c5a810b0b52..f3b9efea891de8a39dd0a453036d4dd40e4f8287 100644 --- a/include/util.h +++ b/include/util.h @@ -28,16 +28,12 @@ #include <ctype.h> #include <limits.h> #include <float.h> -#include <stdbool.h> - -typedef enum { MPF_FALSE, MPF_TRUE } Logical; struct mpf_hmat_create_compression_args_t { int method; double threshold; const void * output; }; -int hmat_get_sync_exec(void) ; #if !(defined (_WIN32)) /* It's a UNIX system, I know this ! */ /* Try to detect a debugger. This relies on the fact that GDB and IDB diff --git a/src/main.c b/src/main.c index 7bd3e77f357f48cc4405c7fb92c18331cb0b7ea9..be84883730b225e0935abf05383e3cc083a316b4 100644 --- a/src/main.c +++ b/src/main.c @@ -1,24 +1,12 @@ -#define ___TEST_FEMBEM___ 1 - #include "main.h" hmat_interface_t * interface = NULL; double epsilon = 1e-3; hmat_progress_t progress; - -// instantiation of globales defined in main.h int nbRHS = 1; int sparseRHS; int nbPts = 16000; void *rhs = NULL; -void *solFMMfar = NULL; -void *solCLAfar = NULL; -void *solFMMnear = NULL; -void *solCLAnear = NULL; -int nbPtsPerLeaf = 50; -int nbAlgoRuns = 1; -char *sTYPE_ELEMENT_ARRAY_test_fembem[] = {NULL}; -int coupled = 0; double lambda; void update_progress(hmat_progress_t * ctx) { diff --git a/src/util.c b/src/util.c index fce4c96e193c736545f8757c77775d7fa05756a8..933abf9d290ebe27ee133a62ad2539f0957fb6a5 100644 --- a/src/util.c +++ b/src/util.c @@ -1,11 +1,5 @@ #include "main.h" -/*! \brief Logical to redirect error and warning messages toward stdout (used in SYS/SRC/error.c) */ -Logical MPF_errorStreamIsStdout = MPF_FALSE ; - -/* MPF_errorStreamIsStdout sert a renvoyer les messages d'erreur dans stdout */ -#define MPF_errorStream ((MPF_errorStreamIsStdout)?(stdout):(stderr)) - /* ================================================================================== */ /*! \brief Displays an error message with the location of this error in the source code @@ -24,10 +18,10 @@ int MpfError(int line,char *package,char *file,const char *function, int number, va_start (args,number) ; message = va_arg(args, char *) ; - fprintf(MPF_errorStream,"[-] ERROR "); + fprintf(stderr,"[-] ERROR "); if (strcmp("-",function)) - fprintf(MPF_errorStream,"in %30s() ",function) ; + fprintf(stderr,"in %30s() ",function) ; /* Cherche tous les "/src/" dans __FILE__, et si j'en trouve, j'affiche seulement a partir du dernier "src/..." */ pos=file ; @@ -37,14 +31,14 @@ int MpfError(int line,char *package,char *file,const char *function, int number, if (line != -1) { if (!package) - fprintf(MPF_errorStream,"([%s,%d] : ", pos, line) ; + fprintf(stderr,"([%s,%d] : ", pos, line) ; else - fprintf(MPF_errorStream,"[%s : %s,%d] : ",package,pos,line) ; + fprintf(stderr,"[%s : %s,%d] : ",package,pos,line) ; } if (message) - vfprintf(MPF_errorStream, message, args); - fprintf(MPF_errorStream,"\n"); - fflush(MPF_errorStream); + vfprintf(stderr, message, args); + fprintf(stderr,"\n"); + fflush(stderr); va_end(args); @@ -68,10 +62,10 @@ int MpfWarning(int line,char *package,char *file,const char *function,int number va_start (args,number) ; message = va_arg(args, char *) ; - fprintf(MPF_errorStream,"[-] WARNING "); + fprintf(stderr,"[-] WARNING "); if (strcmp("-",function)) - fprintf(MPF_errorStream,"in %30s() ",function) ; + fprintf(stderr,"in %30s() ",function) ; /* Cherche tous les "/src/" dans __FILE__, et si j'en trouve, j'affiche seulement a partir du dernier "src/..." */ pos=file ; @@ -81,14 +75,14 @@ int MpfWarning(int line,char *package,char *file,const char *function,int number if (line != -1) { if (!package) - fprintf(MPF_errorStream,"([%s,%d] : ", pos, line) ; + fprintf(stderr,"([%s,%d] : ", pos, line) ; else - fprintf(MPF_errorStream,"[%s : %s,%d] : ",package,pos,line) ; + fprintf(stderr,"[%s : %s,%d] : ",package,pos,line) ; } if (message) - vfprintf(MPF_errorStream, message, args); - fprintf(MPF_errorStream,"\n"); - fflush(MPF_errorStream); + vfprintf(stderr, message, args); + fprintf(stderr,"\n"); + fflush(stderr); va_end(args); @@ -464,8 +458,4 @@ double time_in_s(Time t) { double time_interval_in_seconds(Time t1, Time t2) { Time interval = time_interval(t1, t2); return time_in_s(interval); -} -/* ================================================================================== */ -int hmat_get_sync_exec(void) { - return 1; } \ No newline at end of file