diff --git a/src/util.c b/src/util.c index c8825a4b09e9cf9435f8a178cc8d6d657549b6ba..ce1dec436ae9218463fe3fb4cca18a199df19441 100644 --- a/src/util.c +++ b/src/util.c @@ -496,13 +496,7 @@ void mpf_hmat_compression(struct mpf_hmat_create_compression_args_t *args) { int SCAB_Init(int* argc, char*** argv) { int ierr; - /* -------------------------------- */ - /* -- Gestion du solveur HMATRIX -- */ - /* -------------------------------- */ -#ifdef HAVE_HMAT printf( "HMATRIX solver\n"); - hmat_settings_t settings; - hmat_get_parameters(&settings); memset(&mpf_hmat_settings, 0, sizeof(mpf_hmat_settings)); mpf_hmat_settings.factorization_type = hmat_factorization_none; @@ -510,6 +504,7 @@ int SCAB_Init(int* argc, char*** argv) { mpf_hmat_settings.compressionMethod = hmat_compress_aca_plus; mpf_hmat_settings.epsilon = 1e-3; mpf_hmat_settings.max_leaf_size = -1; + mpf_hmat_settings.engine = mpf_hmat_seq; if(strcmp(hmat_get_version(), HMAT_VERSION)) printf( "***\n*** hmat version %s (compiled with version %s)\n", hmat_get_version(), HMAT_VERSION); else @@ -525,90 +520,7 @@ int SCAB_Init(int* argc, char*** argv) { printf("[HMat] Recompression epsilon: %e\n", mpf_hmat_settings.epsilon ); } - if (MpfArgHasName( argc, *argv, 1, "--hmat-svd" ) > 0) { - printf("[HMat] Using SVD compression\n"); - mpf_hmat_settings.compressionMethod = hmat_compress_svd; - } - if (MpfArgHasName( argc, *argv, 1, "--hmat-aca-partial" ) > 0) { - printf("[HMat] Using ACA with partial pivoting\n"); - mpf_hmat_settings.compressionMethod = hmat_compress_aca_partial; - } - if (MpfArgHasName( argc, *argv, 1, "--hmat-aca-full" ) > 0) { - printf("[HMat] Using ACA with full pivoting\n"); - mpf_hmat_settings.compressionMethod = hmat_compress_aca_full; - } - if (MpfArgHasName( argc, *argv, 1, "--hmat-aca-plus" ) > 0) { - printf("[HMat] Using ACA+\n"); - mpf_hmat_settings.compressionMethod = hmat_compress_aca_plus; - } - - if (MpfArgHasName( argc, *argv, 1, "--hmat-lu" ) > 0) { - printf("[HMat] Force LU decomposition\n"); - mpf_hmat_settings.factorization_type = hmat_factorization_lu; - } - if (MpfArgHasName( argc, *argv, 1, "--hmat-llt" ) > 0) { - printf("[HMat] Force LLt decomposition (for symmetric matrices)\n"); - mpf_hmat_settings.factorization_type = hmat_factorization_llt; - } - if (MpfArgHasName( argc, *argv, 1, "--hmat-ldlt" ) > 0) { - printf("[HMat] Force LDLt decomposition (for symmetric matrices)\n"); - mpf_hmat_settings.factorization_type = hmat_factorization_ldlt; - } - - if (MpfArgHasName( argc, *argv, 1, "--hmat-seq" ) > 0) { - printf("[HMat] Use the sequential runtime\n"); - mpf_hmat_settings.engine = mpf_hmat_seq; - } - - if (MpfArgGetInt(argc, *argv, 1, "--hmat-leaf-size", &mpf_hmat_settings.max_leaf_size)) - printf("[HMat] Maximum leaf size: %d\n", mpf_hmat_settings.max_leaf_size); - - if (MpfArgHasName( argc, *argv, 1, "--hmat-coarsening" ) > 0) { - printf("[HMat] Coarsening of the HMatrix\n"); - settings.coarsening = 1; - } - - /* Validate the detection of null rows and columns */ - if (MpfArgHasName( argc, *argv, 1, "--hmat-val-null" ) > 0) { - printf("[HMat] Validate the detection of null rows and columns\n"); - settings.validateNullRowCol = 1; - } - - /* Validation of the Rk compression (with SVD, ACA, ...) */ - if (MpfArgHasName( argc, *argv, 1, "--hmat-val" ) > 0) { - printf("[HMat] Validate the rk-matrices after compression \n"); - settings.validateCompression = 1; - } - if (MpfArgGetDouble( argc, *argv, 1, "--hmat-val-threshold", &settings.validationErrorThreshold )) { - printf("[HMat] Error threshold for the compression validation : %e\n", settings.validationErrorThreshold); - } - if (MpfArgHasName( argc, *argv, 1, "--hmat-dump-trace" ) > 0) { - printf("[HMat] Dump trace at the end of the algorithms (depends on the runtime)\n"); - settings.dumpTrace = 1; - } - - if (MpfArgHasName( argc, *argv, 1, "--hmat-val-rerun" ) > 0) { - printf("[HMat] For blocks above error threshold, re-run the compression algorithm \n"); - settings.validationReRun = 1; - } - if (MpfArgHasName( argc, *argv, 1, "--hmat-val-dump" ) > 0) { - printf("[HMat] For blocks above error threshold, dump the faulty block to disk\n"); - settings.validationDump = 1; - } - - hmat_set_parameters(&settings); - mpf_hmat_settings.progress.update = update_progress; -#endif - - /* Option to set environment variable on the command line - '--putenv toto=titi' will set the variable environment 'toto' to the value 'titi' through a call to putenv(). - This option can appear several time, hence the 'while'. */ - char *variable; - while (MpfArgGetString( argc, *argv, 1, "--putenv" , &variable )) { - printf("Setting environment variable: %s \n", variable) ; - ierr=putenv(variable); CHKERRQ(ierr); - } /*! \brief Abort timer (in seconds)