-
Notifications
You must be signed in to change notification settings - Fork 1
Building DASH
The instructions in this page will only work if you have followed the instructions in the Provisioning a build machine page.
Use the following command to clone the dash repository
git clone ssh://[email protected]/ccdc-opensource/dash.git
This will create a directory called dash on your disk.
The following command line snippet will configure the build to:
- Use Ninja to build a Release version of DASH (with full optimisations)
- Use the Intel Fortran Compiler in its default location
- Use a copy of winteracter installed under a custom location (the default is C:\wint)
- Use the
dashdirectory as a location for the source code - Use a
blddirectory as a location for the the generated solution and build products - Install DASH under the
installdirectory when selecting the INSTALL target
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
"C:\Program Files\CMake\bin\cmake.exe" ^
-G Ninja ^
-S dash ^
-B bld ^
-DWINTERACTER_ROOT=C:\winteracter\winteracter-14.10d ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_Fortran_COMPILER="C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/bin/intel64/ifort.exe" ^
-DCMAKE_INSTALL_PREFIX=install
The following powershell snippet will compile all fortran code using the build directory bld configured using the cmake command above
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
"C:\Program Files\CMake\bin\cmake.exe" --build bld
The following powershell snippet will run the install target, thus installing all required binaries and resource files under the directory specified by the -DCMAKE_INSTALL_PREFIX setting
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
"C:\Program Files\CMake\bin\cmake.exe" --build bld --target install
The following powershell snippet will run the package target, thus creating:
- a compressed archive under the bld_CPack_Packages\win32\7Z directory
- an executable MSI installer under the bld_CPack_Packages\win32\WIX directory
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
"C:\Program Files\CMake\bin\cmake.exe" --build bld --target package
Note: the 2021.4.0 version of Intel oneAPI has a bug that prevents this procedure from working correctly. Intel have fixed this with version 2022.1.0.
Instead of using the Ninja CMake Generator, you need to use the "Visual Studio 16 2019" one like this:
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
"C:\Program Files\CMake\bin\cmake.exe" ^
-G "Visual Studio 16 2019" ^
-S dash ^
-B bld-vs ^
-DWINTERACTER_ROOT=C:\winteracter\winteracter-14.10d ^
-DCMAKE_Fortran_COMPILER="C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/bin/intel64/ifort.exe" ^
-DCMAKE_INSTALL_PREFIX=install
This command will generate a DASH Visual Studio solution in the directory you specify with the -B flag (bld-vs if you copy paste the snippet above).
Open the solution, run the ALL_BUILD target to compile all executables and libraries and then run the INSTALL target to generate a complete DASH distribution folder in your install directory.
Right click on the DASH target, select Properties and in the Debug pane, select (your install directory)/bin as the current working directory for DASH. This will allow DASH to find the files it requires
Not doing the above will cause DASH to fail on startup.