The deMon2k Home Page

Home | Program | Download | Support | Online Manual | Tutorials | News & Events | Publications |Mailing List| Developers

 
  Support :: Installation & Running | User's guide | FAQ | Mailing list | Contact  

Installation of deMon2k and running calculations   

This guide refers to the installation of the deMon2k master version using the install script based on CREX, shipped with the deMon2k software package. The installation guide is also available for download as a compressed postscript file (53 kb) and as a compressed pdf file (53 kb). For installing of other deMon2k branches see the Program Branches section.

  1. Before installing deMon2k
  2. How to install deMon2k
  3. How to compile deMon2k
  4. How to run deMon2k

1. Before installing deMon2k   

FORTRAN90 compiler
To install deMon you will need an Unix or Linux operating system running on your machine and a working FORTRAN90 compiler. If you do not have a FORTRAN90 compiler install it first. You can find different FORTRAN90 compilers in the net. Some are free of charge.

Bourne Again Shell
You will need a Bourne Again Shell (bash) for the installation of deMon. The bash is included in almost all current Linux distributions and installed by default. However, if you are running a Unix system like AIX or IRIX, the bash might be missing. If you are not sure if you have the Bourne Again Shell just type

which bash
in a console. If you have bash you should get a message like
/bin/bash
If not, you have to install bash first. You can check the web for available packages or contact your system administrator.

MPI
The deMon code is parallelized using the MPI (Message Passing Interface) routines. If you want to run deMon in parallel you need to install MPI in your system first (not included in the deMon package).

2. How to install deMon2k   

The deMon2k program is shipped as a packed archive deMon2k.sh (For obtaining the installation package see the download section). For the installation unpack the deMon archive deMon2k.sh first by typing

sh ./deMon2k.sh
then change into the unpacked directory deMon.x.y, where x.y corresponds to the version number. Inside this directory you will find the deMon program tree, the LICENSE file, a README file and the install script. If you want to install deMon accessible for all users of a maschine you should become root fist. Then run the installation script by typing
./install
And follow the instructions of the script. The script will first display the license text which you have to confirm. After this you will be asked for the directory, where you want to install deMon.
Where do you want to install deMon [/usr/local]?
The standard directory for installing deMon as root is
$CREX_ROOT=/usr/local
If you accept this just hit < Enter >, otherwise choose another directory by giving the absolute path. The script will check, if the path exists. If not, it will be create automatically. If you have already installed an older version of deMon, the script will ask you, if you want to update the version. If you choose to do so, the script will install the new version and make it the default. The older versions will not be deleted. If you try to install the same version again, you will be asked, if you want to override the version which is already installed. In this case, the old files will be deleted.
The installation script tries now to identify your operating system and the platform you are using. If your system is unknown to the script, you will have to specify compiler and link flags by yourself. For this purpose, you have to edit the file "database.new". Some instructions will be provided by the installation script. For more information see the README file in the directory deMon.x.y, the FAQ section of this web page or the deMon user's guide.
If your system was recognized by the script you will be asked for the type of installation.
    Choose a compilation type:

      1. Standard compilation
      2. Debug compilation
      3. Optimization compilation
      4. Parallel MPI compilation
      5. Parallel MPI debug compilation

    Select a number:
The installation will start. The install script uses CREX to do the compilation. You will see the message
Compiling with CREX
when CREX takes over the control. After the successful installation you will see the message
deMon installation successful
You should modify your profile according to the information provided by the installation script at the end of the installation process. If you are updating your deMon version, you will be asked if some files like AUXIS, BASIS and so on should be updated, too.
If the compilation was not successful the installation script will abort with the message
deMon compilation failed
In this case you should check the README file in the directory deMon.x.y for trouble shooting, the FAQ section of this web page or the deMon user's guide.

3. How to compile deMon2k   

Once deMon is installed in your system you might want to recompile an executable because you need to change some parameters or you want to include some modifications. The deMon program is shipped with two compilation scripts called CREX and crex (CReate EXecutable).

CREX
The CREX script can be used to recompile or create a (new) master version of deMon. This is done also by the installation script. If you have created during the installation e.g. an optimized version "opt" and you want to generate now a debug version "dbg", you can do this by running CREX. The master version is usually installed in a directory accessible for all users of a machine. The standard directory is /usr/local. Therefore, you should do this installation as root. CREX expects the following settings:

    $CREX_ROOT=/usr/local              ! or another directory where 
                                       ! deMon is/will be installed;
                                       ! will be installed; you have 
                                       ! to export this variable 
    $CREX_ROOT/deMon/.default-version  ! contains the version number 
                                       ! x.y of the version to be 
                                       ! compiled
    $CREX_ROOT/deMon/x.y/source/       ! directory for source files
    $CREX_ROOT/deMon/x.y/include/      ! directory for include files
    $CREX_ROOT/deMon/x.y/database/     ! directory for database files
The variable $CREX_ROOT must point to the directory where the master version of deMon is installed, if it is not installed in /usr/local. If all files are there type
    CREX
If you are running on a LINUX system the following menu can appear:
    Select compiler (Linux only).

      1. Portland Group pgf90
      2. Intel Fortran 90

    Enter a number:
Choose your compiler and type < Enter >. Afterward choose which kind of executable should be created.
    Choose a compilation type:

      1. Debug compilation
      2. Standard compilation
      3. Optimization compilation
      4. Parallel MPI compilation
      5. Parallel debug compilation

    Select a number:
CREX will start with the compilation. After successful compilation and linking CREX will terminate with the message
    Executable program deMon.x.y.* created.
  
    Normal termination of crex.
The executable is written to
    $CREX_ROOT/x.y/object.*/object.*/deMon.x.y.*
where the "*" stands for the type of executable, for example "opt" if you have generated an optimized version.
If the compilation was not successful the message
    Abnormal termination of crex.
appears. In this case you should check the README file in the directory deMon.x.y for trouble shooting, the FAQ section of this web page or the deMon user's guide.

crex
The crex script can create a local version of deMon. This is useful e.g. if a user needs to make modifications in some source or include files of deMon. crex will compile only the modified files and link them together with the unchanged files of the master version. Every user can therefore create his or her own version. crex expects the following settings:

    $CREX_ROOT=/usr/local              ! or another directory where 
                                       ! the master version of deMon
                                       ! is installed. The default 
                                       ! is /usr/local
    $CREX_ROOT/deMon/.default-version  ! contains the deMon version x.y
    $CREX_ROOT/deMon/object.*/         ! contains all object files 
                                       ! of the master version. The "*"
                                       ! denotes the kind of version, 
                                       ! e.g. "opt"
    $HOME/demon/                       ! main directory for the local 
                                       ! version (small characters!)
    $HOME/demon/.default-version       ! contains the deMon version x.y 
    $HOME/demon/x.y/source/            ! contains the version number 
                                       ! x.y of the version to be 
                                       ! compiled
    $HOME/demon/x.y/include/           ! contains modified include files 
                                       ! (directory must exist, 
                                       ! but can be empty)
Type
    crex
and follow the instructions which are similar to those of the CREX script (see above). After successful compilation the executable is written to
    $HOME/demon/x.y/object.*/deMon.x.y.*
If the compilation was not successful the message
    Abnormal termination of crex.
appears. In this case you should check the README file in the directory deMon.x.y for trouble shooting, the FAQ section of this web page or the deMon user's guide.


4. How to run deMon2k   

To run the deMon program you can use either the deMon script or you can run deMon directly. We recommend to use the deMon script.

Running deMon directly
Generate a working directory, e.g.

mkdir /tmp/job
Copy the executable, the AUXIS, BASIS and if necessary the ECPS and the MCPS file in that directory as well as your input file (note: The name of the input file must be "deMon.inp")
cp deMon.x.y.* /tmp/job/deMon.x.y.*
cp AUXIS /tmp/job/AUXIS
cp BASIS /tmp/job/BASIS
cp ECPS /tmp/job/ECPS
cp MCPS /tmp/job/MCPS
cp your.inp /tmp/job/deMon.inp
The "*" denotes the kind of version, e.g. "opt". Change to the directory
cd /tmp/job
and type
nohup deMon.x.y.* &

Running the deMon script
By default a deMon script for an NQS/PBS queuing system is installed in $CREX_ROOT/deMon/bin. This script is used in our group in CINVESTAV for working with deMon. It is only an example what can be done and it certainly has to be modified for other queuing systems and/or environments.
However, using this script as a template for other systems the modifications should be relatively easy to do. To run a job with the deMon script just type

deMon your.inp
where your.inp denotes the input file which must be in the current directory. You are asked to select an execution modus. If you are running NQS/PBS it could look similar to the following:
    Select an execution modus.

      1. Interactive job (background)
      2. Interactive job (foreground)
      3. NQS/PBS batch job in queue e at cobre
      4. NQS/PBS batch job in queue l at cobre
      5. NQS/PBS batch job in queue md at oro
      6. NQS/PBS batch job in queue md at plata
      7. NQS/PBS batch job in queue xl at uranio
      8. NQS/PBS batch job in queue xxl at uranio

    Enter a number:
Afterward, the script checks which deMon versions are available. The script tries to read first the version number in your home directory $HOME/demon/.default-version. If this file is not available, it will take the version which is specified in the $CREX_ROOT/deMon/.default-version file. You can choose then between the available executables, e.g.:
    The following program versions are available:

      1. /usr/local/deMon/x.y/object.opt/deMon.x.y.opt
      2. /usr/local/deMon/x.y/object.dbg/deMon.x.y.dbg
      3. /home/florian/demon/x.y/object.opt/deMon.x.y.opt
      4. /home/florian/demon/x.y/object.dbg/deMon.x.y.dbg

    Enter a number:
After choosing the executable the calculation is started. The output files will be written to $HOME/demon/x.y/outputs after the calculation is finished. You can also specify a different output directory. See the man page for the deMon script or type
deMon -h
to get further information.




The deMon user's guide   

The deMon user's guide can be downloaded as a compressed postscript file (86 Mb), as a pdf file (18 Mb) or in HTML format. The current guide covers the basic input structure of deMon2k and gives an overview and a description of the keywords which are available. Furthermore, the output files generated by deMon2k are described and a list of user adjustable parameters (e.g. maximum number of atoms/orbitals, maximum RAM etc.) is given.
For the installation of deMon2k, please see the installation guide on this web page.




Frequently asked questions   

In this section answers are provided to questions which often occur when installing or running the deMon2k program.

  1. Getting the program
  2. Installation of deMon2k
  3. Running deMon2k

1. Getting the program   

2. Installation of deMon2k   

3. Running deMon2k   




Questions and Remarks   

Please, send any question/remark concerning deMon2k to the following e-mail: demon2k-l@mailman.ucalgary.ca




Contact   




  Last Update: 28th April 2021 Webmaster