A11. How do I set up CASINO under Windows?

microsoft_casino

CASINO was written for UNIX/Linux systems and is not supported directly under Windows. Nevertheless, it runs well enough in Windows using Cygwin, an emulation layer that provides a Linux-like compilation and execution environment for applications. Under Cygwin, CASINO works as if it’s running on a Linux workstation using the GCC compiler suite. Although Cygwin is considered an emulation layer, this only concerns system calls. The calculation speed of CASINO is native, and its performance is quite acceptable.

These instructions do not cover the installation and general use of Cygwin; please refer to Cygwin’s documentation for that. The instructions were tested under Windows 7 Ultimate 64-bit and Windows 8.1 Enterprise 64-bit, using Cygwin 1.7.28, with all Cygwin packages up-to-date as of March 2014.

Installation and compilation

1. Download and install Cygwin (www.cygwin.com), either 32-bit or 64-bit version.

2. Install at least the following packages and all their dependencies using Cygwin’s setup program (which is also its package manager) in addition to those packages that are installed by default:

gcc, g++, gfortran, make, bc, bzip2

3. If you want to run in parallel (which believe me, you do, if your machine has more than 1 CPU core) then you you should also install the following to get MPI support:

libopenmpi, libopenmpi-devel, libopenmpicxx1, libopenmpifh2, libopenmpiuse1, openmpi.

It’s not obvious if all these are necessary, but that’s what we installed and everything subsequently worked. Essentially, MPI should just work on Cygwin straight out of the box.

4. Set up your Cygwin environment so that you are using the bash shell (should be the default anyway).

5. Follow the instructions in the CASINO manual for downloading, unpacking, installing and configuring CASINO using its install script. The option [p] of the install script allows you to specify the value of CASINO_ARCH manually. The correct value is “cygwin-gcc” under Cygwin, or “cygwin-gcc-parallel” if, as is likely, you want to run CASINO in parallel. The auto-detect option of the install script should also be able to figure out the existence of these two CASINO_ARCHs all by itself (though because of a Cygwin bug preventing asynchronous operations, the auto-detection will run much more slowly than usual).

6. Use the install script’s compilation option to compile CASINO.

7. Run CASINO using the runqmc script from the Cygwin command line. Use of e.g. the -p flag to runqmc will allow you to run on more than one processor.

Technical Note about targeting Cygwin vs native environment under Windows

There are two ways to use the Cygwin environment to compile an application originally written for Linux and run it under Windows.

The first (recommended) is to compile it targeting the Cygwin environment. In this case, the application will require Cygwin to run, but will see an almost complete Linux-like environment, so usually little or no special care needs to be taken. The application does not need to be aware that it’s running on Windows. Specifying “cygwin-gcc” or “cygwin-gcc-parallel” as the value for CASINO_ARCH is intended to do this.

The second way is to compile the application to natively target Windows. You still need Cygwin for compilation (as it includes the necessary tools), but in principle the application then does not require Cygwin to run; it will run as a native Windows application. From our point of view this obviously involves extra headache because of issues such as the difference in path separator (/ vs \) and the fact that Windows doesn’t know what a symlink is. Specifying the CASINO make tag “NATIVE_WINDOWS = yes” in your arch file indicates that Unix filenames are to be converted to Windows filenames, and symbolic links are to be substituted with their targets. Specifying the “windowspc-gcc“, “windowspc-g95“, or “windowspc-ifort” value for CASINO_ARCH attempts to do this. However, note that doing so is not recommended, as it adds a needless layer of additional complication. Running outside of the Cygwin layer will also prevent the use of all of CASINO’s useful utilities, in particular the runqmc script. The windowspc-xx arches should therefore be considered to be obsolete and unsupported.

Visual cues

We at CASINO HQ understand that, as a Windows user, you are only able to contemplate performing actions for which there is a corresponding small picture of it on your computer that you are able to click. You will probably also find it helpful if an animation of a dog or something pops up after you type go, in order to say something like “Hi there. You appear to be running a quantum Monte Carlo calculation. Would you like me to help you with that..?“. We’re sorry, but CASINO doesn’t do either of these things, and we appreciate that your granny probably isn’t going to like that. If you wish to continue in your old Windows traditions, nonetheless, you might contemplate sending us a very large amount of money on a regular basis so that we can buy a yacht.

Zoltan Radnai (zradnai ‘at’ gmail.com) may be able to help you with any problems you may have, as he has a functioning copy of Windows.

Please log in to rate this.
0 people found this helpful.


Category: A: Installing CASINO

← Frequently Asked Questions

Leave a Reply