You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Version 1.2.0 | December 23, 2025 |[{:height="24px" width="24px"}](https://github.com/sfilippone/amg4psblas/archive/refs/tags/v1.2.0.zip)[{:height="24px" width="24px"}](https://github.com/sfilippone/amg4psblas/archive/refs/tags/v1.2.0.tar.gz)|[{:height="24px" width="24px"}](https://psctoolkit.github.io/amg4psblasguide/amg4psblas_1.2-guide.pdf){:target="_blank"} | PSBLAS 3.9.0 |
42
43
| Version 1.2-rc3 | July 23, 2025 |[{:height="24px" width="24px"}](https://github.com/sfilippone/amg4psblas/archive/refs/tags/v1.2.0-rc3.zip)[{:height="24px" width="24px"}](https://github.com/sfilippone/amg4psblas/archive/refs/tags/v1.2.0-rc3.tar.gz)|[{:height="24px" width="24px"}](https://psctoolkit.github.io/amg4psblasguide/amg4psblas_1.2-guide-rc3.pdf){:target="_blank"} | PSBLAS 3.9-rc3 |
43
44
44
45
@@ -59,33 +60,101 @@ The main reference for features inherited from MLD2P4 is
59
60
60
61
## Installing
61
62
62
-
Installation requires having a working version of the [PSBLAS](https://github.com/sfilippone/psblas3) library installed.
63
-
AMG4PSBLAS has several interfaces to third-party libraries that can be used in the construction and application phases of preconditioners.
64
-
In particular, it is possible to link AMG4PSBLAS with the libraries: MUMPS, SuperLU, SuperLU_Dist, UMFPACK. This is _not mandatory_ and the library can run
63
+
Installation requires a working version of the [PSBLAS](https://github.com/sfilippone/psblas3) library
64
+
as a prerequisite.
65
+
AMG4PSBLAS has several interfaces to third-party libraries that can be used in the construction
66
+
and application phases of preconditioners;
67
+
in particular, it is possible to link AMG4PSBLAS with the libraries: MUMPS, SuperLU, SuperLU_Dist, UMFPACK.
68
+
The usage of these third party libraries is _not mandatory_: the package can function
65
69
in isolation and without these features.
66
70
67
71
0. Unpack the tar file in a directory of your choice (preferrably
68
72
outside the main PSBLAS directory).
69
-
1. run configure `--with-psblas=<ABSOLUTE path of the PSBLAS install directory>`
73
+
1. run configure `--with-psblas=<ABSOLUTE path of the PSBLAS install directory> --prefix=<install_path>`
70
74
adding the options for MUMPS, SuperLU, SuperLU_Dist, UMFPACK as desired.
71
-
See [AMG4PSBLAS User's and Reference Guide](docs/amg4psblas_1.0-guide.pdf) (Section 3) for details.
75
+
See [AMG4PSBLAS User's and Reference Guide](docs/amg4psblas_1.2-guide.pdf) (Section 3) for details.
72
76
2. Tweak `Make.inc` if you are not satisfied.
73
77
3. run `make`;
74
78
4. Go into the test subdirectory and build the examples of your choice.
75
-
5. (if desired): `make install`
79
+
5. (if desired): `make install`or `sudo make install` if the install path requires privileged access.
76
80
81
+
>[!CAUTION]
77
82
>The single precision version is supported only by MUMPS and SuperLU;
78
83
>thus, even if you specify at configure time to use UMFPACK or SuperLU_Dist,
79
84
>the corresponding preconditioner options will be available only from
80
85
>the double precision version.
81
86
87
+
## CMAKE
88
+
AMG4PSBLAS supports building with CMake. To configure the project, you must explicitly provide the path where PSBLAS is installed. If this path is not specified, the configuration will fail with a fatal error.
89
+
90
+
From the root directory of the project, run:
91
+
### 1. Create and enter the build directory
92
+
```
93
+
mkdir build
94
+
cd build
95
+
```
96
+
97
+
### 2. Configure the project (MANDATORY: specify your PSBLAS path)
- Search for the PSBLAS package in the provided path.
103
+
- Detect and configure MPI (required for C, C++, and Fortran).
104
+
- Set up include and module directories based on the PSBLAS configuration.
105
+
- Configure integer sizes (IPK and LPK) to match the PSBLAS installation.
106
+
### 2.1. Customizing the Installation Path
107
+
By default, the library will be installed in standard system locations. To install amg4psblas in a custom directory, use the CMAKE_INSTALL_PREFIX variable:
Once configured, you can build the libraries (amg_prec and amg_cbind) and install them.
115
+
#### Build the library
116
+
```
117
+
make
118
+
```
119
+
120
+
#### Install the library, modules, and samples
121
+
```
122
+
make install
123
+
```
124
+
125
+
82
126
### CUDA, OpeMP, OpenACC
83
127
84
-
CUDA, OpenMP and OpenACC features are transparently inherited by PSBLAS installation. If PSBLAS has been configured (and installed) with these supports then AMG4PSBLAS will transparently inherit them. It will then be possible to move the computation to GPU accelerator simply by selecting the appropriate variable types. If these have not been activated or installed for PSBLAS then they will not be available for AMG4PSBLAS either and the operation will be purely on CPU/MPI. See also the samples/cuda folder.
128
+
CUDA, OpenMP and OpenACC features are transparently inherited by PSBLAS installation.
129
+
If PSBLAS has been configured (and installed) with these supports then AMG4PSBLAS will
130
+
transparently inherit them. It will then be possible to move the computation to GPU accelerator
131
+
simply by selecting the appropriate variable types in the application.
132
+
If the types have not been activated or installed for PSBLAS then they will not be
133
+
available for AMG4PSBLAS either and the operation will be purely on CPU/MPI. See also the samples/cuda folder.
85
134
86
135
### EoCoE - Software as service portal
87
136
88
-
In the European project “Energy oriented Center of Excellence: toward exascale for energy” we made available a software as service portal: [https://eocoe.psnc.pl/](https://eocoe.psnc.pl/). This permits to test several cutting-edge computational methods for accelerating the transition to the production, storage and management of clean, decarbonized energy. Among them you have the possibility of running PSBLAS+AMG4PSBLAS on some test problems to become familiar with using the software.
137
+
In the European project “Energy oriented Center of Excellence: toward exascale for energy” we made
138
+
available the software through a service portal: [https://eocoe.psnc.pl/](https://eocoe.psnc.pl/).
139
+
This permits to test several cutting-edge computational methods for accelerating the transition
140
+
to production, storage and management of clean, decarbonized energy.
141
+
Among them you have the possibility of running PSBLAS+AMG4PSBLAS on some test problems
142
+
to become familiar with using the software.
143
+
## MPI and Compilers
144
+
The library has been successfully compiled and tested with the same compilers
145
+
and MPI implementations as PSBLAS 3.9, which include:
146
+
- MPICH 4.2.3, 4.3.0, 4.3.2
147
+
- OpenMPI 4.1.8. 5.0.7, 5.0.8, 5.0.9
148
+
149
+
combined with
150
+
151
+
- GNU compilers 10.5.0, 11.5.0, 12.5.0, 13.3.0, 14.2.0 14.3.0, 15.2.0
152
+
- LLVM 20.1.0 and 21.1.0 (except OpenMPI 4.1.8 which does not build with LLVM)
153
+
154
+
Moreover, it has been tested with the Intel OneAPI toolchain versions 2025.2 and 2025.3
155
+
156
+
As of this release, the NVIDIA compiler 25.7 fails to handle our code.
157
+
Cray, IBM and NAg compilers have been used for testing in the past, but not on this version.
89
158
90
159
## TODO and bugs
91
160
@@ -103,8 +172,8 @@ In the European project “Energy oriented Center of Excellence: toward exascale
| Version 3.9.0 | December 23, 2025 |[{:height="24px" width="24px"}](https://github.com/sfilippone/psblas3/archive/refs/tags/v3.9.0.zip)[{:height="24px" width="24px"}](https://github.com/sfilippone/psblas3/archive/refs/tags/v3.9.0.tar.gz)|[{:height="24px" width="24px"}](/psblasguide/psblas-3.9.pdf){:target="_blank"} |
29
30
| Version 3.9-RC3 | July 23, 2025 |[{:height="24px" width="24px"}](https://github.com/sfilippone/psblas3/archive/refs/tags/v3.9.0-rc3.zip)[{:height="24px" width="24px"}](https://github.com/sfilippone/psblas3/archive/refs/tags/v3.9.0-rc3.tar.gz)|[{:height="24px" width="24px"}](/psblasguide/psblas-3.9-rc3.pdf){:target="_blank"} |
30
31
31
32
Library releases can be downloaded from: [psblas3/releases](https://github.com/sfilippone/psblas3/releases)
32
33
33
34
35
+
34
36
## References
35
37
36
38
@@ -77,14 +79,13 @@ The main reference for the serial sparse BLAS is:
77
79
78
80
## Installing
79
81
80
-
To compile and run our software you will need the following
81
-
prerequisites (see also SERIAL below):
82
+
To compile (using configure/make/make install) and run our software
83
+
you will need the following
84
+
prerequisites (see also SERIAL below):
82
85
83
-
1. A working version of MPI
86
+
1. A working version of MPI.
84
87
85
-
2. A version of the BLAS; if you don't have a specific version for your
86
-
platform you may try ATLAS available from
87
-
http://math-atlas.sourceforge.net/
88
+
2. A version of the BLAS; you can specify a specific version with `--with-blas`
88
89
89
90
3. We have had good results with the METIS library, from
90
91
https://github.com/KarypisLab/METIS.
@@ -96,29 +97,39 @@ prerequisites (see also SERIAL below):
96
97
We use the C interface to AMD.
97
98
98
99
6. If you have CUDA available, use
99
-
--enable-cuda to compile CUDA-enabled methods
100
-
--with-cudadir=<path> to specify the CUDA toolkit location
101
-
--with-cudacc=XX,YY,ZZ to specify a list of target CCs (compute
102
-
capabilities) to compile the CUDA code for.
103
-
104
-
The configure script will generate a Make.inc file suitable for building
100
+
-`--enable-cuda` to compile CUDA-enabled methods
101
+
-`--with-cudadir=<path>` to specify the CUDA toolkit location
102
+
-`--with-cudacc=XX,YY,ZZ` to specify a list of target CCs (compute
103
+
capabilities).
104
+
CUDA versions have specific compatibility requirements;
105
+
for example:
106
+
- CUDA version 11.8 supports GNU compilers up to version 11
107
+
- CUDA versions 12.3 through 12.6 support GNU compilers up to version 13
108
+
- CUDA versions 12.8 and 12.9 support GNU compilers up to version 14
109
+
- CUDA version 13.0 supports GNU compilers up to version 15
110
+
For further information please refer to the CUDA documentation at
111
+
https://developer.nvidia.com/cuda/gpus
112
+
113
+
The configure script will generate a `Make.inc` file suitable for building
105
114
the library. The script is capable of recognizing the needed libraries
106
115
with their default names; if they are in unusual places consider adding
107
116
the paths with `--with-libs`, or explicitly specifying the names in
108
117
`--with-blas`, etc.
109
118
119
+
>[!CAUTION]
110
120
> Please note that a common way for the configure script
111
121
> to fail is to specify inconsistent MPI vs. plain compilers, either
112
122
> directly or indirectly via environment variables; e.g. specifying the
113
123
> Intel compiler with `FC=ifort` while at the same time having an
114
124
> `MPIFC=mpif90` which points to GNU Fortran.
115
125
126
+
>[!TIP]
116
127
> The best way to avoid this
117
128
> situation is (in our opinion) to use the environment modules package
118
129
> (see [http://modules.sourceforge.net/](http://modules.sourceforge.net/)), and load the relevant
119
130
> variables with (e.g.)
120
131
> ```
121
-
> module load gcc/13.2.0 openmpi/4.1.6
132
+
> module load gcc/14.2.0 openmpi/5.0.8
122
133
> ```
123
134
> This will delegate to the modules setup to make sure that the version of
124
135
> openmpi in use is the one compiled with the gnu46 compilers. After the
@@ -130,11 +141,20 @@ After you have Make.inc fixed, run
130
141
make
131
142
```
132
143
to compile the library; go to the test directory and its subdirectories
133
-
to get test programs done. If you specify `--prefix=/path` you can do make
134
-
install and the libraries will be installed under `/path/lib`, while the
135
-
module files will be installed under `/path/modules`. The regular and
136
-
experimental C interface header files are under `/path/include`.
137
-
144
+
to get test programs done.
145
+
You can then install with
146
+
```
147
+
make install
148
+
```
149
+
We recommend specifying `--prefix=/path` in the configure step, so that
150
+
the libraries will be installed under `/path/lib`,
151
+
the module files will be installed under `/path/modules`, the documentation under `/path/docs` and so on.
152
+
The C interface header files are under `/path/include`.
153
+
If `/path` is a system directory, you may need
154
+
```
155
+
sudo make install
156
+
```
157
+
If you do not specifye `--with-prefix` the usual default of `/usr` applies.
138
158
### Packaging changes, CUDA and GPU support
139
159
140
160
This version of PSBLAS incorporates into a single package three
@@ -145,12 +165,12 @@ entities that were previously separated:
145
165
| PSBLAS-EXT | a library providing additional storage formats for matrices and vectors |
146
166
| SPGPU | a package of kernels for NVIDIA GPUs originally written by Davide Barbieri and Salvatore Filippone; see the license file [cuda/License-spgpu.md](cuda/License-spgpu.md) |
147
167
148
-
Moreover, the module and library previously called psb_krylovv are now called
168
+
Moreover, the module and library previously called psb_krylov are now called
149
169
psb_linsolve, but their usage is otherwise unchanged.
150
170
151
171
### OpenACC
152
172
There is a highly experimental version of an OpenACC interface,
@@ -168,7 +188,7 @@ cover what we use internally, it's not a complete replacement).
168
188
### Integers
169
189
170
190
We have two kind of integers: IPK for local indices, and LPK for
171
-
global indices. They can be specified independently at configure time,
191
+
global indices. Their size can be specified at configure time,
172
192
e.g.
173
193
```bash
174
194
--with-ipk=4 --with-lpk=8
@@ -177,11 +197,96 @@ which is asking for 4-bytes local indices, and 8-bytes global indices
177
197
(this is the default).
178
198
179
199
## CMAKE
180
-
There is initial support for building with CMAKE. As of this time, it does not compile the CUDA part.
200
+
PSBLAS supports building with CMake (version 3.11 or higher). This method handles the automatic detection of compilers, MPI, and linear algebra libraries.
201
+
Standard Compilation (Without CUDA)
202
+
To perform a standard compilation, run:
203
+
### 1. Create and enter a dedicated build directory
204
+
```
205
+
mkdir build
206
+
cd build
207
+
```
208
+
### 2. Configure the project
209
+
```
210
+
cmake ..
211
+
```
212
+
### 3. Compile the libraries
213
+
```
214
+
make
215
+
```
216
+
If you wish to install PSBLAS in a specific location (similar to using the --prefix option in the legacy configure script), you must define the CMAKE_INSTALL_PREFIX variable.
217
+
To set a custom installation path, run the configuration command as follows:
218
+
#### Example: Installing PSBLAS to a specific folder in your home directory
To enable GPU support via CUDA, you must set the PSB_BUILD_CUDA option to ON during the configuration step.
224
+
Important Compatibility Note: CUDA support is strictly incompatible with 8-byte local integers. If you manually set CMAKE_PSB_IPK to 8, CUDA support will be automatically disabled by the system.
225
+
To build with CUDA enabled:
181
226
182
-
## LLVM
183
-
The library has been successfully compiled and tested with LLVM version 20.1.0-rc2.
227
+
```
228
+
cmake -DPSB_BUILD_CUDA=ON ..
229
+
```
230
+
The compilation then proceed as before through make
231
+
When this flag is active, CMake will search for the CUDAToolkit, enable the CUDA language, and define necessary macros such as PSB_HAVE_CUDA.
232
+
233
+
### Customizing Integer Sizes
234
+
You can override the default integer sizes (4-byte local IPK and 8-byte global LPK) using the following variables:
235
+
Example: Using 8-byte global integers (default) and 4-byte local integers
236
+
```
237
+
cmake -DCMAKE_PSB_IPK=4 -DCMAKE_PSB_LPK=8 ..
238
+
```
239
+
240
+
### 4. Installation
241
+
To install the libraries, header files, and Fortran modules to your system (or a custom path defined by -DCMAKE_INSTALL_PREFIX), run:
242
+
```
243
+
make install
244
+
```
245
+
The files will be organized into the lib, include, and modules subdirectories within the installation prefix, same as the configure build.
246
+
## MPI and Compilers
247
+
The library has been successfully compiled and tested with multiple compilers
248
+
and MPI implementations; this release has been successfully tested with:
249
+
- MPICH 4.2.3, 4.3.0, 4.3.2
250
+
- OpenMPI 4.1.8. 5.0.7, 5.0.8, 5.0.9
251
+
252
+
combined with
253
+
254
+
- GNU compilers 10.5.0, 11.5.0, 12.5.0, 13.3.0, 14.2.0 14.3.0, 15.2.0
255
+
- LLVM 20.1.0 and 21.1.0 (except OpenMPI 4.1.8 which does not build with LLVM)
256
+
257
+
Moreover, it has been tested with the Intel OneAPI toolchain versions 2025.2 and 2025.3
258
+
259
+
As of this release, the NVIDIA compiler 25.7 fails to handle our code.
260
+
Cray, IBM and NAg compilers have been used for testing in the past, but not on this version.
184
261
262
+
## Documentation
263
+
264
+
Further information on installation and configuration can be found in the documentation.
265
+
See [docs/psblas-3.9.pdf](docs/psblas-3.9.pdf); an HTML version of the same document is
266
+
available in docs/html. Please consult the sample programs, especially
0 commit comments