Hey everybody,
since I had some problems building CADET for MS Windows with the installation guide on the CADET webpage and Bill helped me out differently as suggested. I figured that a short summary of the steps would be clever. If you think its worth sharing, we could also move it to a public section later on.
Build for MS Windows:
The following instructions are not based on any sequence, but it is recommended to work through them deterministically from top to bottom. If programs or settings already exist, the corresponding steps can be skipped.
Install Visual Studio:
- Download Visual Studio https://visualstudio.microsoft.com/de/downloads/
- Install Visual Studio with the workload desktop developments with C++
Install Intel® oneAPI Base Toolkit
- The installation of Visual Studio should be finished before starting with this step. Otherwise, the Toolkit integration into the integrated development environment (IDE) Visual Studio is not possible.
- Download Intel® oneAPI Base Toolkit as online installer https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html?operatingsystem=window&distributions=webdownload&options=offline
- In the installer window custom, the installation that only the following tools/ packages are included:
- Intel® oneAPI Threading Building Blocks (TBB)
- Intel® oneAPI Math Kernel Library (MKL)
- confirm the connection of the Toolkit with the IDE in the installation window and click install
Install vcpkg: C++ Library Manager
- Carry out the first two steps of the “Quick Start: Windows” from the README on the github repository of vcpkg: GitHub - microsoft/vcpkg: C++ Library Manager for Windows, Linux, and MacOS which are:
- Clone the repository or place an unzipped vcpkg folder structure at
C:\src
orC:\dev
- Open the windows command prompt and change director to
C:\src
orC:\dev
and carry out the following line.\vcpkg\bootstrap-vcpkg.bat
- Clone the repository or place an unzipped vcpkg folder structure at
- Now use vcpkg to install hdf5 and suitesparse
- The directory of the command window should be still at
C:\src
orC:\dev
. Then the following line will install the libraries
.\vcpkg\vcpkg install hdf5:x64-windows-static suitesparse:x64-windows-static
Add system environment variables
- Press the windows button and type: variable → system environment variables should appear as first option. Open it and klick on environment variable.
- In the environment variable window klick search for the path variable in the system variable window and klick on edit.
- In the new window check for the following paths. If they are not in the list add them:
C:\Program Files (x86)\Intel\oneAPI\tbb\latest\redist\intel64\vc_mt
C:\Program Files (x86)\Intel\oneAPI\mkl\latest\redist\intel64
C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\redist\ intel64_win\compiler
Download CADET and modify CMakeSettings.json
- Clone the CADET repository or place the unzipped folder structure at a desired location
- Open the CADET repository in Visual Studio
- Use the VCPKG_42_dll configuration
- Download the
CMakeSettings.json
from this post and replace it with the one in the CADET folder - Open the
CMakeSettings.json
with Visual Studio and modify the variableINSTALL_DIR
and TOOLCHAIN_FILE under environments.- INSTALL_DIR is the directory where CADET is installed to and where you later find the cadet-cli, which is needed for the compilation of the python cadet code
- TOOLCHAIN_FILE variable should direct to the vcpkg.cmake file
- When you hit save Visual Studio should run CMake-Generation and should terminate without errors
- In the Project explorer above the CMakeSettings.json right klick the CMakeList.txt and click install
- Visual Studio is now building CADET and should give the feedback that the installation was successful
- Open a command prompt window and change directory to the
INSTALL_DIR
- Execute these lines in the command window at the
INSTALL_DIR
:.\createLWE.h5
.\cadet-cli LWE.h5
- If no error is occurring the compilation of cadet was successful
CMakeSettings.json (9.9 KB)