Skip to content

Boilerplate Modern CMake project with Fortran and Intel MKL SpBLAS. Optional unit testing and arbitrary dependency fftpack included for illustrative purposes.

License

Notifications You must be signed in to change notification settings

jfdev001/hello-sparse-blas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hello-sparse-blas

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
)

On Writing CMakeLists for Fortran

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.

References

About

Boilerplate Modern CMake project with Fortran and Intel MKL SpBLAS. Optional unit testing and arbitrary dependency fftpack included for illustrative purposes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published