-
Notifications
You must be signed in to change notification settings - Fork 35
Build ~ Windows
-
Install WSL Ubuntu following the directions provided by Microsoft.
-
Once installed open the Ubuntu terminal and install perquisites as outlined.
sudo apt-get update sudo apt-get install build-essential gfortran git cmake autoconf automake git python3-distutils libpng-dev libtool clang-format pkg-config libssl-dev sudo apt-get install software-properties-common libtool autoconf automake gfortran gdebi gcc-multilib libxi-dev libxmu-dev libxmu-headers libx11-dev mesa-common-dev libglu1-mesa-dev libfontconfig1-dev libfreetype6 libfreetype6-dev tcl tcl-dev tk tk-dev libxml2-dev
-
Applicable if using CLion with WSL toolchain (suggested). The version of CMake fetched by Ubuntu WSL's apt is no longer supported by CLion, nor does CLion support the latest version of CMake (3.22.2 as of 3/3/22).
-
Download cmake-3.21.5.tar.gz to the Windows download folder.
-
Copy the file into the WSL home folder using:
cp /mnt/c/Users/<username>/Downloads/cmake-3.21.5.tar.gz home/<username>/ -
Extract the file:
tar -zxvf cmake-3.21.5.tar.gz -
Edit it's folder:
cd cmake-3.21.5 -
Compile and install, this may take some time:
./bootstrap -
Run when prompted:
make -
Run when prompted:
sudo make install -
Check which version of CMake is installed on WSL:
cmake --version
- In the Ubuntu terminal configure and built PETSc. This will build PETSc in the linux file system.
-
Clone PETSc
git clone https://gitlab.com/petsc/petsc.git- To checkout a specific version or commit
git checkout main - The latest version of PETSc that has been tested against ABLATE is listed on ablate.dev
- To checkout a specific version or commit
-
When running the
./configurecommand, be sure to add the--download-cmakeoption. This ensures that./configureuses the latest available version of CMake in the configuration. -
Configure PETSc with the following options from the petsc directory to build the debug configuration. Run the following make command.
# Configure debug PETSc ./configure PETSC_ARCH=arch-ablate-debug --download-mpich --download-fblaslapack --download-ctetgen --download-tetgen \ --download-egads --download-fftw --download-hdf5 --download-metis \ --download-ml --download-mumps --download-p4est \ --download-parmetis --download-scalapack \ --download-slepc --download-suitesparse --download-superlu_dist \ --download-triangle --with-slepc --download-zlib --with-libpng --download-kokkos --download-opencascade # Follow the on screen directions to make PETSc
-
If the configure fails for any reason, you may reset the configuration using:
sudo rm -r arch-ablate-debug -
When the configure completes, run as prompted:
make PETSC_DIR=/home/<username>/petsc PETSC_ARCH=arch-ablate-debug all -
Run as prompted: make
PETSC_DIR=/home/<username>/petsc PETSC_ARCH=arch-ablate-debug check- Configure PETSc with the following options from the petsc directory to build the release configuration. Run the following make command.
# Configure opt PETSc ./configure PETSC_ARCH=arch-ablate-opt --download-mpich --download-fblaslapack --download-ctetgen --download-tetgen \ --download-egads --download-fftw --download-hdf5 --download-metis \ --download-ml --download-mumps --download-p4est \ --download-parmetis --download-scalapack \ --download-slepc --download-suitesparse --download-superlu_dist \ --download-triangle --with-slepc --download-zlib --with-libpng --download-kokkos --download-opencascade --with-debugging=0 # Follow the on screen directions to make PETSc
- Configure PETSc with the following options from the petsc directory to build the release configuration. Run the following make command.
-
If the configure fails for any reason, you may reset the configuration using:
sudo rm -r arch-ablate-opt -
When the configure completes, run as prompted:
make PETSC_DIR=/home/<username>/petsc PETSC_ARCH=arch-ablate-debug allmake PETSC_DIR=/home/<username>/petsc PETSC_ARCH=arch-ablate-opt all
- Set up the environmental variables so that ABLATE can locate PETSc. The PETSC_DIR path should be the path to the downloaded PETSc files. This value is reported in the output of the configure command.
# Add the following environment variables where PETSC_DIR and PETSC_ARCH are replaced with specified values from the configure command. In wsl this means putting the following in the ~/.bashrc hidden file. export PETSC_DIR="/home/<username>/petsc"
Follow the step-by-step guide on ablate.dev/content/installation/LocalInstall to download, configure, and build ABLATE locally. For Windows WSL installation please follow the following to install CLion in WSL Linux.
-
Download CLion-2022.1 into the Windows Downloads folder.
-
Copy the file into the WSL home folder using:
cp /mnt/c/Users/<username>/Downloads/CLion-2021.3.3.tar.gz home/<username>/ -
Extract the file:
tar -zxvf CLion-2022.1.tar.gz -C /opt/ -
Run Clion from the command line using:
sh /opt/clion-2022.1/bin/clion.sh