From 9a78af8648e2e6b433e393aae72b6d52d0aa5045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?FEL=C5=A0=C3=96CI=20Marek?= <marek.felsoci@inria.fr> Date: Sun, 5 Nov 2023 17:50:13 +0100 Subject: [PATCH] Remove norm computation option --- include/main.h | 3 --- src/help.c | 1 - src/main.c | 7 ------- src/testHMAT.c | 22 ++++------------------ 4 files changed, 4 insertions(+), 29 deletions(-) diff --git a/include/main.h b/include/main.h index 7b00b8d..8507ad4 100644 --- a/include/main.h +++ b/include/main.h @@ -33,9 +33,6 @@ extern int nbPts; /*! \brief RHS for my tests */ extern void *rhs; -/*! \brief Flag to compute and display matrix norms during Hmat tests */ -extern int computeNorm; - /*! \brief Symmetry flag for the content of the matrices (0=nosym, 1=sym, 2=sym pos def, 1 by default) */ extern int symMatContent; diff --git a/src/help.c b/src/help.c index f2b301c..40beca8 100644 --- a/src/help.c +++ b/src/help.c @@ -16,7 +16,6 @@ int printHelp() { " -ptsperlambda: Points per wavelength on the main cylinder (for oscillatory kernels). Default: 10.\n" " --write-mesh: Write a VTK file 'mesh.vtu' of the mesh. Default is OFF.\n" " --write-mesh-unv: Write a UNV file 'mesh.unv' of the mesh. Default is OFF.\n" - " --compute_norm: Compute and display matrix norms during Hmat tests. Default: OFF.\n" "\n" " BEM tests use a surfacic cylinder with an optionnal cylinder detail, defined with:\n" " -radius: Radius of the cylinder. Default is 2.\n" diff --git a/src/main.c b/src/main.c index 4bcb575..6780315 100644 --- a/src/main.c +++ b/src/main.c @@ -17,7 +17,6 @@ char *sTYPE_ELEMENT_ARRAY_test_fembem[] = {NULL}; int coupled = 0; int partial_fembem = 0; int useDetail; -int computeNorm; int symMatContent = 1; int symMatSolver = 1; int simplePrec = 0; @@ -205,12 +204,6 @@ int main(int argc, char **argv) { printf("Double Complex\n"); } - /* --- Compute and display matrix norms during tests --- */ - if (MpfArgHasName(&argc, argv, 1, "--compute_norm") > 0) { - computeNorm = 1 ; - printf("Compute and display matrix norms during tests \n") ; - } - /* Setting remaining variables */ sparseRHS=(double)nbPts/80./log10((double)nbPts) ; if (sparseRHS<1) sparseRHS = 1; diff --git a/src/testHMAT.c b/src/testHMAT.c index 3f7a498..96ad02c 100644 --- a/src/testHMAT.c +++ b/src/testHMAT.c @@ -65,15 +65,8 @@ int testHMAT(double * relative_error) { temps_cpu = temps_final - temps_initial ; printf("<PERFTESTS> TpsCpuCreation%s = %f \n", postfix_async, temps_cpu) ; - /* Compute & display some informations (synchronous) */ - if (computeNorm) { - temps_initial = getTime (); - printf("Norm: %.16g\n", hi->norm(hmatrix)); - temps_final = getTime (); - temps_cpu = temps_final - temps_initial ; - printf("<PERFTESTS> TpsCpuNorm = %f \n", temps_cpu) ; - } - if (computeNorm || hmat_get_sync_exec()) { + /* display some informations (synchronous) */ + if (hmat_get_sync_exec()) { hmat_info_t info; hi->get_info(hmatrix, &info); printf("Compressed size: %ld\n", info.compressed_size); @@ -158,15 +151,8 @@ int testHMAT(double * relative_error) { temps_refine -= temps_cpu; // We do not count facto in the iterative refinement timer - /* Compute & display some informations (synchronous) */ - if (computeNorm) { - temps_initial = getTime (); - printf("Norm (factorized): %.16g\n", hi->norm(hmatrix)); - temps_final = getTime (); - temps_cpu = temps_final - temps_initial ; - printf("<PERFTESTS> TpsCpuNormFacto = %f \n", temps_cpu) ; - } - if (computeNorm || hmat_get_sync_exec()) { + /* display some informations (synchronous) */ + if (hmat_get_sync_exec()) { hmat_info_t info; hi->get_info(hmatrix, &info); printf("Compressed size: %ld\n", info.compressed_size); -- GitLab