Skip to content

Commit

Permalink
Adjust build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
r.jaepel committed Nov 20, 2023
1 parent b6e0569 commit 06d5a13
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 26 deletions.
16 changes: 7 additions & 9 deletions BUILD-LINUX.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Assumed directory structure:
<pre>
&lt;ROOT&gt;
|-code
|-cadet
|-install
|-build
</pre>

Expand All @@ -33,19 +33,17 @@ Obtain LAPACK from your distribution:


## Build CADET

- Download or git clone the CADET source code
- Place the source in `<ROOT>\code`
- Create the directories `<ROOT>\build` and `<ROOT>\cadet`

- Create the `<ROOT>` folder
- Clone the CADET source code `git clone https://github.com/modsim/CADET.git <ROOT>/code`
- Create the directories `<ROOT>/build` and `<ROOT>/install`

- Open a terminal and change to `<ROOT>/build`
- If using MKL, execute `export MKLROOT=/opt/intel/mkl`
- Using standard LAPACK: Execute `cmake -DCMAKE_INSTALL_PREFIX="../cadet" ../code/`
- Using standard LAPACK: Execute `cmake -DCMAKE_INSTALL_PREFIX="../install" ../code/`

- Using MKL (sequential): Execute `cmake -DCMAKE_INSTALL_PREFIX="../cadet" -DBLA_VENDOR=Intel10_64lp_seq ../code/`
- Using MKL (sequential): Execute `cmake -DCMAKE_INSTALL_PREFIX="../install" -DBLA_VENDOR=Intel10_64lp_seq ../code/`

- Using MKL (parallel): Execute `cmake -DCMAKE_INSTALL_PREFIX="../cadet" -DBLA_VENDOR=Intel10_64lp ../code/`
- Using MKL (parallel): Execute `cmake -DCMAKE_INSTALL_PREFIX="../install" -DBLA_VENDOR=Intel10_64lp ../code/`

- Execute `make`
- Execute `make install`
14 changes: 7 additions & 7 deletions BUILD-OSX.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Assumed directory structure:
<pre>
&lt;ROOT&gt;
|-code
|-cadet
|-install
|-build
</pre>

Expand All @@ -35,16 +35,16 @@ or install the freely available [Intel MKL](https://software.intel.com/sites/cam

## Build CADET

* Download release of CADET or checkout from git
* Place the source in `<ROOT>/code` and create the directory `<ROOT>/build`
* Open a terminal and change to `<ROOT>/build`
- Create the `<ROOT>` folder
- Clone the CADET source code `git clone https://github.com/modsim/CADET.git <ROOT>/code`
- Create the directories `<ROOT>/build` and `<ROOT>/install`

* If using Intel MKL, execute `export MKLROOT=/opt/intel/mkl`
* Using standard LAPACK: Execute `cmake -DCMAKE_INSTALL_PREFIX="<ROOT>/cadet" ../code/`
* Using standard LAPACK: Execute `cmake -DCMAKE_INSTALL_PREFIX="<ROOT>/install" ../code/`

Using MKL (sequential): Execute `cmake -DCMAKE_INSTALL_PREFIX="<ROOT>/cadet" -DBLA_VENDOR=Intel10_64lp_seq ../code/`
Using MKL (sequential): Execute `cmake -DCMAKE_INSTALL_PREFIX="<ROOT>/install" -DBLA_VENDOR=Intel10_64lp_seq ../code/`

Using MKL (parallel): Execute `cmake -DCMAKE_INSTALL_PREFIX="<ROOT>/cadet" -DBLA_VENDOR=Intel10_64lp ../code/`
Using MKL (parallel): Execute `cmake -DCMAKE_INSTALL_PREFIX="<ROOT>/install" -DBLA_VENDOR=Intel10_64lp ../code/`
* Execute `make`
* Execute `make install`

20 changes: 10 additions & 10 deletions BUILD-WINDOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Assumed directory structure:
<pre>
&lt;ROOT&gt;
|-code
|-cadet
|-install
|-build
</pre>

Expand Down Expand Up @@ -45,9 +45,9 @@ We are using Visual Studio because it is the easiest way to install all required

## Prepare CADET code

- Download or git clone the CADET source code
- Place the source in `<ROOT>\code`
- Create the directories `<ROOT>\build` and `<ROOT>\cadet`
- Create the `<ROOT>` folder
- Clone the CADET source code `git clone https://github.com/modsim/CADET.git <ROOT>\code`
- Create the directories `<ROOT>\build` and `<ROOT>\install`

## Build CADET

Expand All @@ -58,26 +58,26 @@ We are using Visual Studio because it is the easiest way to install all required
- `cd <ROOT>\build`
- `vcpkg integrate install` (this only needs to be run _once_ and will require admin privileges)
- `set MKLROOT="C:/Program Files (x86)/Intel/oneAPI/mkl/latest"`
- `cmake -DCMAKE_INSTALL_PREFIX=..\cadet -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DENABLE_STATIC_LINK_LAPACK=ON -DENABLE_STATIC_LINK_DEPS=ON -DBLA_VENDOR=Intel10_64lp_seq --fresh ..\code\`
- `cmake -DCMAKE_INSTALL_PREFIX=..\install -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DENABLE_STATIC_LINK_LAPACK=ON -DENABLE_STATIC_LINK_DEPS=ON -DBLA_VENDOR=Intel10_64lp_seq --fresh ..\code\`
- If you want to use parallelization and have installed TBB, instead
execute `set TBBROOT="C:/Program Files (x86)/Intel/oneAPI/tbb/latest"` and
- `cmake -DCMAKE_INSTALL_PREFIX=..\cadet -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DENABLE_STATIC_LINK_LAPACK=ON -DENABLE_STATIC_LINK_DEPS=ON -DBLA_VENDOR=Intel10_64lp --fresh ..\code\`
- `cmake -DCMAKE_INSTALL_PREFIX=..\install -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DENABLE_STATIC_LINK_LAPACK=ON -DENABLE_STATIC_LINK_DEPS=ON -DBLA_VENDOR=Intel10_64lp --fresh ..\code\`
- `msbuild.exe INSTALL.vcxproj /p:Configuration=Release;Platform=x64`

- For PowerShell:
- `cd <ROOT>\build`
- `vcpkg integrate install` (this only needs to be run _once_ and will require admin privileges)
- `$ENV:MKLROOT = "C:\Program Files (x86)\Intel\oneAPI\mkl\latest"`
- `cmake -DCMAKE_INSTALL_PREFIX="..\cadet" -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$ENV:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DENABLE_STATIC_LINK_LAPACK=ON -DENABLE_STATIC_LINK_DEPS=ON -DBLA_VENDOR=Intel10_64lp_seq "..\code\" --fresh`
- `cmake -DCMAKE_INSTALL_PREFIX="..\install" -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$ENV:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DENABLE_STATIC_LINK_LAPACK=ON -DENABLE_STATIC_LINK_DEPS=ON -DBLA_VENDOR=Intel10_64lp_seq "..\code\" --fresh`
- If you want to use parallelization and have installed TBB, instead
execute `$ENV:TBBROOT = "C:\Program Files (x86)\Intel\oneAPI\tbb\latest"`
and
- `cmake -DCMAKE_INSTALL_PREFIX="..\cadet" -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$ENV:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DENABLE_STATIC_LINK_LAPACK=ON -DENABLE_STATIC_LINK_DEPS=ON -DBLA_VENDOR=Intel10_64lp "..\code\" --fresh`
- `cmake -DCMAKE_INSTALL_PREFIX="..\install" -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$ENV:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DENABLE_STATIC_LINK_LAPACK=ON -DENABLE_STATIC_LINK_DEPS=ON -DBLA_VENDOR=Intel10_64lp "..\code\" --fresh`
- `msbuild.exe INSTALL.vcxproj /p:Configuration="Release;Platform=x64"`
- The binaries will be located in `<ROOT>\cadet\bin`
- The binaries will be located in `<ROOT>\install\bin`

## Test build results
- Navigate to the install location `cd <ROOT>\cadet\bin`
- Navigate to the install location `cd <ROOT>\install\bin`
- Run:
- `cadet-cli.exe --version`
- `createLWE.exe`
Expand Down

0 comments on commit 06d5a13

Please sign in to comment.