Installation problems

General discussion of the Cambridge quantum Monte Carlo code CASINO; how to install and setup; how to use it; what it does; applications.
Post Reply
varelse
Posts: 44
Joined: Mon Jun 10, 2013 10:17 pm

Installation problems

Post by varelse »

I downloaded Casino and installed it on two computers, both with Xubuntu 13.10. In both cases, the following warning was encountered during the compilation.

Code: Select all

/home/varelse/programs/CASINO/utils/wfn_converters/gp/jeep_io.c: In function ‘readwf1_’:
/home/varelse/programs/CASINO/utils/wfn_converters/gp/jeep_io.c:42:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
   fread( &ns, sizeof(int), 1, wfinfile );
        ^
/home/varelse/programs/CASINO/utils/wfn_converters/gp/jeep_io.c:43:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
   fread( &ng, sizeof(int), 1, wfinfile );
        ^
/home/varelse/programs/CASINO/utils/wfn_converters/gp/jeep_io.c: In function ‘readwf2_’:
/home/varelse/programs/CASINO/utils/wfn_converters/gp/jeep_io.c:82:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
   fread( &ns, sizeof(int), 1, wfinfile );
        ^
/home/varelse/programs/CASINO/utils/wfn_converters/gp/jeep_io.c:83:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
   fread( &ng, sizeof(int), 1, wfinfile );
        ^
/home/varelse/programs/CASINO/utils/wfn_converters/gp/jeep_io.c:113:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
   fread( cg, sizeof(double), 2*ng, wfinfile );
This seems to be connected to a wavefunction converter, not to Casino itself, so I assumed that it may be not important. And indeed, on laptop it seems to work. But on the PC there is a problem, it seems that it starts many copies of the same program, all writing to the same output file. I get the out file in which everything is written several times. The "Job started: " line gives slightly different times for each "copy" so I suspect there are really some instances of Casino running at the same time. I thought that it may be connected to some error in parallelization but I recompiled Casino with the sequential arch file and the problem still exists.
Mike Towler
Posts: 239
Joined: Thu May 30, 2013 11:03 pm
Location: Florence
Contact:

Re: Installation problems

Post by Mike Towler »

Hi Blazej,

I presume you're trying to install 2.12.1 rather than the current beta? The official 2.12.1 is now getting to be a year old and quite a few crucial bug fixes arising from problems with newer compilers only appear in the current beta (which will become the official CASINO 2.14 hopefully in the next 3 or 4 weeks).

I suspect your problem will be fixed by my 2.13.228 patch:

Code: Select all

---[v2.13.228]---
* Modified wfn_converters/gp/jeep_io.c to stop multiple instances of compilers
  whining about 'unused results' from returned values of fread. Renamed gp
  directories to gp-jeep-qbox and added some more documentation.
  -- Mike Towler, 2013-12-17
This must be subsequent to whatever you're trying to install, since your gp directory hasn't been renamed to gp-jeep-qbox (to reflect the three names of this mysterious external code which, to be honest, we no longer support - the converter is only in the distribution in order that some generous person might upgrade it).

Let me know if installing the current_beta helps. You can be one of my beta testers if you like!

Best wishes,
Mike
varelse
Posts: 44
Joined: Mon Jun 10, 2013 10:17 pm

Re: Installation problems

Post by varelse »

I installed beta on PC. These warnings during compliation did not appear, and there were no other problems with compilation.

The sequential version (linuxpc-gcc) seems to work. The parallel one (linuxpc-gcc-parallel) has the same problem as before - it seems as if it is launching multiple instances of Casino writing to the same output file. The output looks like this:

Code: Select all

CASINO v2.13.267 [Mike Towler] (4 February 2014)
Running on varelse-S2600CP [linuxpc-gcc-parallel]
Binary compiled in opt mode
Job started: wto, 4 lut 2014, 13:11:48 CET
 ------------------------------------------------------------------------------

                   #####
                  ##   ##    ##     ####   ##  #   ##   ####
                  ##        ####   ##      ##  ##  ##  ##  ##
 ------------------------------------------------------------------------------
##       ######      ##  ##  ## ###  ##  ##
                  ##   ##  ##  ##  ##  ##  ##  ##  ##  ##  ##
                   #####   ##  ##   ####   ##  ##   #   ####

                     The Cambridge Quantum Monte Carlo Code
  ----------------------------------------------------------------      Main Auth                   #####
er, N.D.Drummond and P.Lopez Rios

                  ##   ##    ##     ####   ##  #   ##   ####
atory,
                   #####
y of Cambridge, Cambridge, CB3 OHE, UK.
                  ##        ####   ##      ##  ##  ##  ##  ##
                  ##   ##    ##     ####   ##  #   ##   ####
 ------------------------------------------------------------------------------
##       ######      ##  ##  ## ###  ##  ##
                  ##   ##  ##  ##  ##  ##  ##  ##  ##  ##  ##

                 ##   ##  ##  ##  ##  ##  ##  ##  ##  ##  ##

                  #####   ##  ##   ####   ##  ##   #   ####
         No redistribution or modification without explicit permission.

                   #####
Cambridge Quantum Monte Carlo Code
-------------------
                CASINO v2.13.267 [Mike Towler] (4 February 2014)
                  ##   ##    ##     ####   ##  #   ##   ####
14)
      Main Authors : R.J.Needs, M.D.Towler, N.D.Drummond and P.Lopez Rios
 Sequential run: not using MPI.
   ##      ##  ##  ##  ##  ##
      Main Authors : R.J.Needs, M.D.Towler, N.D.Drummond and P.Lopez Rios
                  ##       ##  ##   ####   ##  ### ##  ##  ##
tory,
                University of Cambridge, Cambridge, CB3 OHE, UK.
                  ##       ######      ##  ##  ## ###  ##  ##
            Theory of Condensed Matter Group, Cavendish Laboratory,
                     CASINO web page: vallico.net/casinoqmc
#
                University of Cambridge, Cambridge, CB3 OHE, UK.
                   #####   ##  ##   ####   ##  ##   #   ####
 
                    Current contact: mdt26 at cam.ac.uk
                      The Cambridge Quantum Monte Carlo Code
         No redistribution or modification without explicit permission.

                CASINO v2.13.267 [Mike Towler] (4 February 2014)
 ------------------------------------------------------------------------------


      Main Authors : R.J.Needs, M.D.Towler, N.D.Drummond and P.Lopez Rios
         No redistribution or modification without explicit permission.


 Sequential run: not using MPI.
 ------------------------------------------------------------------------------
                University of Cambridge, Cambridge, CB3 OHE, UK.
 Started 2014/02/04 13:11:48.605

                    CASINO web page: vallico.net/casinoqmc
 Sequential run: not using MPI.

                     Current contact: mdt26 at cam.ac.uk

         No redistribution or modification without explicit permission.

 ------------------------------------------------------------------------------
 Started 2014/02/04 13:11:48.605

 Sequential run: not using MPI.

 ------------------------------------------------------------------------------

                   #####
                  ##   ##    ##     ####   ##  #   ##   ####
                  ##        ####   ##      ##  ##  ##  ##  ##
                  ##       ##  ##   ####   ##  ### ##  ##  ##
                  ##       ######      ##  ##  ## ###  ##  ##
                  ##   ##  ##  ##  ##  ##  ##  ##  ##  ##  ##
                   #####   ##  ##   ####   ##  ##   #   ####

                     The Cambridge Quantum Monte Carlo Code
                CASINO v2.13.267 [Mike Towler] (4 February 2014)

      Main Authors : R.J.Needs, M.D.Towler, N.D.Drummond and P.Lopez Rios

            Theory of Condensed Matter Group, Cavendish Laboratory,
 ------------------------------------------------------------------------------
       CASINO web page: vallico.net/casinoqmc


                     Current contact: mdt26 at cam.ac.uk

                   #####
n or modification without explicit permission.

                  ##   ##    ##     ####   ##  #   ##   ####
 ------------------------------------------------------------------------------
 ------------------------------------------------------------------------------
4 13:11:48.607
   ####   ##  ### ##  ##  ##

                 ##       ######      ##  ##  ## ###  ##  ##

Sequential run: not using MPI.
#  ##  ##  ##  ##  ##  ##  ##

                  #####   ##  ##   ####   ##  ##   #   ####
                   #####
                     The Cambridge Quantum Monte Carlo Code
                  ##   ##    ##     ####   ##  #   ##   ####
                  ##        ####   ##      ##  ##  ##  ##  ##
4)
                  ##       ##  ##   ####   ##  ### ##  ##  ##
                  ##       ######      ##  ##  ## ###  ##  ##
.Lopez Rios
                  ##   ##  ##  ##  ##  ##  ##  ##  ##  ##  ##
                   #####   ##  ##   ####   ##  ##   #   ####
atory,

               University of Cambridge, Cambridge, CB3 OHE, UK.
                     The Cambridge Quantum Monte Carlo Code
                     CASINO web page: vallico.net/casinoqmc
                CASINO v2.13.267 [Mike Towler] (4 February 2014)


                      Current contact: mdt26 at cam.ac.uk
      Main Authors : R.J.Needs, M.D.Towler, N.D.Drummond and P.Lopez Rios


         No redistribution or modification without explicit permission.
            Theory of Condensed Matter Group, Cavendish Laboratory,

                University of Cambridge, Cambridge, CB3 OHE, UK.
 ------------------------------------------------------------------------------

                     CASINO web page: vallico.net/casinoqmc
 Started 2014/02/04 13:11:48.607


                      Current contact: mdt26 at cam.ac.uk
 
equential run: not using MPI.
         No redistribution or modification without explicit permission.

                  #####
                  ##   ##    ##     ####   ##  #   ##   ####
------------------
                  ##        ####   ##      ##  ##  ##  ##  ##
 Started 2014/02/04 13:11:48.608
                  ##       ##  ##   ####   ##  ### ##  ##  ##

                  ##       ######      ##  ##  ## ###  ##  ##
 Sequential run: not using MPI.
                  ##   ##  ##  ##  ##  ##  ##  ##  ##  ##  ##

                   #####   ##  ##   ####   ##  ##   #   ####

                     The Cambridge Quantum Monte Carlo Code
                CASINO v2.13.267 [Mike Towler] (4 February 2014)

      Main Authors : R.J.Needs, M.D.Towler, N.D.Drummond and P.Lopez Rios

            Theory of Condensed Matter Group, Cavendish Laboratory,
                University of Cambridge, Cambridge, CB3 OHE, UK.

 ------------------------------------------------------------------------------
   Current contact: mdt26 at cam.ac.uk

         No redistribution or modification without explicit permission.
vallico
Site Admin
Posts: 4
Joined: Fri Sep 14, 2012 6:50 am
Location: Vallico Sotto
Contact:

Re: Installation problems

Post by vallico »

Can I get more details? This is more likely to be a problem with the setup of your machine than a problem with CASINO.

STANDARD SET OF REQUESTS FOLLOWS:

(1) you're running in a bash shell?

(2) The output of 'echo $CASINO_ARCH' is...? (presumably linuxpc-gcc-parallel?)

(3) You haven't modified the CASINO/arch/linuxpc-gcc-parallel.arch file or any of the files it 'includes'?

(4) What flavour of MPI do you have installed?

(5) How are you compiling CASINO? By using the install script, or by typing on the command line? Details please.

(6) How exactly are you running CASINO? With the runqmc script? What command line arguments are you using?

(7) Have you checked that you can use 'mpif90' to compile a 'hello world' parallel test program that works as it should? (or equivalently do you have other functioning parallel software that runs with the same compiler/mpi combination?). If not, try compiling the following with 'hello_parallel.f90 -o hello_parallel' then run it - do you get the output you expect?

Code: Select all

program hello_parallel

  ! Include the MPI library definitons:
  include 'mpif.h'

  integer numtasks, rank, ierr, rc, len, i
  character*(MPI_MAX_PROCESSOR_NAME) name

  ! Initialize the MPI library:
  call MPI_INIT(ierr)
  if (ierr .ne. MPI_SUCCESS) then
     print *,'Error starting MPI program. Terminating.'
     call MPI_ABORT(MPI_COMM_WORLD, rc, ierr)
  end if

  ! Get the number of processors this job is using:
  call MPI_COMM_SIZE(MPI_COMM_WORLD, numtasks, ierr)

  ! Get the rank of the processor this thread is running on.  (Each
  ! processor has a unique rank.)
  call MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr)

  ! Get the name of this processor (usually the hostname)
  call MPI_GET_PROCESSOR_NAME(name, len, ierr)
  if (ierr .ne. MPI_SUCCESS) then
     print *,'Error getting processor name. Terminating.'
     call MPI_ABORT(MPI_COMM_WORLD, rc, ierr)
  end if

  print "('hello_parallel.f: Number of tasks=',I3,' My rank=',I3,' My name=',A,'')",&
       numtasks, rank, trim(name)

  ! Tell the MPI library to release all resources it is using:
  call MPI_FINALIZE(ierr)

end program hello_parallel
The mysterious 'vallico'.
varelse
Posts: 44
Joined: Mon Jun 10, 2013 10:17 pm

Re: Installation problems

Post by varelse »

Ok. This was a problem with my machine. Before installing Casino I tried to install MPI using by installing packages libcr-dev, mpich2 and mpich2-doc. It turned out that after uninstalling them, and then installing all the needed software using Casino install script, Casino works.
Mike Towler
Posts: 239
Joined: Thu May 30, 2013 11:03 pm
Location: Florence
Contact:

Re: Installation problems

Post by Mike Towler »

Hi Blazej,

Glad to hear you've sorted the problem out - but as one of the elite group of former CASINO Summer School Champions, I would have expected no less. Good job! :D
varelse
Posts: 44
Joined: Mon Jun 10, 2013 10:17 pm

Re: Installation problems

Post by varelse »

Well, in fact it wasn't me who solved this, it was a girl from our group, who is much more a computer geek than I am :) (and probably she saw CASINO for the first time).
Post Reply