17.2.2. On Windows - 5.2 English - 57404

AOCL User Guide (57404)

Document ID
57404
Release Date
2025-12-29
Version
5.2 English

Complete the following steps to use by application on Windows:

  1. Move to installed examples directory:

    $ cd <install_dir>\examples
    
  2. Define the environment variable AOCL_ROOT to point to AOCL libs installation that has AOCL-BLAS, AOCL-LAPACK and AOCL-Utils libraries:

    $ set AOCL_ROOT="C:\Program Files\AMD\AOCL-Windows"
    
  3. Define SPARSE_ROOT to point to the AOCL-Sparse package installation path:

    $ set SPARSE_ROOT="%HOME%\amd\aocl-sparse"
    
  4. Add AOCL-Sparse, AOCL-BLAS, AOCL-LAPACK and AOCL-Utils library paths to the environment path variable:

    $ set PATH="%SPARSE_ROOT%\lib;%PATH%"
    $ set PATH="%AOCL_ROOT%\amd-blis\lib\ILP64;%PATH%"
    $ set PATH="%AOCL_ROOT%\amd-libflame\lib\ILP64;%PATH%"
    $ set PATH="%AOCL_ROOT%\amd-utils\lib;%PATH%"
    
  5. Configure the build system to compile sample applications. Ensure that the build configuration is same as the one used to build the AOCL-Sparse library for the variable BUILD_ILP64:

    $ cmake -S . -B out_sparse -G "Visual Studio 17 2022" -T "clangcl"
    -DCMAKE_CXX_COMPILER=clang-cl
    -DBUILD_SHARED_LIBS=ON -DBUILD_ILP64=OFF -DSUPPORT_OMP=OFF
    
  6. Compile the sample applications:

    $ cmake --build out_sparse
    
  7. Run the application:

    $ .\out_sparse\sample_mv_cpp.exe
    

Note

The environment variable SPARSE_ROOT takes precedence when searching for sparse library and headers. If the environment variable SPARSE_ROOT is not defined, SPARSE_ROOT inherits the path from AOCL_ROOT and looks for AOCL-Sparse installation in AOCL_ROOT. If the sparse library/headers are not found neither in SPARSE_ROOT nor in AOCL_ROOT, an error is returned.