From 90d312c2997265a04a16a70e4f8d2a0fc14757b1 Mon Sep 17 00:00:00 2001 From: Guillaume Raffy Date: Fri, 20 Feb 2026 15:00:36 +0100 Subject: [PATCH] added documentation for ifort and mkl builds --- readme.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index c400139..9eac460 100644 --- a/readme.md +++ b/readme.md @@ -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=` + +Where `` is your fortran compiler executable e.g.: + +- `gfortran` +- `gfortran-8` +- `ifort` +- `ifx` + +##### Use a specific BLAS/LAPACK library + +cmake option: `-DBLA_VENDOR= ` + +Where `` 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=` + +Where `` 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