Compiling CASINO in Windows 7

General discussion of the Cambridge quantum Monte Carlo code CASINO; how to install and setup; how to use it; what it does; applications.
Amir_Shamkhali
Posts: 10
Joined: Thu Mar 20, 2014 11:48 am

Compiling CASINO in Windows 7

Post by Amir_Shamkhali »

Dear All
I have installed Cygwin in Windows 7 including all of the gcc, cc, c++, g++, gfortran, and etc. to compile CASINO in my system. Compilation was done successfully without any errors. However, when I defined path I used:
export PATH="$PATH:/home/CASINO/bin_qmc"
Now when I type: runqmc --help
this message appears:
$ runqmc --help
-bash: runqmc: command not found
what is wrong in my system? Thanks for your attention
Zoltan_Radnai
Posts: 7
Joined: Wed Jan 08, 2014 2:24 pm

Re: Compiling CASINO in Windows 7

Post by Zoltan_Radnai »

There is a small mistake in your PATH. "/home/CASINO" is almost certainly not where the CASINO directory is. On Cygwin, your home directory is at "/home/<username>", where <username> is typically your Windows user name. Try to specify the PATH like this:

Code: Select all

export PATH="$PATH:/home/<username>/CASINO/bin_qmc"
Mike Towler
Posts: 239
Joined: Thu May 30, 2013 11:03 pm
Location: Florence
Contact:

Re: Compiling CASINO in Windows 7

Post by Mike Towler »

Hi Amir,

As you know, CASINO is designed to work under Unix/Linux - hence the Cygwin requirement, and we officially provide no support for Windows.
This is not because we're being mean; it's just that none of us actually have a copy of Windows that we can test it with (here it's seen as an OS for grannies and secretaries ;) ).

All the useful information we were aware of several years ago (and which thus might be out of date) is in question A11 of the FAQ:

http://vallico.net/casinoqmc/faqs/a11/

Does that help? If not, and if Zoltan's advice doesn't work, then I'm afraid you'll have to figure it out yourself or ask some Windows guru. If you discover anything useful, let me know and I'll update the FAQ.

Sorry not to be more helpful.

Best wishes,
Mike
Amir_Shamkhali
Posts: 10
Joined: Thu Mar 20, 2014 11:48 am

Re: Compiling CASINO in Windows 7

Post by Amir_Shamkhali »

Dear Mike
Unfortunately, intel site downloads are not available from Iran. Thus I have to use "g95" or "Compaq visual fortran" to compile CASINO. I try to perform environmental changes mentioned in A11 section. Then I will compile CASINO again. I will report you the result. Thanks so much
Zoltan_Radnai
Posts: 7
Joined: Wed Jan 08, 2014 2:24 pm

Re: Compiling CASINO in Windows 7

Post by Zoltan_Radnai »

CASINO runs well under Cygwin, I used version 2.10 a lot for production calculations. "linuxpc-gcc" is the correct architecture to use in CASINO's install script. gfortran from the gcc suite is available as standard in Cygwin and is suitable. I don't recommend using g95, Intel's or Compaq's fortran or Microsoft Visual compilers. You should not follow the instructions in A11, they are very dated and not appropriate.

You should definitely make the correction to PATH as I mentioned above.

If you have any more questions or run into further problems running CASINO under Cygwin, I can probably help.
Amir_Shamkhali
Posts: 10
Joined: Thu Mar 20, 2014 11:48 am

Re: Compiling CASINO in Windows 7

Post by Amir_Shamkhali »

Dear Zoltan
I used gfortran to compile CASINO without any problem. But the same problem exists. Please tell me what version of cygwin is appropriate? When I installing cygwin, I select all of the libraries and development tool to be installed. I have used the latest version of cygwin.
Mike Towler
Posts: 239
Joined: Thu May 30, 2013 11:03 pm
Location: Florence
Contact:

Re: Compiling CASINO in Windows 7

Post by Mike Towler »

Hi Zoltan,
You should not follow the instructions in A11, they are very dated and not appropriate.
You're quite right of course - as A11 itself admits.

As you have the exalted developer status :o I wonder if you might take charge of rewriting A11 in time for the new release next week - using Amir's experience as a test bed? I can then adapt what you write for some up-to-date 'Windows advice' in the manual as well.. Doesn't have to be perfect - just something that is relevant and not complete rubbish.. - anything is better than the current effective absence of information.

I would do this myself, but I just don't have access to a copy of Windows..

Cheers,
Mike
Zoltan_Radnai
Posts: 7
Joined: Wed Jan 08, 2014 2:24 pm

Re: Compiling CASINO in Windows 7

Post by Zoltan_Radnai »

Dear Amir,

I updated a Cygwin 32-bit installation to the latest version of all packages today under Windows 7 64-bit. I installed CASINO 2.12.1, it compiled and ran without problems. The hydrogen single-atom example worked fine. I also freshly installed Cygwin 64-bit under Windows 8.1 64-bit and installed CASINO there as well. Also no problems compiling and running the example. Here are some things you should check:

* Make sure in Cygwin you have installed at least gfortran, g++, make, bc, bzip2 and allowed the Cygwin setup to install all their dependencies.
* Make sure you are using bash.
* Run the CASINO install script (in the CASINO directory). It can't auto-detect the value of CASINO_ARCH under Cygwin, so select option "p" to pick a value manually, and specify "linuxpc-gcc" without the quotes.
* Compile CASINO using the install script. Make sure there are no errors.
* Exit the install script with "q" to save its configuration. Restart your Cygwin terminal or window.
* Check that the install script has correctly updated your PATH to contain the bin_qmc directory.
* Check that the ~/CASINO/bin_qmc directory contains the runqmc script (where ~ is your home directory, such as /home/<username>)

Let me know what you find.
Amir_Shamkhali
Posts: 10
Joined: Thu Mar 20, 2014 11:48 am

Re: Compiling CASINO in Windows 7

Post by Amir_Shamkhali »

Dear Zoltan
I select p option but it does not work because I deleted the previous compiled file and its arch. When I select "n" option, it wants fortran and gcc compilers. I enter gfortran and it accepts, but when I use "linuxpc-gcc" it is not accepted (cannot find compiler), but when I enter gcc it accepts. what is wrong?
Amir_Shamkhali
Posts: 10
Joined: Thu Mar 20, 2014 11:48 am

Re: Compiling CASINO in Windows 7

Post by Amir_Shamkhali »

Dear Mike
I'm trying to install new version of CASINO in Windows, first single processor and second multi processor. When this aims is achieved, we can update A.11 section according to our new experience.
Post Reply