Skip to content

installationWindowsNew

Joshua J. Cogliati edited this page Jun 29, 2022 · 26 revisions

Installing RAVEN on Windows

Installing RAVEN on Windows is a simple process:

  • Install prerequisites, such as git, conda, and c compilers
  • Clone RAVEN from GitHub
  • Compile and build RAVEN
  • Run tests

Installing Prerequisites

For Windows systems perform the following:

  • obtain the latest Git SCM for Windows installer from https://gitforwindows.org/ and install it. Install Git Bash and have the installer add Git Bash to your Windows PATH environment variables. The PATH can be updated in two different ways:
    • Automatic: Allow the Git SCM installer to update it for you: Image: Git SCM Path
    • Manually: Add the Git Bash in your PATH manually: Image: Add Git SCM Path
  • obtain the Microsoft's Visual Studio Community Edition from here. After downloading and running the Visual Studio installer, it will ask what features to install. For building RAVEN, "Desktop development with C++" is needed at a minimum. Installation of other Visual Studio features should be fine.
  • install Miniconda (you can install Miniconda from https://conda.io/miniconda.html). CONDA must be added in the Windows PATH. The PATH can be updated in two different ways:
    • Automatic: Allow the Conda installer to update it for you: Image: Conda Path
    • Manually: Add the Git Bash in your PATH manually: Image: Add Conda Path

Clone RAVEN

Open the GitBash (or Windows PowerShell) and cd into the folder where you want to install RAVEN (e.g., projects)

C:\projects> cd projects
C:\projects> git clone https://github.com/idaholab/raven.git
C:\projects> cd raven

Install RAVEN Plugins (ONLY IF YOU NEED ACCESS TO PLUGINS)

This step is optional, and you need to contact the raven developers to obtain the access first if you need any non-open source plugins. Contact us The installation instruction can be found: RAVEN Plugins

Compile and Build RAVEN

Installing Python libraries

  • First, find where your conda was installed. Open a Windows command line terminal and get the following result:
C:\> which conda
/c/Users/TALBPW/AppData/Local/Continuum/miniconda3/Scripts/conda

Your exact path will be slightly different depending on how conda was installed, and possibly using your user name. The result above is simply an example.

Whatever your result is, copy it and modify it as follows:

  • Remove the last two entries (the part after miniconda)

    • Example: /c/Users/TALBPW/AppData/Local/Continuum/miniconda3/
  • Add /etc/profile.d/conda.sh

    • Example: /c/Users/TALBPW/AppData/Local/Continuum/miniconda3/etc/profile.d/conda.sh This is the location of your conda definitions, used during the next step.
  • Then, open GitBash (or Windows PowerShell) and install raven libraries (release branch)

In GitBash:

C:\> cd projects
C:\> cd raven
C:\projects\raven> ./scripts/establish_conda_env.sh --install --conda-defs <yourCondaDefsLocation>

In PowerShell:

C:\> cd projects
C:\> cd raven
C:\projects\raven> bash.exe ./scripts/establish_conda_env.sh --install --conda-defs <yourCondaDefsLocation>

Make sure to replace <yourCondaDefsLocation> with your conda defs location found during the last step above.

The establish_conda_env.sh process is maintained to provide the best libraries for each commit of RAVEN. In the event libraries cannot be installed through conda, see Installing RAVEN Libraries.

Compiling RAVEN

Open GitBash (or Windows PowerShell) and compile RAVEN.

In GitBash:

C:\projects\raven> ./build_raven 

In PowerShell:

C:\projects\raven> bash.exe ./build_raven 

In case the RAVEN libraries have been installed without the conda installation package, (see Installing RAVEN Libraries ), RAVEN needs to be built with the following option:

In GitBash:

# USE ONLY if not using conda (non-standard install)
C:\projects\raven> ./build_raven --skip-conda

In PowerShell:

# USE ONLY if not using conda (non-standard install)
C:\projects\raven> bash.exe ./build_raven --skip-conda 

Test RAVEN installation

In GitBash:

C:\projects\raven> ./run_tests -j2

In PowerShell:

C:\projects\raven> bash.exe ./run_tests -j2

A large number of tests are run in order to check that the installation step has been successful. At the end, a screen output is generated similar to the one below (though the number of tests will not be the same):

383 passed, 19 skipped, 0 pending, 0 failed

Other Activities

Once RAVEN has been installed, there are several activities that can be done with it:

  • Running RAVEN
  • Receiving new updates
  • Accessing documentation

Running RAVEN

To run in Windows see the running instructions here

Updating RAVEN

# navigate to the RAVEN repository
C:\projects> cd raven
# pull down any new changes
C:\projects\raven> git pull
# update libraries
###### in GitBash:
C:\projects\raven> ./scripts/establish_conda_env.sh --install
###### or in PowerShell:
C:\projects\raven> bash.exe ./scripts/establish_conda_env.sh --install
# compile and build
###### in GitBash:
C:\projects\raven> ./build_raven
# run tests
C:\projects\raven> ./run_tests -j2
###### or in PowerShell:
C:\projects\raven> bash.exe ./build_raven
# run tests
C:\projects\raven> bash.exe ./run_tests -j2

Accessing RAVEN Documentation

The RAVEN distribution includes several documents including user and theory manuals. These have been created using the LaTeX document preparation system and therefore need to be built using LaTeX typesetting software. There are several implementations of such software for all platforms, on Windows we have successfully used MiKTeX. To successfully build the documentation, the LaTeX distribution must provide the pdflatex and biblatex commands, and these commands must be in current system PATH.

Checking to See if Needed LaTeX Commands are in Your PATH

The which command can be used in CMD shells to see if a command is in the current system PATH. If a command can be found in the system PATH, the output looks like this:

C:\projects\raven\doc> which pdflatex
/c/Users/_you_user_name_/AppData/Local/Programs/MiKTeX 2.9/miktex/bin/x64/pdflatex

If a command is not found, the output instead looks like this:

C:\projects\raven\doc> which pdflateks
which: no pdflateks in (Listing of directories in PATH)

Additional LaTeX packages needed to build RAVEN Documentation

There are several freely available add-on packages for the LaTeX typesetting system that are needed to build the RAVEN documentation:

  • appendix, mathtools, bigints, soul, placeins, xcolor, preprint, titlesec, mptopdf, cite, url, stmaryrd, booktabs, txfonts, listings, symbol, subfigure, fancyhdr

These may be installed using the package manager of the installed LaTeX distribution or allowing MiKTeX to automatically download them in case of need (automatic download on the-fly)

How to Build the RAVEN Manual

A script make_docs.sh is provided in the doc directory of the RAVEN distribution that will build all available documentation in one step. The script is needed to properly mark the version of the code in the documents:

In GitBash:

C:\projects> cd raven\doc
C:\projects\raven\doc> ./make_docs.sh

In PowerShell:

C:\projects> cd raven\doc
C:\projects\raven\doc> bash.exe ./make_docs.sh

If only a specific document needs to be built, navigate to the containing folder and type:

In GitBash:

  ./make_win.sh

In PowerShell:

  bash.exe ./make_win.sh

For example:

C:\projects> cd raven\doc\user_manual
C:\projects\raven\user_manual> ./make_win.sh (In GitBash) or bash.exe make_win.sh (In PowerShell)