| |||
The deMon2k Home PageHome | 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.
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 bashin a console. If you have bash you should get a message like
/bin/bashIf 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).
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.shthen 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
./installAnd 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/localIf 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.
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 CREXwhen CREX takes over the control. After the successful installation you will see the message
deMon installation successfulYou 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.
deMon compilation failedIn 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.
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 filesThe 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
CREXIf 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.
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
crexand 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.
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/jobCopy 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.inpThe "*" denotes the kind of version, e.g. "opt". Change to the directory
cd /tmp/joband 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.inpwhere
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 -hto 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.
tar -xvf deMon2k.*.tar.gz
where * stands for the platform, e.g. x86_linux. Change into the new directory, typ ./install
and follow the installation steps../deMon2k.sh
. Change into the directory deMon.x.y and run the installation script by typing ./install
. For further reference see the installation guide on this web page.database.new
which is located in the directory deMon.x.y/x.y/database
, where x.y
is the version number of deMon (two or three digits, separated by dots). If you open that file you should see the following:
F90 edit FFLAGS edit LFLAGS edit LIBS EXCLUDEReplace the
edit
in the first line by the name of your FORTRAN90 compiler. For example, if you have installed the Intel fortran compiler the first line should be:
F90 ifortThe
edit
in the second line must be replaced by the compilation flags. You must have at least a flag for double precision padding. Many (but not all!) compilers have for this the -r8
flag. You can add more flags separated by space (e.g. flags for code optimizations). The third line should contain the linking flags. As first try use the same flags as for the FFLAGS
. Try then to compile again. For additional information see the
README file which is located in deMon.x.y/x.y/database
.
deMon installation failed
. What can be the reason?/usr/local
you have to
become root first.F90 NAMEwhere
NAME
is you compiler. Then the command
which NAMEshould give you the location of the compiler.
LFLAGS -L/usr/lib/gcc-lib/i386-redhat-linux/2.96 LIBS -lg2cexpects the library
libg2c.a
(LIBS) in the directory /usr/lib/gcc-lib/i386-redhat-linux/2.96
(LFLAGS). Check that all the libraries you need are in the locations which are specified after LFLAGS or add the corresponding paths to your LD_LIBRARY_PATH
variable.
database.new
. See how to edit this file.
Abnormal termination of CREX
. What can be the reason?/usr/local
you have to
become root first..default-version
file with the correct deMon version you want to compile in $CREX_ROOT/deMon
where $CREX_ROOT
is a variable which contains the installation directory of the deMon tree. If you have installed deMon in another location as the default /usr/local
this variable must point to the directory where deMon was installed. If you want to compile the version x.y
the file .default-version
must contain x.y
in its first line.
Abnormal termination of crex
. What can be the reason?.default-version
file with the correct deMon version you want to compile in $CREX_HOME/demon
(small "m" for user version !) where $CREX_HOME
is a variable which contains the installation directory of the demon tree (user version). If you have installed the user version of deMon in another location as the default $HOME
this variable must point to the directory where deMon was installed. If you want to compile the version x.y
the file .default-version
must contain x.y
in its first line.
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 |   |