-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
Step 1: Installing wsl https://learn.microsoft.com/en-us/windows/wsl/install
- Open the terminal as an Administrator
- Enter the following comand : wsl --install
Step 2: Checking if wsl is installed and installing distribution
- Run wsl -l -v to check which wsl version you are running
- Run the following command : wsl --list --online to see available distribution
- Run wsl.exe --install to install the distribution
Step 3: Launch wsl
- Before launching wsl, go to windows features on or off
- Select "Virtual Machine Platform" check box
- Select "Windows Subsystem for Linux" check box
- Then launch wsl
Step 4: Installing libraries
- Once wsl launched, package installation can be done using the following command: sudo apt install
- Install cmake https://cmake.org/download/
- Install gnu compiler https://gcc.gnu.org/git.html
- Install Open-blas http://www.openmathlib.org/OpenBLAS/docs/install/
- Install gfortran compiler (I came across this while executing genten, the execution stopped because gfortran wasn't installed.)
- Command to install all the packages listed above:
apt install cmake gcc gfortran libopenblas-dev
Step 5: Building GenTen
-
Clone the github repo git clone https://github.com/sandialabs/GenTen.git
-
Set your directory structure in the following manner: ''' top-level | -- genten | -- genten | -- tpls | -- kokkos | -- build | -- opt_gnu_openmp '''
-
with top-level being your home directory
-
Use the follwing script (in top-level/genten/genten/build/opt_gnu_openmp) to build the code with CMake: ''' #!/bin/bash
rm -f CMakeCache.txt; rm -rf CMakeFiles
EXTRA_ARGS=$@
cmake
-D CMAKE_CXX_COMPILER=g++
-D CMAKE_C_COMPILER=gcc
-D Kokkos_ENABLE_OPENMP=ON
-D Kokkos_ARCH_SKX=ON
${EXTRA_ARGS}
../../GenTen ''' -
Run the command above inside the
opt_gnu_openmp
folder
Step 6: Running GenTen -
Follow the instructions as indicated in the github's repository. Here the link to the github's repo:GenTen repository
- GenTen runs natively on windows, but only through the Clang compiler, not MSVC. It builds with the Kokkos serial, but not with openMP backend. It does work with Python. Step 1:
-
The first step is to download the latest version of Visual Studio through this website: https://visualstudio.microsoft.com/downloads/ . After installing visual studio, it is possible to customize the installation by selecting the appropriate workloads. In that case, the appropriate workload will be "Desktop development with C++" to allow using tools such as Clang, CMake. In addition, there is also the possibility to install individual components from the individual tab.
-
Download mkl, which is a library of optimized math routines, through this site: https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-download.html
-
set a variable 'MKLROOT' with the path where mkl is installed 'C:\Program Files (x86)\Intel\oneAPI\mkl\latest'.
MKLROOT=C:\Program Files (x86)\Intel\oneAPI\mkl\latest
-
Then add mkl's path to system environment variable can be done by pressing to the windows button and enter "system environment variable" in the search bar. A window will pop up with both environment variable for user and system environment variable. You can add the path in either the environment variable for the user or in for the system; for the user just double-click on the variable name "Path", a list of path will appear and click on the "New" button or double-click on the white space and enter the path where mkl bin folder is located. For the system environment variable, make sure you have admin privilege, and press on the "New" button, name the variable and enter the path to where the mkl bin folder is located.
C:\Program Files (x86)\Intel\oneAPI\compiler\2025.1\bin\compiler
Step 2: Cloning GenTen repository
- To clone the repository, open the command prompt and enter; git clone https://github.com/sandialabs/GenTen.git
Step 3: Installing and Setting up Clang on Visual Studio
- To install Clang on visual studio, click on "Tools" and choose "Get Tools and Features". From there, select "individual components" and search for "Clang" in the search bar. In addition, Clang compiler can be installed through the "Desktop development with C++" in the workloads feature as well.
Step 4: Configuring a windows project to use Clang tools
-
To configure a project on visual studio to use Clang, right-click on CMakeLists.txt in Solution Explorer and choose CMake settings for project. After that, under
Configurations
, press theAdd Configuration
button. Choose the desired Clang configuration, and pressSelect
. For more informations on how to configure a windows project to use Clang tools, visit the following site: https://learn.microsoft.com/en-us/cpp/build/clang-support-cmake?view=msvc-170 -
In the CMake command arguments field, you can specify additional arguments such as
-DENABLE_PYTHON=ON
to enable python.