Skip to content

Commit 813a5ef

Browse files
authored
Merge pull request #2129 from arcaneframework/dev/jmg-update-alien-bench
Dev/jmg update alien bench
2 parents d700617 + 8a9d333 commit 813a5ef

File tree

7 files changed

+161
-18
lines changed

7 files changed

+161
-18
lines changed

alien/ArcaneInterface/modules/ifpen_solvers/src/alien/kernels/hts/data_structure/HTSInternal.h

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
#ifndef ALIEN_HTSIMPL_MTLINTERNAL_H
2-
#define ALIEN_HTSIMPL_MTLINTERNAL_H
3-
/* Author :
4-
*/
1+
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2+
//-----------------------------------------------------------------------------
3+
// Copyright 2000-2025 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4+
// See the top-level COPYRIGHT file for details.
5+
// SPDX-License-Identifier: Apache-2.0
6+
//-----------------------------------------------------------------------------
7+
#pragma once
58

69
//! Internal struct for HTS implementation
710
/*! Separate data from header;
@@ -10,17 +13,14 @@
1013

1114
#include <alien/distribution/MatrixDistribution.h>
1215

13-
#include "HARTSSolver/HARTSSolverConfig.h"
14-
16+
#ifdef ALIEN_USE_HARTS
1517
#include "HARTS/HARTS.h"
18+
#endif
1619

1720
#ifdef ALIEN_USE_HTSSOLVER
1821
#include "HARTSSolver/HTS.h"
1922
#include "HARTSSolver/MatrixVector/CSR/CSRProfile.h"
2023
#include "HARTSSolver/MatrixVector/CSR/CSRMatrix.h"
21-
#endif
22-
23-
//#include "Resources.h"
2424

2525
#include "HARTSSolver/Utils/TraceMng.h"
2626
#include "HARTSSolver/Utils/ArrayUtils.h"
@@ -47,6 +47,7 @@
4747
#include "HARTSSolver/MatrixVector/DistUtils/SendRecvOp.h"
4848
#include "HARTSSolver/MatrixVector/DistUtils/DistStructInfo.h"
4949
#include "HARTSSolver/MatrixVector/MCCSR/MCCSRMatrix.h"
50+
#endif
5051

5152
/*---------------------------------------------------------------------------*/
5253

@@ -212,5 +213,3 @@ template <typename ValueT, bool is_mpi = true> class VectorInternal
212213

213214
END_HTSINTERNAL_NAMESPACE
214215

215-
/*---------------------------------------------------------------------------*/
216-
#endif /* ALIEN_MTLIMPL_MTLINTERNAL_H */

alien/ArcaneInterface/modules/ifpen_solvers/src/alien/kernels/hts/eigen_solver/HTSInternalEigenSolver.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2+
//-----------------------------------------------------------------------------
3+
// Copyright 2000-2025 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4+
// See the top-level COPYRIGHT file for details.
5+
// SPDX-License-Identifier: Apache-2.0
6+
//-----------------------------------------------------------------------------
17

2-
/* Author : desrozis at Mon Mar 30 15:06:37 2009
3-
* Generated by createNew
4-
*/
58
#define MPICH_SKIP_MPICXX 1
69
#include "mpi.h"
710

@@ -15,7 +18,6 @@
1518

1619
#ifdef ALIEN_USE_HTSSOLVER
1720
#include "HARTSSolver/HTS.h"
18-
//#include "HARTSSolver/MatrixVector/CSR/CSRProfileImpT.h"
1921
#include "HARTSSolver/MatrixVector/CSR/CSRMatrixImpT.h"
2022
#endif
2123

alien/ArcaneInterface/modules/ifpen_solvers/src/alien/kernels/hts/eigen_solver/arcane/HTSEigenSolver.cc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
1+
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2+
//-----------------------------------------------------------------------------
3+
// Copyright 2000-2025 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4+
// See the top-level COPYRIGHT file for details.
5+
// SPDX-License-Identifier: Apache-2.0
6+
//-----------------------------------------------------------------------------
27

38
/**
49
* Interface du service de résolution de système linéaire
510
*/
611
#include "alien/AlienLegacyConfig.h"
12+
#ifdef ALIEN_USE_HARTS
713
#include "HARTS/HARTS.h"
14+
#endif
15+
#ifdef ALIEN_USE_HTSSOLVER
816
#include "HARTSSolver/HTS.h"
17+
#endif
918
#include <alien/kernels/hts/eigen_solver/arcane/HTSEigenSolver.h>
1019
#include <ALIEN/axl/HTSEigenSolver_StrongOptions.h>
1120

alien/ArcaneInterface/modules/ifpen_solvers/src/alien/kernels/hts/linear_solver/HTSInternalLinearSolver.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
22
//-----------------------------------------------------------------------------
3-
// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
3+
// Copyright 2000-2025 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
44
// See the top-level COPYRIGHT file for details.
55
// SPDX-License-Identifier: Apache-2.0
66
//-----------------------------------------------------------------------------

alien/ArcaneInterface/modules/ifpen_solvers/src/alien/kernels/hts/linear_solver/arcane/HTSLinearSolver.cc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
1+
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2+
//-----------------------------------------------------------------------------
3+
// Copyright 2000-2025 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4+
// See the top-level COPYRIGHT file for details.
5+
// SPDX-License-Identifier: Apache-2.0
6+
//-----------------------------------------------------------------------------
27

38
/**
49
* Interface du service de résolution de système linéaire
510
*/
611
#include "alien/AlienLegacyConfig.h"
12+
#ifdef ALIEN_USE_HARTS
713
#include "HARTS/HARTS.h"
14+
#endif
15+
#ifdef ALIEN_USE_HTSSOLVER
816
#include "HARTSSolver/HTS.h"
17+
#endif
918
#include <alien/kernels/hts/linear_solver/arcane/HTSLinearSolver.h>
1019
#include <ALIEN/axl/HTSSolver_StrongOptions.h>
1120

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version='1.0' encoding='ISO-8859-1'?>
2+
<case codeversion="1.0" codename="AlienBench" xml:lang="en">
3+
<arcane>
4+
<title>Test unitaires des solveurs lineaires</title>
5+
<timeloop>BenchLoop</timeloop>
6+
</arcane>
7+
8+
<arcane-post-processing>
9+
<output-period>1</output-period>
10+
<output>
11+
<variable>U</variable>
12+
<variable>X</variable>
13+
<variable>K</variable>
14+
<variable>S</variable>
15+
</output>
16+
</arcane-post-processing>
17+
18+
<mesh>
19+
<meshgenerator>
20+
<cartesian>
21+
<origine>0. 0. 0.</origine>
22+
<nsd>1 1 1</nsd>
23+
<lx nx="100">1.</lx>
24+
<ly ny="100">1.</ly>
25+
<lz nz="10">1.</lz>
26+
</cartesian>
27+
</meshgenerator>
28+
</mesh>
29+
30+
31+
<alien-bench>
32+
<use-accelerator>false</use-accelerator>
33+
<!-- big diagonal-coefficient keep diagonal dominant matrix -->
34+
<diagonal-coefficient>0.01</diagonal-coefficient>
35+
<!--lambdax>0.125</lambdax>
36+
<lambday>0.25</lambday>
37+
<alpha>10.</alpha>
38+
<sigma>1000000.</sigma>
39+
<epsilon>0.01</epsilon-->
40+
<homogeneous>true</homogeneous>
41+
<zero-rhs>false</zero-rhs>
42+
<nb-resolutions>1</nb-resolutions>
43+
<!--alien-core-solver>
44+
<backend>SYCL</backend>
45+
<solver>BCGS</solver>
46+
<preconditioner>Diag</preconditioner>
47+
<max-iter>1000</max-iter>
48+
<tol>1.e-6</tol>
49+
<output-level>1</output-level>
50+
</alien-core-solver-->
51+
52+
<linear-solver name="HypreSolver">
53+
<exec-space>Host</exec-space>
54+
<memory-type>Host</memory-type>
55+
<solver>BiCGStab</solver>
56+
<num-iterations-max>1000</num-iterations-max>
57+
<stop-criteria-value>1e-6</stop-criteria-value>
58+
<preconditioner>FSAI</preconditioner>
59+
<verbose>true</verbose>
60+
</linear-solver>
61+
</alien-bench>
62+
</case>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version='1.0' encoding='ISO-8859-1'?>
2+
<case codeversion="1.0" codename="AlienBench" xml:lang="en">
3+
<arcane>
4+
<title>Test unitaires des solveurs lineaires</title>
5+
<timeloop>BenchLoop</timeloop>
6+
</arcane>
7+
8+
<arcane-post-processing>
9+
<output-period>1</output-period>
10+
<output>
11+
<variable>U</variable>
12+
<variable>X</variable>
13+
<variable>K</variable>
14+
<variable>S</variable>
15+
</output>
16+
</arcane-post-processing>
17+
18+
<mesh>
19+
<meshgenerator>
20+
<cartesian>
21+
<origine>0. 0. 0.</origine>
22+
<nsd>1 1 1</nsd>
23+
<lx nx="100">1.</lx>
24+
<ly ny="100">1.</ly>
25+
<lz nz="10">1.</lz>
26+
</cartesian>
27+
</meshgenerator>
28+
</mesh>
29+
30+
31+
<alien-bench>
32+
<use-accelerator>false</use-accelerator>
33+
<!-- big diagonal-coefficient keep diagonal dominant matrix -->
34+
<diagonal-coefficient>0.01</diagonal-coefficient>
35+
<lambdax>0.125</lambdax>
36+
<lambday>0.25</lambday>
37+
<alpha>100.</alpha>
38+
<sigma>1000000.</sigma>
39+
<epsilon>0.01</epsilon>
40+
<homogeneous>true</homogeneous>
41+
<zero-rhs>false</zero-rhs>
42+
<nb-resolutions>1</nb-resolutions>
43+
<!--alien-core-solver>
44+
<backend>SYCL</backend>
45+
<solver>BCGS</solver>
46+
<preconditioner>Diag</preconditioner>
47+
<max-iter>1000</max-iter>
48+
<tol>1.e-6</tol>
49+
<output-level>1</output-level>
50+
</alien-core-solver-->
51+
52+
<linear-solver name="HypreSolver">
53+
<exec-space>Host</exec-space>
54+
<memory-type>Host</memory-type>
55+
<solver>BiCGStab</solver>
56+
<num-iterations-max>1000</num-iterations-max>
57+
<stop-criteria-value>1e-12</stop-criteria-value>
58+
<preconditioner>BJ-ILUK</preconditioner>
59+
<verbose>true</verbose>
60+
</linear-solver>
61+
</alien-bench>
62+
</case>

0 commit comments

Comments
 (0)