Skip to content

Running Cactus under Windows

Michele Mottini edited this page Apr 5, 2015 · 5 revisions

Tested with Windows 8.1 64bit and Windows 7 64bit

Requires at least 1 GB of free disk space.

Short version

..if you are already familiar with Catus:

  • Install Cygwin (see detailed instructions below)

  • Start the Cygwin terminal and download Cactus from within it

  • Replace the Cactus/lib/make/known-architectures/cygwin file with this one

  • Create Cactus configuration and compile them as usual from within the Cygwin terminal

Install Cygwin.

The installers are at https://cygwin.com/ - setup-x86.exe (32 bit Windows) or setup-x86_64.exe (64 bit)

The installer prompts for:

  • Download source

    'Install from Internet' (default) should be OK

  • Root Directory

    c:\cygwin64 is OK, it can be changed, but do not choose a directory under c:\Program Files

  • Install for

    'All Users' (default)

  • Local Package Directory

    Select an empty temporary folder - the installer will download there all the packages before installing them, they can be removed after the installation is complete

  • Internet Connection

    'Direct Connection' (default) should be OK

  • Download site

    Choose a site that looks near you

  • Select packages

    Cygwin comes with a huge number of Unix utilities and languages, here you select which one to install. Make sure you select at least these ones:

    • curl (7.41.0-1)

    • perl (5.14.4-3)

    • subversion (1.8.11)

    • git (2.1.4-1)

    • gcc-core (4.9.2-3)

    • gcc-fortran (4.9.2-3)

    • gcc-g++ (4.9.2-3)

    • make (4.1-1)

    In parenthesis the versions that have been tested, if you are using a more recent Cygwin version some of those numbers could be different - they probably still work OK

    Note the handy 'Search' control at the top of the window - use it to find the packages

    Feel free to select more stuff - e.g. you favorite editor. The Cgywin installer can be run multiple times to add or remove packages, so if you forgot something - or want to remove something - just launch again the installer and add/remove packages from the list.

    After clicking on 'Next' the installer will download all the selected packages

  • Create Icons

    Last step - select one or the other or both as you prefer

Installing and compiling Cactus

Start 'Cygwin64 Terminal' ('Cygwin Terminal' on 32 bit system) - using the shortcut on the desktop or in the start menu

You get a bash shell prompt in your home directory, that (in Windows) is <Cygwin install dir.>\home\<your Windows user name>. If you are used to Linux you should feel right at home, if you normally use Windows everything is weird now.

Check that the compilers and utilities are there:

  gcc --version
  c++ --version
  gfortran --version
  perl --version
  curl --version

should all answer with a message specifying their version

Download the 'GetComponents' script:

  curl https://raw.githubusercontent.com/gridaphobe/CRL/ET_2011_10/GetComponents > GetComponents.pl

Download the Cactus 4.2 complete thorn list:

  curl http://svn.cactuscode.org/Utilities/trunk/ThornLists/Cactus_4.2.0.th > Cactus_4.2.0.th
```

Use the GetComponent script to download the complete Cactus code:

perl GetComponents.pl Cactus_4.2.0.th

(answer '-' to the promts asking for a user name)

This will take a while. It creates a Cactus directory containing all the Cactus flesh and thorns code, makefiles, documentation, parameter files and whatnot

Replace the `Cactus/lib/make/known-architectures/cygwin` file with [this one](https://raw.githubusercontent.com/michelemottini/Cactus/master/Windows/cygwin)

Place in the Cactus directory [WaveToyC.th](https://raw.githubusercontent.com/michelemottini/Cactus/master/Windows/WaveToyC.th) file.

Move to the Cactus directory and create the 'wave' configuration:
```
  cd Cactus
  make wave-config THORNLIST=WaveToyC.th
```
this step creates a configs/wave directory with all the settings needed to compile the thorns specified in `WaveToyC.th`

Compile the 'wave' configuration:

make wave

You should see some warning about "'noreturn' function does return" - just ignore them. This step creates the executable: `exe/cactus_wave.exe`

Run the simulation:

./exe/cactus_wave.exe arrangements/CactusWave/WaveToyC/par/wavetoyc_gnuplot.par

this creates a `wavetoyc_gnuplot` directory with a bunch of `.asc` files containing the results

To plot the results use the Window version of Gnuplot, available at [here](http://sourceforge.net/projects/gnuplot/files/gnuplot/)
Clone this wiki locally