Demonstrate sparse matrix-vector multiplication with Intel MKL. Also has various cmake structural components that are intended to be for generic projects.
Can easily use pFUnit
or test-drive
for unit testing.
Make sure you have the Intel oneAPI HPC Toolkit or Intel Fortran Essentials.
Then, you can configure, build, and run tests for the project.
# test-drive builds faster than pfunit
./config/intel_ubuntu_test_drive_fftpack_spblas
Alternatively, if on a system where you need to specify a different MKL library you can do this with the flags during configuration. The below bash script does the necessary configuration, as an example, for DKRZ's Levante.
./config/intel_levante_pfunit
You can build the documentation separately with
cmake --build build --target doxygen_docs
See Documenting Fotran with Doxygen for some more details.
You can also check to see if a downstream project can find/fetch this package.
(
cd build
make install
cd ..
cd test/downstream_project/
./config/local # uses local installation from make install to run hello world with repo lib
./config/fetch # fetchcontent this repo to run hello world with repo lib
)
In the **/CMakeLists.txt
, the packages
fortran-lang/stdlib
,
libfortran-support
,
fftpack
,
test-drive
,
libiconmath
, and
dynamics
were used as
inspiration for the cmake commands needed for building a portable Fortran project.
Comments explicitly state # ... (from <libname>)
to indicate projects inspired
part of or the entire cmake command. These projects were used as inspiration due
to their (a) wide-spread use and/or (b) credibility from expert authorship.
- Test file based on gist.
- Cmake linking based on link line advisor
- Installing intel fortran compiler
- Installing mkl
- Set environment vars
- I did
INCLUDE mkl_spblas.f90
above thePROGRAM
statement and theuse mkl_spblas
in the program block since i mimicked the direct sparse solver example for f90 on pg. 1941 of the mkl manual - Directory structure from fpm even though using cmake
- fftpack uses cmake for dependencies instead of git submodule and fetch content
- Doxygen real Fortran examples: NOAA-ECM/fv3atm
- Creating CMake libraries that others can find and use
- fortran-lang/stdlib for more cmake structure