installationWindowsOld - idaholab/raven GitHub Wiki

Contents

Introduction

RAVEN can be used on the Microsoft Windows platform! This is particularly useful when you would like to use RAVEN to sample an external code that only runs on Windows. This is done by using a UNIX-like environment called MSYS2 which provides the command interpreter necessary to build and run RAVEN. For those interested, an introduction to MSYS2 is available here.

Note: This installation method has been revised since RAVEN became an open source project. The updated procedure has the advantage of not requiring any packages distributed by project developers. All supporting files are obtained directly from third-party sources.

Prerequisites

  • A system running a 64-bit version of Microsoft Windows. Installation and operation has been verified on Windows 7, Windows 10, and Windows Server 2012 R2 Standard. While there is also a 32-bit version of MSYS2 available, the RAVEN installation described here will not work with it.
  • At least 9 Gigabytes of available disk space:
    • 0.5 GB for MSYS2, including supporting tools and git source code control
    • 1.5 GB for Python and supporting packages
    • 1.5 GB for RAVEN
    • 5.0 GB for the Visual Studio compiler needed to build RAVEN
    • Also reserve some space for whatever external code(s) RAVEN will be used with and room for files generated during RAVEN runs

Installation

Obtain and install the base MSYS2 system

1. Obtain the latest basic 64-bit MSYS2 installer from https://msys2.github.io/ (it is approximately 50 Megabytes in size):

Image: MSYS2 Installer

2. The page with the download also contains installation instructions. Perform the steps described there up to step 6 to install an up-to-date MSYS2 system. Make sure that you install to path C:\msys64. Step 7 shows the installation of git source code control...we'll be doing that next.

Note: Steps five and six of this process use MSYS2's built-in package manager pacman to retrieve updates to the base system from a remote server. If you see an error like the following when using pacman it usually indicates that your computer requires a proxy server to connect to the internet.

:: Proceed with installation? [Y/n]
:: Retrieving packages...
error: failed retrieving file 'gcc-libs-6.3.0-1-x86_64.pkg.tar.xz' from repo.msys2.org : Connection timed out after 10000 milliseconds

To set up MSYS2 for a proxy use commands as follows:

USER@HOSTNAME MSYS ~
$ export http_proxy="http://proxyhost:port"

USER@HOSTNAME MSYS ~
$ export https_proxy=$http_proxy

Keep in mind that these commands only last until the shell window is closed.

Note that INL users no longer need a proxy command.

3. Use the MSYS2 package manager pacman to install a few tools that will be needed later. Use the following command in an MSYS shell window to install them:
USER@HOSTNAME MSYS ~
$ pacman -S git winpty make

The output will look something like the following (you will be prompted before downloading begins):

USER@HOSTNAME MSYS ~
$ pacman -S git winpty make
resolving dependencies...
looking for conflicting packages...

Packages (34) db-5.3.28-2  expat-2.2.0-2  gdbm-1.11-3  heimdal-1.5.3-9  libgdbm-1.11-3  openssh-7.3p1-2
              perl-5.24.1-2  perl-Authen-SASL-2.16-2  perl-Convert-BinHex-1.123-2  perl-Encode-Locale-1.04-1
              perl-Error-0.17024-1  perl-File-Listing-6.04-2  perl-HTML-Parser-3.72-1  perl-HTML-Tagset-3.20-2
              perl-HTTP-Cookies-6.01-2  perl-HTTP-Daemon-6.01-2  perl-HTTP-Date-6.02-2  perl-HTTP-Message-6.06-2
              perl-HTTP-Negotiate-6.01-2  perl-IO-Socket-SSL-2.016-1  perl-IO-stringy-2.111-1
              perl-LWP-MediaTypes-6.02-2  perl-MIME-tools-5.506-1  perl-MailTools-2.14-1  perl-Net-HTTP-6.09-1
              perl-Net-SMTP-SSL-1.02-1  perl-Net-SSLeay-1.80-1  perl-TermReadKey-2.37-1  perl-TimeDate-2.30-2
              perl-URI-1.68-1  perl-WWW-RobotRules-6.02-2  perl-libwww-6.13-1  vim-8.0.0237-1  git-2.12.1-1

Total Download Size:    25.96 MiB
Total Installed Size:  119.16 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
 expat-2.2.0-2-x86_64                        24.6 KiB  8.01M/s 00:00 [#####################################] 100%
 vim-8.0.0237-1-x86_64                        6.3 MiB   765K/s 00:08 [#####################################] 100%
 heimdal-1.5.3-9-x86_64                     546.6 KiB   794K/s 00:01 [#####################################] 100%
 openssh-7.3p1-2-x86_64                     670.1 KiB   876K/s 00:01 [#####################################] 100%
 db-5.3.28-2-x86_64                          41.7 KiB  0.00B/s 00:00 [#####################################] 100%
 libgdbm-1.11-3-x86_64                       20.4 KiB  0.00B/s 00:00 [#####################################] 100%
 gdbm-1.11-3-x86_64                         108.5 KiB  1390K/s 00:00 [#####################################] 100%
 perl-5.24.1-2-x86_64                        12.5 MiB   779K/s 00:16 [#####################################] 100%
 perl-Error-0.17024-1-any                    17.1 KiB  0.00B/s 00:00 [#####################################] 100%
 perl-Authen-SASL-2.16-2-any                 42.4 KiB  41.4M/s 00:00 [#####################################] 100%
 perl-Encode-Locale-1.04-1-any                9.7 KiB  0.00B/s 00:00 [#####################################] 100%
 perl-HTTP-Date-6.02-2-any                    8.6 KiB  0.00B/s 00:00 [#####################################] 100%
 perl-File-Listing-6.04-2-any                 7.7 KiB  0.00B/s 00:00 [#####################################] 100%
 perl-HTML-Tagset-3.20-2-any                 10.3 KiB  0.00B/s 00:00 [#####################################] 100%
 perl-HTML-Parser-3.72-1-x86_64              88.6 KiB  1182K/s 00:00 [#####################################] 100%
 perl-LWP-MediaTypes-6.02-2-any              18.0 KiB  0.00B/s 00:00 [#####################################] 100%
 perl-URI-1.68-1-any                         75.6 KiB  1021K/s 00:00 [#####################################] 100%
 perl-HTTP-Message-6.06-2-any                71.3 KiB   963K/s 00:00 [#####################################] 100%
 perl-HTTP-Cookies-6.01-2-any                20.4 KiB  0.00B/s 00:00 [#####################################] 100%
 perl-HTTP-Daemon-6.01-2-any                 14.2 KiB  0.00B/s 00:00 [#####################################] 100%
 perl-HTTP-Negotiate-6.01-2-any              11.4 KiB  0.00B/s 00:00 [#####################################] 100%
 perl-Net-HTTP-6.09-1-any                    19.8 KiB  0.00B/s 00:00 [#####################################] 100%
 perl-WWW-RobotRules-6.02-2-any              12.2 KiB  0.00B/s 00:00 [#####################################] 100%
 perl-libwww-6.13-1-any                     122.2 KiB  1567K/s 00:00 [#####################################] 100%
 perl-TimeDate-2.30-2-any                    35.9 KiB   473K/s 00:00 [#####################################] 100%
 perl-MailTools-2.14-1-any                   58.4 KiB   846K/s 00:00 [#####################################] 100%
 perl-IO-stringy-2.111-1-any                 52.6 KiB  51.4M/s 00:00 [#####################################] 100%
 perl-Convert-BinHex-1.123-2-any             30.1 KiB  29.4M/s 00:00 [#####################################] 100%
 perl-MIME-tools-5.506-1-any                180.4 KiB   798K/s 00:00 [#####################################] 100%
 perl-Net-SSLeay-1.80-1-x86_64              207.0 KiB   908K/s 00:00 [#####################################] 100%
 perl-IO-Socket-SSL-2.016-1-any             112.5 KiB  1442K/s 00:00 [#####################################] 100%
 perl-Net-SMTP-SSL-1.02-1-any                 3.5 KiB  0.00B/s 00:00 [#####################################] 100%
 perl-TermReadKey-2.37-1-x86_64              30.6 KiB  0.00B/s 00:00 [#####################################] 100%
 git-2.12.1-1-x86_64                          4.5 MiB   768K/s 00:06 [#####################################] 100%
(34/34) checking keys in keyring                                     [#####################################] 100%
(34/34) checking package integrity                                   [#####################################] 100%
(34/34) loading package files                                        [#####################################] 100%
(34/34) checking for file conflicts                                  [#####################################] 100%
(34/34) checking available disk space                                [#####################################] 100%
:: Processing package changes...
( 1/34) installing expat                                             [#####################################] 100%
( 2/34) installing vim                                               [#####################################] 100%
( 3/34) installing heimdal                                           [#####################################] 100%
( 4/34) installing openssh                                           [#####################################] 100%
( 5/34) installing db                                                [#####################################] 100%
( 6/34) installing libgdbm                                           [#####################################] 100%
( 7/34) installing gdbm                                              [#####################################] 100%
( 8/34) installing perl                                              [#####################################] 100%
( 9/34) installing perl-Error                                        [#####################################] 100%
(10/34) installing perl-Authen-SASL                                  [#####################################] 100%
(11/34) installing perl-Encode-Locale                                [#####################################] 100%
(12/34) installing perl-HTTP-Date                                    [#####################################] 100%
(13/34) installing perl-File-Listing                                 [#####################################] 100%
(14/34) installing perl-HTML-Tagset                                  [#####################################] 100%
(15/34) installing perl-HTML-Parser                                  [#####################################] 100%
(16/34) installing perl-LWP-MediaTypes                               [#####################################] 100%
(17/34) installing perl-URI                                          [#####################################] 100%
(18/34) installing perl-HTTP-Message                                 [#####################################] 100%
(19/34) installing perl-HTTP-Cookies                                 [#####################################] 100%
(20/34) installing perl-HTTP-Daemon                                  [#####################################] 100%
(21/34) installing perl-HTTP-Negotiate                               [#####################################] 100%
(22/34) installing perl-Net-HTTP                                     [#####################################] 100%
(23/34) installing perl-WWW-RobotRules                               [#####################################] 100%
(24/34) installing perl-libwww                                       [#####################################] 100%
Optional dependencies for perl-libwww
    perl-LWP-Protocol-HTTPS: for https:// url schemes
(25/34) installing perl-TimeDate                                     [#####################################] 100%
(26/34) installing perl-MailTools                                    [#####################################] 100%
(27/34) installing perl-IO-stringy                                   [#####################################] 100%
(28/34) installing perl-Convert-BinHex                               [#####################################] 100%
module test... pass.
(29/34) installing perl-MIME-tools                                   [#####################################] 100%
(30/34) installing perl-Net-SSLeay                                   [#####################################] 100%
(31/34) installing perl-IO-Socket-SSL                                [#####################################] 100%
(32/34) installing perl-Net-SMTP-SSL                                 [#####################################] 100%
(33/34) installing perl-TermReadKey                                  [#####################################] 100%
(34/34) installing git                                               [#####################################] 100%
Optional dependencies for git
    python2: various helper scripts
    subversion: git svn

USER@HOSTNAME MSYS ~
$

Install Python language and package support

In the revised installation, Python will be provided by the Miniconda distribution for Windows. This allows Python package versions needed by RAVEN to be more easily upgraded. If you already have a Python distribution installed on your system, those based on conda should work (skip to step 2).

1. Download and install the 64-bit installer for Python 2.7 from https://conda.io/miniconda.html.

Image: Miniconda Download Link

  • The installer will ask whether Python should be installed for only for the logged in user or for all users. Either will work, though for these instructions "Just Me" will be chosen.

Image: Miniconda Install 1

  • In the install for "Just Me" case, the installer will suggest a path in your profile:

Image: Miniconda Install 2

  • Have the installer add conda to your Windows PATH environment variable:

Image: Miniconda Install 3

  • Press "Install" to perform the installation.

2. Locate and test Python
  • Open a Windows command prompt and enter "where python", which attempts to locate a program called "python" in the current system PATH. When successful, it look like this (Note this result, it will be needed later):
C:\Users\USERID>where python
C:\Users\USERID\AppData\Local\Continuum\Miniconda2\python.exe

If Python is not found it will look like this instead:

C:\Users\USERID>where pithon
INFO: Could not find files for the given pattern(s).
  • If Python was found, it may be started by entering "python". If it was installed correctly, it should look like this:
C:\Users\USERID>python
Python 2.7.13 |Anaconda 4.0.0 (64-bit)| (default, Dec 19 2016, 13:29:36) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>>
>>>
>>> quit()

C:\Users\USERID>
  • Enter "quit()" to exit Python, or simply close the command prompt window.

3. Setup MSYS2 to find Python

MSYS2 has its own separate PATH which must also be adjusted so that Python and its associated tools may be found. This is done by converting the file system location of Python determined in the previous step to its MSYS2-compatible equivalent and using the result to setup MSYS2 so that it too can find it in the future.

  • Convert the Python location determined in step 2 to its MSYS2-compatible form: This is done by turning all backslashes ('\') in the path to be converted to forward slashes ('/'), and changing the drive letter from its '<letter>:' form to '/<letter>'. In addition, any space characters in the path must be escaped by inserting a backslash ('\') in front of each one when converting to MSYS2 form.

For example:

C:\Users\USERID\AppData\Local\Continuum\Miniconda2

becomes

/c/Users/USERID/AppData/Local/Continuum/Miniconda2

for MSYS2. Here is an example with spaces that need to be escaped:

C:\Program Files\Common Files

converted to MSYS2 form would become

/c/Program\ Files/Common\ Files

  • Configure the PATH in MSYS2

Three paths must be added to MSYS2 to enable all of the Python tools needed to be found. These are:

Path Purpose
<Converted path from above> Python executable
<Converted path from above>/Scripts Conda (Needed to manage Python packages)
<Converted path from above>/Library/bin Swig (Needed to build RAVEN)

These paths are added using shell commands that append new entries to the existing PATH variable without overwriting it. These commands take the following form:

export PATH=/c/Users/USERID/AppData/Local/Continuum/Miniconda2:$PATH
export PATH=/c/Users/USERID/AppData/Local/Continuum/Miniconda2/Scripts:$PATH
export PATH=/c/Users/USERID/AppData/Local/Continuum/Miniconda2/Library/bin:$PATH

To configure these needed paths in MSYS2, file "~/.bashrc" will need to be edited. Two methods will be illustrated.

If you are comfortable with using vi-style editors, open an MSYS2 shell from the Windows start menu and use the included editor vim:

USER@COMPUTER MINGW64 ~
$ vim ~/.bashrc

Then add three lines for the new path entries as shown in the example and save the file:

Image: Editing bashrc in vim

If a Windows-based editor is desired, Wordpad may be used. Although Notepad is often used for such tasks, it is less suited for this application because it does not properly display the line endings style used in MSYS2. Another excellent (and free) editor that is also good for editing RAVEN input files is Notepad++. When using a Windows editor, navigation will be needed to open the existing .bashrc file:

Image: Finding bashrc in Wordpad

Add the new lines to the end of the .bashrc file like the example below:

Image: Editing bashrc in Wordpad

After making the changes in the file, all new MSYS2 shells opened will have the proper paths set up.

4. Test Python in MSYS2

At this point open a new MSYS2 shell window and see if Python is now found in the PATH:

Note: Due to the way that Python interacts with the MSYS2 shell, when using Python by itself in MSYS the winpty utility is provided. (If Python is run without winpty, it may appear to sit there and do nothing. Pressing <Ctrl>-C will interrupt it.)

USER@COMPUTER MSYS ~
$ winpty python
Python 2.7.13 |Anaconda 4.0.0 (64-bit)| (default, Dec 19 2016, 13:29:36) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>>
>>> quit()

USER@COMPUTER MSYS ~
$

Download and Build RAVEN

Once the MSYS2 system is installed on your Windows machine, installation is very similar to what is done on other platforms. RAVEN is publicly available from its repository at GitHub. Open a terminal window using and cd into the folder where you want to install RAVEN (e.g., projects)

USER@COMPUTER MINGW64 ~
$ mkdir projects

USER@COMPUTER MINGW64 ~
$ cd projects

USER@COMPUTER MINGW64 ~/projects
$

Clone RAVEN

USER@COMPUTER MINGW64 ~/projects
$ git clone https://github.com/idaholab/raven.git
Cloning into 'raven'...
remote: Counting objects: 76407, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 76407 (delta 0), reused 0 (delta 0), pack-reused 76396
Receiving objects: 100% (76407/76407), 442.33 MiB | 12.19 MiB/s, done.
Resolving deltas: 100% (52644/52644), done.
Checking out files: 100% (6367/6367), done.

USER@COMPUTER MINGW64 ~/projects
$

Clone RAVEN Plugins

(ONLY IF YOU HAVE ACCESS TO PLUGINS) This step is optional, and you need to contact the raven developers to obtain the access first. Contact us. The installation instruction can be found: RAVEN Plugins

5. Install Python packages needed for RAVEN

RAVEN requires several Python packages to function properly. Now the conda command will be used to download and install them in an automated manner. The following asks conda to obtain the specified versions of the listed packages, as well as all of their dependencies.

  • install raven libraries
cd raven/scripts
./establish_conda_env.sh --install

If conda is not found, see additional information in Installing RAVEN Libraries.

When this command is run, the output of this command should resemble the following (Since this command will retrieve any needed packages from the internet, any proxy setup as indicated above will also be necessary here):

$ conda install numpy=1.11.0 h5py=2.6.0 scipy=0.17.1 scikit-learn=0.17.1 matplotlib=1.5.1 python=2.7 hdf5 swig pylint lxml
Fetching package metadata: ....
Solving package specifications: .........

Package plan for installation in environment C:\Users\user\AppData\Local\Continuum\Miniconda2:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    conda-env-2.6.0            |                0          498 B
    mkl-11.3.3                 |                1       110.0 MB
    swig-3.0.10                |                0         1.2 MB
    openssl-1.0.2k             |            vc9_0         4.4 MB
    python-2.7.13              |                0        23.9 MB
    tk-8.5.18                  |            vc9_0         2.2 MB
    zlib-1.2.8                 |            vc9_3         108 KB
    enum34-1.1.6               |           py27_0          53 KB
    hdf5-1.8.16                |            vc9_0        11.8 MB
    idna-2.2                   |           py27_0         122 KB
    ipaddress-1.0.18           |           py27_0          31 KB
    lazy-object-proxy-1.2.2    |           py27_0          27 KB
    libpng-1.6.27              |            vc9_0         478 KB
    lxml-3.7.3                 |           py27_0         1.7 MB
    numpy-1.11.0               |           py27_2         3.0 MB
    pyasn1-0.2.3               |           py27_0          76 KB
    pycparser-2.17             |           py27_0         154 KB
    pyparsing-2.1.4            |           py27_0          70 KB
    pyqt-4.10.4                |           py27_1        31.2 MB
    pytz-2017.2                |           py27_0         194 KB
    requests-2.12.4            |           py27_0         755 KB
    ruamel_yaml-0.11.14        |           py27_1         222 KB
    six-1.10.0                 |           py27_0          16 KB
    wrapt-1.10.10              |           py27_0          40 KB
    astroid-1.4.9              |           py27_0         253 KB
    cffi-1.9.1                 |           py27_0         191 KB
    cycler-0.10.0              |           py27_0          10 KB
    h5py-2.6.0                 |      np111py27_1         628 KB
    isort-4.2.5                |           py27_0          92 KB
    python-dateutil-2.6.0      |           py27_0         232 KB
    scipy-0.17.1               |      np111py27_1        11.5 MB
    cryptography-1.7.1         |           py27_0         335 KB
    matplotlib-1.5.1           |      np111py27_0         6.3 MB
    pylint-1.6.4               |           py27_1         359 KB
    scikit-learn-0.17.1        |      np111py27_1         3.5 MB
    pyopenssl-16.2.0           |           py27_0          68 KB
    conda-4.3.17               |           py27_0         548 KB
    ------------------------------------------------------------
                                           Total:       215.7 MB

The following NEW packages will be INSTALLED:

    astroid:           1.4.9-py27_0
    cffi:              1.9.1-py27_0
    cryptography:      1.7.1-py27_0
    cycler:            0.10.0-py27_0
    enum34:            1.1.6-py27_0
    h5py:              2.6.0-np111py27_1
    hdf5:              1.8.16-vc9_0       [vc9]
    idna:              2.2-py27_0
    ipaddress:         1.0.18-py27_0
    isort:             4.2.5-py27_0
    lazy-object-proxy: 1.2.2-py27_0
    libpng:            1.6.27-vc9_0       [vc9]
    lxml:              3.7.3-py27_0
    matplotlib:        1.5.1-np111py27_0
    mkl:               11.3.3-1
    numpy:             1.11.0-py27_2
    openssl:           1.0.2k-vc9_0       [vc9]
    pyasn1:            0.2.3-py27_0
    pycparser:         2.17-py27_0
    pylint:            1.6.4-py27_1
    pyopenssl:         16.2.0-py27_0
    pyparsing:         2.1.4-py27_0
    pyqt:              4.10.4-py27_1
    python-dateutil:   2.6.0-py27_0
    pytz:              2017.2-py27_0
    ruamel_yaml:       0.11.14-py27_1
    scikit-learn:      0.17.1-np111py27_1
    scipy:             0.17.1-np111py27_1
    six:               1.10.0-py27_0
    swig:              3.0.10-0
    tk:                8.5.18-vc9_0       [vc9]
    wrapt:             1.10.10-py27_0
    zlib:              1.2.8-vc9_3        [vc9]

The following packages will be UPDATED:

    conda:             4.0.5-py27_0 --> 4.3.17-py27_0
    conda-env:         2.4.5-py27_0 --> 2.6.0-0
    python:            2.7.11-4     --> 2.7.13-0
    requests:          2.9.1-py27_0 --> 2.12.4-py27_0

Proceed ([y]/n)? y

Fetching packages ...
conda-env-2.6. 100% |###############################| Time: 0:00:00  33.20 kB/s
mkl-11.3.3-1.t 100% |###############################| Time: 0:01:17   1.50 MB/s
swig-3.0.10-0. 100% |###############################| Time: 0:00:08 140.56 kB/s
openssl-1.0.2k 100% |###############################| Time: 0:00:03   1.34 MB/s
python-2.7.13- 100% |###############################| Time: 0:00:16   1.52 MB/s
tk-8.5.18-vc9_ 100% |###############################| Time: 0:00:02   1.12 MB/s
zlib-1.2.8-vc9 100% |###############################| Time: 0:00:00 536.48 kB/s
enum34-1.1.6-p 100% |###############################| Time: 0:00:00 287.61 kB/s
hdf5-1.8.16-vc 100% |###############################| Time: 0:00:08   1.47 MB/s
idna-2.2-py27_ 100% |###############################| Time: 0:00:00 620.57 kB/s
ipaddress-1.0. 100% |###############################| Time: 0:00:00 305.56 kB/s
lazy-object-pr 100% |###############################| Time: 0:00:00 324.16 kB/s
libpng-1.6.27- 100% |###############################| Time: 0:00:00 783.46 kB/s
lxml-3.7.3-py2 100% |###############################| Time: 0:00:01   1.00 MB/s
numpy-1.11.0-p 100% |###############################| Time: 0:00:02   1.24 MB/s
pyasn1-0.2.3-p 100% |###############################| Time: 0:00:00 371.36 kB/s
pycparser-2.17 100% |###############################| Time: 0:00:00 259.38 kB/s
pyparsing-2.1. 100% |###############################| Time: 0:00:00 403.04 kB/s
pyqt-4.10.4-py 100% |###############################| Time: 0:04:01 135.59 kB/s
pytz-2017.2-py 100% |###############################| Time: 0:00:00 542.67 kB/s
requests-2.12. 100% |###############################| Time: 0:00:01 537.85 kB/s
ruamel_yaml-0. 100% |###############################| Time: 0:00:00 477.66 kB/s
six-1.10.0-py2 100% |###############################| Time: 0:00:00 227.12 kB/s
wrapt-1.10.10- 100% |###############################| Time: 0:00:00 193.10 kB/s
astroid-1.4.9- 100% |###############################| Time: 0:00:00 667.08 kB/s
cffi-1.9.1-py2 100% |###############################| Time: 0:00:00 699.43 kB/s
cycler-0.10.0- 100% |###############################| Time: 0:00:00 413.08 kB/s
h5py-2.6.0-np1 100% |###############################| Time: 0:00:04 130.46 kB/s
isort-4.2.5-py 100% |###############################| Time: 0:00:00 513.26 kB/s
python-dateuti 100% |###############################| Time: 0:00:00 803.71 kB/s
scipy-0.17.1-n 100% |###############################| Time: 0:00:08   1.38 MB/s
cryptography-1 100% |###############################| Time: 0:00:00 746.33 kB/s
matplotlib-1.5 100% |###############################| Time: 0:00:04   1.39 MB/s
pylint-1.6.4-p 100% |###############################| Time: 0:00:00 718.19 kB/s
scikit-learn-0 100% |###############################| Time: 0:00:02   1.25 MB/s
pyopenssl-16.2 100% |###############################| Time: 0:00:00 357.99 kB/s
conda-4.3.17-p 100% |###############################| Time: 0:00:00 844.60 kB/s
Extracting packages ...
Extracting packages ...
[      COMPLETE      ]|##################################################| 100%
Unlinking packages ...
[      COMPLETE      ]|##################################################| 100%
Linking packages ...
[      COMPLETE      ]|##################################################| 100%

USER@COMPUTER MSYS ~
$

Compiling RAVEN

Even though RAVEN is primarily written in the Python language, it makes use of code written in C++, which is compiled. This primarily includes the code in the crow directory, which contains functions needed by RAVEN which are implemented in the C++ language for performance reasons. Also needed is a library written in C++ that implements the Approximate Morse-Smale Complex (AMSC) algorithm. This step builds these modules and creates interfaces so that they may be used by Python scripts.

Compiler Installation and Configuration

1. Download and install Visual Studio

An C++ language compiler that supports C++11 features is needed to perform this step. Microsoft's Visual Studio Community Edition is free and available here.

Image: Visual Studio Download

The current version (as of this writing) is 2017. The 2013, 2015 and 2017 versions have been successfully used to build RAVEN. Professional and Enterprise versions of these will also work. If one of these is already present on your system, it is not necessary to obtain another one. Note that because C++11 language features are required, the "Microsoft Visual C++ Compiler for Python 2.7" as found here will not work.

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.

Image: Visual Studio Install

2. Let the build system know where to find the compiler

When the build system attempts to search for an installed compiler, this process often fails with the error message "Unable to find vcvarsall.bat". When it does, it looks like the following:

USER@COMPUTER MINGW64 ~/projects/raven
$ make framework_modules

Building /home/USER/projects/raven/src/contrib/_amsc.so...
(cd /home/USER/projects/raven && unset CXX CC && if test `uname` = Darwin; then MACOSX_DEPLOYMENT_TARGET=10.9; export MACOSX_DEPLOYMENT_TARGET; fi && . /home/USER/projects/raven/scripts/setup_raven_libs && python ./setup.py build_ext build install --install-platlib=./framework/contrib/AMSC)
/c/Users/user/AppData/Local/Continuum/Miniconda2/Scripts/conda
running build_ext
building '_amsc' extension
swigging src/contrib/amsc.i to src/contrib/amsc_wrap.cpp
C:\Users\user\AppData\Local\Continuum\Miniconda2\Library\bin\swig.exe -python -c++ -Iinclude\contrib -IC:\msys64\home\USER\projects\raven\crow\contrib\include -o src/contrib/amsc_wrap.cpp src/contrib/amsc.i
error: Unable to find vcvarsall.bat
make: *** [/home/USER/projects/raven/amsc.mk:10: /home/USER/projects/raven/src/contrib/_amsc.so] Error 1

This happens because Python version 2.7 has not been updated to automatically locate modern Visual Studio installations. To solve this it is necessary to help the Python build system find the C++ compiler on the system. The easiest way to do this is create a Windows batch (.BAT) file that will redirect the build system to the information it needs. First, locate the file VCVARSALL.BAT file installed as part of Visual Studio on your system. This location will usually be something like the following:

Visual Studio Version Directory Containing VCVARSALL.BAT
2013 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
2015 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
2017 C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\

Once the target file has been located it is necessary to create a couple of directories and one file. The first directory created must be named "VC" and should be created somewhere outside of the RAVEN source tree (such as your MinGW home directory):

USER@COMPUTER MINGW64 ~
$ mkdir VC

USER@COMPUTER MINGW64 ~
$ 

The next directory to be created must be inside the one just created. It is suggested to name it "target", because it is there that we will point the Python build system:

USER@COMPUTER MINGW64 ~
$ cd VC

USER@COMPUTER MINGW64 ~/VC
$ mkdir target

USER@COMPUTER MINGW64 ~/VC
$ ls
target

USER@COMPUTER MINGW64 ~/VC
$ 

The file to be created is named "VCVARSALL.BAT", and it must be written in the VC directory that was just made. The Python build system will be configured to find this file, which then redirects it to the actual file. Use a text editor (such as vim or notepad as described above) to create the file VCVARSALL.BAT:

USER@COMPUTER MINGW64 ~/VC
$ vim VCVARSALL.BAT

or

USER@COMPUTER MINGW64 ~/VC
$ notepad VCVARSALL.BAT

One line will need to be added to the new file VCVARSALL.BAT :

CALL "<Full Path To VCVARSALL.BAT File Installed by Visual Studio>" %1 %2 %3 %4 %5

For example, in the case of Visual Studio 2017 Community installed in the default location this would be:

CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\VCVARSALL.BAT" %1 %2 %3 %4 %5

Note the double quotes around the path and file name. These are necessary because there are spaces in some of the directory names that make up the full location of VCVARSALL.BAT.

After creating the new VCVARSALL.BAT in the directory VC, one more thing needs to be done to inform the Python build system where this file just created is. During the build process, an environment variable "VS90COMNTOOLS" will be checked. The value of VS90COMNTOOLS will need to be set to the target directory just below the location of VCVARSALL.BAT file just created. For example, if VCVARSALL.BAT was created in directory VC under your MinGW home directory, the variable VS90COMNTOOLS should point to ~/VC/target.

USER@COMPUTER MINGW64 ~/projects/raven
$ export VS90COMNTOOLS=~/VC/target

USER@COMPUTER MINGW64 ~/projects/raven
$ echo $VS90COMNTOOLS
/home/user/VC/target

USER@COMPUTER MINGW64 ~/projects/raven
$

Although only necessary when rebuilding RAVEN, you may wish to add the above command that sets the value of VS90COMNTOOLS to your .bashrc file. That way it will be already set every time you start an MSYS2 shell window. This may be done using the above procedure used to setup MSYS2 to find Python, found here.

Starting the Build

To build RAVEN navigate to the directory where it was downloaded and run

[~/projects/raven]> ./build_raven 

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

[~/projects/raven]> ./build_raven --skip-conda

When it works properly, the output looks like the following. When not, try to find a solution to your problem in the Troubleshooting section.

USER@COMPUTER MINGW64 ~/projects 
$ cd raven
USER@COMPUTER MINGW64 ~/projects/raven
$ ./build_raven
/c/Users/user/AppData/Local/Continuum/Miniconda2/Scripts/conda
running build_ext
building '_distribution1Dpy2' extension
swigging crow_modules/distribution1Dpy2.i to crow_modules/distribution1Dpy2_wrap.cpp
C:\Users\user\AppData\Local\Continuum\Miniconda2\Library\bin\swig.exe -python -c++ -Iinclude/distributions -Iinclude/utilities -o crow_modules/distribution1Dpy2_wrap.cpp crow_modules/distribution1Dpy2.i
creating build
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\crow_modules
creating build\temp.win-amd64-2.7\Release\src
creating build\temp.win-amd64-2.7\Release\src\distributions
creating build\temp.win-amd64-2.7\Release\src\utilities
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Iinclude/distributions -Iinclude/utilities -Icontrib/include -IC:\Users\user\AppData\Local\Continuum\Miniconda2\include -IC:\Users\user\AppData\Local\Continuum\Miniconda2\PC /Tpcrow_modules/distribution1Dpy2_wrap.cpp /Fobuild\temp.win-amd64-2.7\Release\crow_modules/distribution1Dpy2_wrap.obj -std=c++11
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
distribution1Dpy2_wrap.cpp
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xlocale(341): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\exception(359): warning C4577: 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Iinclude/distributions -Iinclude/utilities -Icontrib/include -IC:\Users\user\AppData\Local\Continuum\Miniconda2\include -IC:\Users\user\AppData\Local\Continuum\Miniconda2\PC /Tpsrc/distributions/distribution.cxx /Fobuild\temp.win-amd64-2.7\Release\src/distributions/distribution.obj -std=c++11
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
distribution.cxx
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\xlocale(341): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
  .   .   .
(Many more lines of build messages)
  .   .   .
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cmath(303): warning C4577: 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc
creating build\lib.win-amd64-2.7
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\Users\user\AppData\Local\Continuum\Miniconda2\libs /LIBPATH:C:\Users\user\AppData\Local\Continuum\Miniconda2\PCbuild\amd64 /LIBPATH:C:\Users\user\AppData\Local\Continuum\Miniconda2\PC\VS9.0\amd64 /EXPORT:init_amsc build\temp.win-amd64-2.7\Release\src/contrib/amsc_wrap.obj build\temp.win-amd64-2.7\Release\src/contrib/UnionFind.obj build\temp.win-amd64-2.7\Release\src/contrib/AMSC.obj /OUT:build\lib.win-amd64-2.7\_amsc.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\src/contrib\_amsc.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release\src/contrib\_amsc.pyd.manifest
amsc_wrap.obj : warning LNK4197: export 'init_amsc' specified multiple times; using first specification
   Creating library build\temp.win-amd64-2.7\Release\src/contrib\_amsc.lib and object build\temp.win-amd64-2.7\Release\src/contrib\_amsc.exp
running build
running build_py
copying src\contrib\amsc.py -> build\lib.win-amd64-2.7
running install
running install_lib
copying build\lib.win-amd64-2.7\amsc.py -> framework\contrib\AMSC
copying build\lib.win-amd64-2.7\_amsc.pyd -> framework\contrib\AMSC
byte-compiling framework\contrib\AMSC\amsc.py to amsc.pyc
running install_egg_info
Writing framework\contrib\AMSC\amsc-0.0-py2.7.egg-info

USER@COMPUTER MINGW64 ~/projects/raven
$

Test RAVEN Dependencies

The test script can be used to verify that all necessary Python libraries are present and are of sufficient version for proper operation of RAVEN. It also reports the current versions of Python, the operating system, the compiler, and RAVEN modules. When reporting problems with RAVEN, the output of ./run_tests --library-report will often be useful:

USER@COMPUTER MINGW64 ~/projects/raven
$ ./run_tests --library-report
/c/Users/user/AppData/Local/Continuum/Miniconda2/Scripts/conda
da33097bca6990657c787b32711f5cc9e3c49f9e Tue, 9 May 2017 16:42:29 -0600
tag_number_22-59-gda33097bc
PYTHONPATH=C:\msys64\home\USER\projects\raven\framework\contrib;
PATH=C:\Users\user\AppData\Local\Continuum\Miniconda2\Library\bin;C:\Users\user\AppData\Local\Continuum\Miniconda2\Library\bin;C:\Users\user\AppData\Local\Continuum\Miniconda2\Scripts;C:\Users\user\AppData\Local\Continuum\Miniconda2;C:\msys64\usr\local\bin;C:\msys64\usr\bin;C:\msys64\usr\bin;C:\msys64\opt\bin;C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\msys64\usr\bin\site_perl;C:\msys64\usr\bin\vendor_perl;C:\msys64\usr\bin\core_perl
Python Executable:  C:\Users\user\AppData\Local\Continuum\Miniconda2\python.exe
Possible Python Executables on System:
C:\Users\user\AppData\Local\Continuum\Miniconda2\python.exe
OS: Windows-7-6.1.7601-SP1
Python: 2.7.13 |Continuum Analytics, Inc.| (default, Dec 19 2016, 13:29:36) [MSC v.1500 64 bit (AMD64)]
Git information:

Libraries report:

numpy 1.11.0
 <module 'numpy' from 'C:\Users\user\AppData\Local\Continuum\Miniconda2\lib\site-packages\numpy\__init__.pyc'>


h5py 2.6.0
 <module 'h5py' from 'C:\Users\user\AppData\Local\Continuum\Miniconda2\lib\site-packages\h5py\__init__.pyc'>


scipy 0.17.1
 <module 'scipy' from 'C:\Users\user\AppData\Local\Continuum\Miniconda2\lib\site-packages\scipy\__init__.pyc'>


sklearn 0.17.1
 <module 'sklearn' from 'C:\Users\user\AppData\Local\Continuum\Miniconda2\lib\site-packages\sklearn\__init__.pyc'>


matplotlib 1.5.1
 <module 'matplotlib' from 'C:\Users\user\AppData\Local\Continuum\Miniconda2\lib\site-packages\matplotlib\__init__.pyc'>


AMSC
 <module 'AMSC' from 'C:\msys64\home\USER\projects\raven\framework\contrib\AMSC\__init__.pyc'>


distribution1D
 <module 'crow_modules.distribution1Dpy2' from 'C:\msys64\home\USER\projects\raven\crow\install\crow_modules\distribution1Dpy2.pyc'>

interpolationND
 <module 'crow_modules.interpolationNDpy2' from 'C:\msys64\home\USER\projects\raven\crow\install\crow_modules\interpolationNDpy2.pyc'>

USER@COMPUTER MINGW64 ~/projects/raven
$

Test RAVEN installation

USER@COMPUTER MINGW64 ~/projects/raven
$ ./run_tests -j <number of concurrent processes to use>
/c/Users/user/AppData/Local/Continuum/Miniconda2/Scripts/conda
\tests\cluster_tests.test_mpi........................................................ skipped (not real test)
\tests\cluster_tests.test_pbsdsh..................................................... skipped (not real test)
\tests\cluster_tests.test_mpiqsub.................................................... skipped (not real test)
\tests\cluster_tests.test_mpiqsub_parameters......................................... skipped (not real test)
\tests\cluster_tests.test_mpiqsub_limitnode.......................................... skipped (not real test)
\tests\cluster_tests.test_mpiqsub_nosplit............................................ skipped (not real test)
\tests\cluster_tests.test_mpi_fake................................................... skipped (not real test)
\tests\crow.test_import................................................................................... OK
\tests\crow.test_utils.................................................................................... OK
\tests\crow.test_normal................................................................................... OK
\tests\crow.test_laplace.................................................................................. OK
\tests\crow.test_geometric................................................................................ OK
\tests\crow.test_svd...................................................................................... OK
\tests\crow.test_reduction................................................................................ OK
\tests\crow.test_pca_index................................................................................ OK
\tests\crow.test_mvn_pca.................................................................................. OK
\tests\crow.test_inverseMarginalforPCA.................................................................... OK
\tests\crow.test_marginalCdfForPCA........................................................................ OK
\tests\crow.test_cellProbabilityWeight.................................................................... OK
\tests\crow.test_transformationMatrix..................................................................... OK
\tests\crow.test_transformationMatrix_index............................................................... OK
\tests\framework.simple_framework.................. skipped (skipped (Missing executable: "../../RAVEN-opt"))
\tests\crow.test_svd_index................................................................................ OK
  .   .   .
(Many more lines of test messages)
  .   .   .
\tests\framework\VariableGroups.ROM....................................................................... OK
\tests\framework\VariableGroups.ExternalNodes............................................................. OK
\tests\framework\VariableGroups.SetOperations............................................................. OK
\tests\framework\VariableGroups.OrderedVariables.......................................................... OK
-------------------------------------------------------------------------------------------------------------
Ran 421 tests in 1016.9 seconds
421 passed, 47 skipped, 0 pending, 0 failed

USER@COMPUTER MINGW64 ~/projects/raven
$

Please note that this output may not exactly match your result due to tests being changed over time. However, there should be no failures if things are functioning properly.

Keeping RAVEN Up to Date

USER@COMPUTER MINGW64 ~/projects/raven
$ git pull
  .   .   .
(Output representing what changed from the last update)
  .   .   .

USER@COMPUTER MINGW64 ~/projects/raven
$ git submodule update
  .   .   .
(Output representing what changed from the last update)
  .   .   .

USER@COMPUTER MINGW64 ~/projects/raven
$ 

Any time Crow and/or RAVEN is updated from the repository, it should be rebuilt and its tests re-run.

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 MinGW 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:

USER@COMPUTER MINGW64 ~/projects/raven
$ which pdflatex
/c/Program Files (x86)/MiKTeX/miktex/bin/pdflatex

USER@COMPUTER MINGW64 ~/projects/raven
$ 

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

USER@COMPUTER MINGW64 ~/projects/raven
$ which pdflateks
which: no pdflateks in (Listing of directories in PATH)

USER@COMPUTER MINGW64 ~/projects/raven
$ 

Adding a New Directory to Your PATH

If you would like to permanently add the location of your pdflatex and biblatex commands to your environment, this can be done by editing your .bashrc file, which is located in your MSYS2 home directory. To do this, identify the location of the pdflatex and biblatex commands. For example, let's say that we want to add the directory C:\Program Files (x86)\MiKTeX\miktex\bin to the MSYS2 PATH environment variable. Using a text editor add the following to the end of file ~/.bashrc (the '~' character indicates your home directory):

# Add LaTex executables to the path
PATH="/c/Program Files (x86)/MiKTeX/miktex/bin:${PATH}"

Note that the backslash characters ('') in the Windows directory specification must be changed to forward slash characters ('/') for use in MSYS2. In addition, the drive specifier (in this case 'C:') is changed to a forward slash followed by the driver letter ('/c'). Any changes made to the .bashrc file will automatically be in effect for newly started shells. For existing shells, the following command may be used to have the changes take effect immediately:

USER@COMPUTER MINGW64 ~/projects/raven
$ source ~/.bashrc

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.

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. For example:

USER@COMPUTER MINGW64 ~/projects/raven/doc
$ ./make_docs.sh
removed `pdfs/analytic_tests.pdf'
removed `pdfs/raven_sdd.pdf'
removed `pdfs/raven_user_guide.pdf'
removed `pdfs/raven_user_manual.pdf'
removed `pdfs/requirements.pdf'
removed `pdfs/test_plan.pdf'
removed directory: `pdfs'
tag_number_13-1190-gef2c4dd
1,3c1
< tag\_number\_13-1190-gef2c4dd
< \\
< ef2c4ddd0b286649024eeeeee0ccafcd5930c76b Joshua J. Cogliati\\Mon, 27 Jun 2016 12:50:42 -0600
---
> ef2c4ddd0b286649024eeeeee0ccafcd5930c76b Joshua J. Cogliati Mon, 27 Jun 2016 12:50:42 -0600
Building in user_manual...
...Successfully made docs in user_manual
Building in user_guide...
...Successfully made docs in user_guide
Building in qa_docs...
...Successfully made docs in qa_docs
Building in tests...
...Successfully made docs in tests

USER@COMPUTER MINGW64 ~/projects/raven/doc
$ 

Troubleshooting


Don't find c headers during compilation of framework_modules

In some particular cases on Win10, the Visual Studio compiler does not find some the c headers, i.e. not all needed directories are in the INCLUDE path. When trying to make framework_modules, the compiler errors indicating he can not find a particular .h file, like:

$ make framework_modules
Building /home/USER/projects/raven/src/contrib/_amsc.so...
(cd /home/USER/projects/raven && unset CXX CC && if test `uname` = Darwin; then MACOSX_DEPLOYMENT_TARGET=10.9; export MACOSX_DEPLOYMENT_TARGET; fi && . /home/USER/projects/raven/scripts/setup_raven_libs && python ./setup.py build_ext build install --install-platlib=./framework/contrib/AMSC)
/c/Users/USER/Miniconda2/Scripts/conda
running build_ext
building '_amsc' extension
swigging src/contrib/amsc.i to src/contrib/amsc_wrap.cpp
C:\Users\USER\Miniconda2\Library\bin\swig.exe -python -c++ -Iinclude\contrib -IC:\msys64\home\USER\projects\raven\crow\contrib\include -o src/contrib/amsc_wrap.cpp src/contrib/amsc.i
creating build
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\src
creating build\temp.win-amd64-2.7\Release\src\contrib
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Iinclude\contrib -IC:\msys64\home\USER\projects\raven\crow\contrib\include -IC:\Users\USER\Miniconda2\include -IC:\Users\USER\Miniconda2\PC /Tpsrc/contrib/amsc_wrap.cpp /Fobuild\temp.win-amd64-2.7\Release\src/contrib/amsc_wrap.obj -std=c++11
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
amsc_wrap.cpp
 c:\users\USER\miniconda2\include\pyconfig.h(68): fatal error C1083: Cannot open include file: 'io.h': No such file or directory 
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.11.25503\\bin\\HostX64\\x64\\cl.exe' failed with exit status 2
make: *** [/home/USER/projects/raven/amsc.mk:10: /home/USER/projects/raven/src/contrib/_amsc.so] Error 1

It looks like the execution of VCVARSALL.BAT is not able to set up the environment properly, i.e. it cannot find the include path for the Windows 10 SDK include directories.

A possible solutions is to run MSYS2 with administrator rights for the compilation of the framework modules.


Check VS90COMNTOOLS variable

If VS90COMNTOOLS was not exported correctly, you will see an error message similar to the following:

make[1]: Entering directory '/home/WANGC/projects/raven/moose/framework/contrib/hit'
cython --cplus hit.pyx
make[1]: cython: Command not found
make[1]: *** [Makefile:19: hit.cpp] Error 127
make[1]: Leaving directory '/home/WANGC/projects/raven/moose/framework/contrib/hit'
cp: cannot stat '../../../moose/framework/contrib/hit/hit.so': No such file or directory
ls -l ../../../moose/python
total 6
drwxr-xr-x 1 WANGC Domain Users    0 Jun  1 10:05 calphad
drwxr-xr-x 1 WANGC Domain Users    0 Jun  1 10:05 chigger
drwxr-xr-x 1 WANGC Domain Users    0 Jun  1 10:05 ClusterLauncher
drwxr-xr-x 1 WANGC Domain Users    0 Jun  1 10:05 contrib
drwxr-xr-x 1 WANGC Domain Users    0 Jun  1 10:05 FactorySystem
drwxr-xr-x 1 WANGC Domain Users    0 Jun  1 10:05 GridVTKData
drwxr-xr-x 1 WANGC Domain Users    0 Jun  1 10:05 jacobiandebug
drwxr-xr-x 1 WANGC Domain Users    0 Jun  1 10:05 MooseDocs
drwxr-xr-x 1 WANGC Domain Users    0 Jun  1 10:05 mooseutils
-rw-r--r-- 1 WANGC Domain Users 1081 Jun  1 10:05 path_tool.py
drwxr-xr-x 1 WANGC Domain Users    0 Jun  1 10:05 peacock
drwxr-xr-x 1 WANGC Domain Users    0 Jun  1 10:05 postprocessing
-rw-r--r-- 1 WANGC Domain Users   20 Jun  1 10:05 run_tests
drwxr-xr-x 1 WANGC Domain Users    0 Jun  1 10:05 test_files
drwxr-xr-x 1 WANGC Domain Users    0 Jun  1 10:05 TestHarness
-rw-r--r-- 1 WANGC Domain Users   91 Jun  1 10:05 testroot
make: *** [/home/WANGC/projects/raven/raven.mk:12: hit] Error 2

When you see this message, you need to check your exported VS90COMNTOOLS variable. Please check above to see how to export VS90COMNTOOLS variable correctly.


Still didn't find vcvarsall.bat

After setting the VS90COMNTOOLS variable the vcvasrsall.bat file still isn't found, check carefully that the following folder structure exists for the VC folder:

  VC/
    target
    VCVARSALL.BAT

Especially make sure VCVARSALL.BAT is not inside the "target" folder.

Other problems

If you still have some problems, please check General Troubleshooting page first before you contact raven development teams.

⚠️ **GitHub.com Fallback** ⚠️