added documentation for ifort and mkl builds

This commit is contained in:
Guillaume Raffy 2026-02-20 15:00:36 +01:00
parent f4abe26b1f
commit 90d312c299
1 changed files with 50 additions and 3 deletions

View File

@ -8,14 +8,14 @@ total 4
drwxr-xr-x 3 graffy spm 4096 févr. 20 13:51 molscat_14.git
```
create a directory for the build:
### create a directory for the build:
```sh
graffy@graffy-ws2:~/work/saboi$ mkdir molscat_14.build
graffy@graffy-ws2:~/work/saboi$ cd molscat_14.build/
```
configure the build
### configure the build
```sh
graffy@graffy-ws2:~/work/saboi/molscat_14.build$ cmake ../molscat_14.git/
@ -68,7 +68,43 @@ Fortran compiler: gfortran
This created the makefile [~/work/saboi/molscat_14.build/Makefile].
Build the `moscat` executable using the makefile [~/work/saboi/molscat_14.build/Makefile]
#### useful configure options
##### Use a specific compiler
cmake option: `-DCMAKE_Fortran_COMPILER=<compiler>`
Where `<compiler>` is your fortran compiler executable e.g.:
- `gfortran`
- `gfortran-8`
- `ifort`
- `ifx`
##### Use a specific BLAS/LAPACK library
cmake option: `-DBLA_VENDOR=<BLAS_LIB> `
Where `<BLAS_LIB>` is your BLAS library e.g.:
- `OpenBLAS`
- `Intel10_64lp`
- `Apple`
see CMake [BLAS/LAPACK VENDORS](https://cmake.org/cmake/help/latest/module/FindBLAS.html#blas-lapack-vendors) for a full list of supported libraries
##### Choose a build type
cmake option: `-DCMAKE_BUILD_TYPE=<build_type>`
Where `<build_type>` is one of:
- `Debug`: useful for debugging (eg using `gdb`)
- `Release`: (optimize options are turned on)
### Build the `moscat` executable using the makefile [~/work/saboi/molscat_14.build/Makefile]
```sh
graffy@graffy-ws2:~/work/saboi/molscat_14.build$ make
@ -93,6 +129,17 @@ Warning: Named COMMON block memory at (1) shall be of the same size as els
[100%] Built target molscat
```
### ifort and mkl on alambix cheatsheet
```sh
graffy@alambix-frontal:/opt/ipr/cluster/work.local/graffy/saboi$ git clone https://git.ipr.univ-rennes.fr/saboi/molscat_14.git ./molscat_14.git
graffy@alambix-frontal:/opt/ipr/cluster/work.local/graffy/saboi$ mkdir molscat_14.build
graffy@alambix-frontal:/opt/ipr/cluster/work.local/graffy/saboi$ cd molscat_14.build
graffy@alambix-frontal:/opt/ipr/cluster/work.local/graffy/saboi/molscat_14.build$ module load compilers/ifort/latest
graffy@alambix-frontal:/opt/ipr/cluster/work.local/graffy/saboi/molscat_14.build$ cmake -DCMAKE_Fortran_COMPILER=ifx -DBLA_VENDOR=Intel10_64lp -DCMAKE_BUILD_TYPE=Release ../molscat_14.git/
graffy@alambix-frontal:/opt/ipr/cluster/work.local/graffy/saboi/molscat_14.build$ make
```
## how to run
```sh