Resgrp:comp-photo-dyn/mctdh90.56dv/install/cluster dv
MCTDH developer
(Explanation/diferreces MCTDH User vs. Developer)
Synchronizing MCTDH directories
- First of all, to install the MCTDH package you have to go login to your cluster account.
ssh USERNAME@login-0.cx1.hpc.ic.ac.uk
Note: It is very important to log in with login-0 in order to load the license permissions.
- Create the folder where to save your personal version of MCTDH. We recommend to do this inside /home/gauss-develop. For instance, you shouls create something such as:
mkdir mctdh_david
ans inside this folder:
mkdir mctdh90.31
where 90.31 is the version of MCTDH
- Create the bin folder in your $HOME directory if you do not have already one. In /home/$USER type:
mkdir bin
- Copy the getrsync script into this folder
- Create a symbolic link of this script
ln -s getrsync putrsync
- Create an empty folder called leer
mkdir leer
- Inside the script getrsync define, between lines 18 to 21:
local: local MCTDH, in other words, the directory where to install and compile MCTDH. This should be something such as:
local=/home/gaussian-devel/mctdh_david/mctdh$ver
remote: remote MCTDH directory, this corresponsd to our group account Graham Worth's machine
remote=/user/worth/robbear/mctdh_david/mctdh$ver # remote MCTDH directory
host: remote host incuding username. This is the name of our group account.
host=robbear@che-gwlinux.bham.ac.uk
leer: an empty folder, this directory is needed in order not to expand the wildcards
leer=/home/dm107/temp/leer
- Inside the folder /home/gauss-develop/mctdh_david/mctdh90.31 download the compiled uncompressed souce of this version typing:
getrsync -v90.31
The script is going to synchronize both MCTDH directories, Graham and yours. Check that the directories are correct. For example:
From: robbear@che-gwlinux.bham.ac.uk:/user/worth/robbear/mctdh90.31 To : /home/gaussian-devel/mctdh_david/mctdh90.31 Options : -avvvz -e ssh -b --suffix=_bk20 OK ? (y/n)
- Answer "Yes"
Intallation and compilation of MCTHD in Graham's machine
- Log in into our group account in Graham's machine.
ssh -X robbear@che-gwlinux.bham.ac.uk
- You should now be logged into the $HOME directory (/user/worth/robbear). Create the folder where to save your personal version of MCTDH. We recommend to do this inside /home/gauss-develop. For instance, you shouls create something such as:
mkdir mctdh_david
ans inside this folder:
mkdir mctdh90.31
where 90.31 is the version of MCTDH
- Make a backup of your bash profile. During the installation of the MCTDH package your bash profile will be changed, thus saving it is a good preventive measure:
cp .bachrc .bashrc_13_10_2025
- First of all, you should make a backup of your bash profile if you already have one. During the installation of the MCTDH package your bash profile will be changed, thus saving it is a good preventive measure. Inside your $HOME directory (/Users/$USER):
cp .bachrc .bashrc_13_10_2025
- Check that the following lines are in the .bashrc profile:
# # Added by hand on 5 Nov 2008 with Ben to use the repository and compile MCTDH # export PRCS_REPOSITORY=/user/worth/mctdh/PRCS export PRCS_CONFLICT_EDITOR=/usr/bin/vi # # to use PORTLAND compiler # export PATH=$PATH:/global/software/pgi/linux86/6.0/bin export PGI=/global/software/pgi # # MUTIL # export PATH=$PATH:/user/worth/mctdh/utils/bin/ export MUTIL_SRC_PATH=$MCTDH_DIR/source # # End of what was added by hand on 5 Nov 2008 #
- Inside this flder, type:
prcs checkout -r90.31 gmctdh
- Inside the folder install, run the installation script typing:
./install_mctdh
- The install script asks a few simple questions, and automatically generates the executables and documentation:
1) The script requests your permission to modify your .bashrc profile.
For your convenience I will write some statements to your configuration files (i.e. to ~/.profile or ~/.bashrc or ~/.cshrc or ~/.kshrc). Your old ~/.XXX configuration file will be saved to ~/.save-XXX-379. Choose: b) write the commands to my ~/.bashrc file (for bash users). Or : c) rather write them to my ~/.cshrc file (for csh and tcsh users). Or : k) rather write them to my ~/.kshrc file (kcsh users). Or : p) please, rather write them to my ~/.profile file. (alternative for ksh and bash users (not recommended)). Or : y) yes, write the commands to my ~/.bashrc file. (same as b)). Or : n) no, do not touch my configuration files. (b|c|k|p|y|n) ? :
- Answer "yes"
2) The scrip asks to remove the lines from a a previous installation.
There are already lines written by install_mctdh to your "/user/worth/robbear/.bashrc" file. They read: #*MCTDH*A*********************************************************************** # Following lines written by install_mctdh. Wed Nov 5 17:31:12 GMT 2008 export MCTDH_DIR=/user/worth/robbear/mctdh90.31 . /user/worth/robbear/mctdh90.31/install/mctdh.profile if [ -f ~/.mctdhrc ] ; then . ~/.mctdhrc ; fi #*MCTDH*B***********************************************************************
- Answer "yes"
3) The script requests your permission to copy the file .mctdhrc to your $HOME directory.
The file mctdhrc may be copied to $HOME/.mctdhrc. The .bashrc will then source .mctdhrc. Doing so, the bash-functions cdm and minstall will be available and a link $HOME/mctdh -> $MCTDH_DIR will be installed. Shall I copy mctdhrc to $HOME/.mctdhrc (y/n) ? :
- Answer "yes"
4) In UNIX there are two variants of how to place the bytes in a word. These variants are called LITTLE ENDIANS (le) and BIG ENDIANS (be). Select the kind of endians of your machine, in this case you have to choose the LITTLE ENDIANS format:
In UNIX there are two variants of how to place the bytes in a word. These variants are called LITTLE ENDIANS (le) and BIG ENDIANS (be). You will be able to read binary files created on different machines as long as they all use the same format, i.e. all are either le or be. If you use the g77, you are tied to the le format, but when you use the IBM compiler you are tied to the be format. The compilers: alpha, intel, absoft, and pfg77 can perform a byte swap to either format. Do you want the le or be format for those compilers? Choose from: "y" or "le" if you want the LITTLE ENDIANS format. "n" or "be" if you want the BIG ENDIANS format. (If you do not know what to do, choose "y".) (y|n) ? :
- Answer "yes"
5) The program asks you about compile the stored documentation in Latex files.
Some of the documentation is stored as Latex files. These need to be compiled before they can be read. Would you like to compile the Latex documentation now ? Choose: y) yes Or : n) no
- Answer "No"
6) The script shows you the parameters chosen for the installation, and asks you about compiling the progam.
Would you like to compile the programs now ? Choose: y) yes Or : n) no (y|n) ? :
- Answer "Yes".
- If the installation has been successful, you should see the message:
******************************************************************************** ******************** Finished Installation (install_mctdh) ******************** ******************** Sat Dec 20 19:48:09 GMT 2008 ******************** ********************************************************************************
- At the end of the installation process, don't forget to source your .bashrc in order to set some environment variables. Simply type:
source ~/.bashrc
When the .bashrc is sourced, the the hidden file .mctdhrc will then be sourced as well. The .mctdhrc script sets the link:
~/mctdh -> /user/worth/robbear/mctdh_david/mctdh90.31
and defines the bash-function cdm and menv.
Installing the program as an developer
- Go back to your personal account if you did not close the window, or login in again.
ssh USERNAME@login-0.cx1.hpc.ic.ac.uk
Note: It is very important to log in with login-0 in order to load the license permissions.
- First of all, you should make a backup of your bash profile if you already have one. During the installation of the MCTDH package your bash profile will be changed, thus saving it is a good preventive measure. Inside your $HOME directory (/Users/$USER):
cp .bachrc .bashrc_13_10_2025
- Go to the folder where you want to save your personal version of MCTDH.
cd /home/gaussian-develop/mctdh_david/mctdh90.31
- Inside this folder type in order to
getrsync -v90.31
The script is going to synchronize both MCTDH directories, Graham and yours. Check that the directories are correct. For example:
From: robbear@che-gwlinux.bham.ac.uk:/user/worth/robbear/mctdh90.31 To : /home/gaussian-devel/mctdh_david/mctdh90.31 Options : -avvvz -e ssh -b --suffix=_bk20 OK ? (y/n)
- Answer "Yes"
Define the name of the machine and the compiler
- The installation script is in the following folder: /home/gaussian-develop/mctdh_david/mctdh90.31/install.
- Go to this folder:
cd install
- Usually the installation would be done simply running the installation script called install_mctdh. However, we already know that the default choices of compiler and platform are not the most appropriates, thus we are going to set some things "manually".
- The file platform.cnf.priv is a file that the script install_mctdh will use to define some variables. Inside the install folder copy the template of this file "platform.cnf.priv.template" to platform.cnf.priv.
cp platform.cnf.priv.template platform.cnf.priv
- Inside platform.cnf.priv replace the "xxx" by the name of your machine. In order to know the name of your machine you just have to type:
uname -n
In this case the "xxx" has to be substituted by ....
- Complete the definition of the variable $MCTDH_COMPILER with the name of a FORTRAN 77 compiler installed in your system. You can find a list of the compilers accepted by MCTDH and the appropriated label at the file compile.cnf in the same directory. In this case we are going to use the Intel compiler.
MCTDH_COMPILER=intel_omp
Installation script
- Run the installation script typing:
./install_mctdh
This install script can be stopped any time with "Ctrl C", thus if you think you have made a wrong choice, just run it again!
- The install script asks a few simple questions, and automatically generates the executables and documentation:
1) The script requests your permission to modify your .bashrc profile.
For your convenience I will write some statements to your configuration files (i.e. to ~/.profile or ~/.bashrc or ~/.cshrc or ~/.kshrc). Your old ~/.XXX configuration file will be saved to ~/.save-XXX-379. Choose: b) write the commands to my ~/.bashrc file (for bash users). Or : c) rather write them to my ~/.cshrc file (for csh and tcsh users). Or : k) rather write them to my ~/.kshrc file (kcsh users). Or : p) please, rather write them to my ~/.profile file. (alternative for ksh and bash users (not recommended)). Or : y) yes, write the commands to my ~/.bashrc file. (same as b)). Or : n) no, do not touch my configuration files. (b|c|k|p|y|n) ? :
- Answer "yes"
2) The scrip asks to remove the lines from a a previous installation.
There are already lines written by install_mctdh to your "/user/worth/robbear/.bashrc" file. They read: #*MCTDH*A*********************************************************************** # Following lines written by install_mctdh. Wed Nov 5 17:31:12 GMT 2008 export MCTDH_DIR=/user/worth/robbear/mctdh90.31 . /user/worth/robbear/mctdh90.31/install/mctdh.profile if [ -f ~/.mctdhrc ] ; then . ~/.mctdhrc ; fi #*MCTDH*B***********************************************************************
- Answer "yes"
3) The script requests your permission to copy the file .mctdhrc to your $HOME directory.
The file mctdhrc may be copied to $HOME/.mctdhrc. The .bashrc will then source .mctdhrc. Doing so, the bash-functions cdm and minstall will be available and a link $HOME/mctdh -> $MCTDH_DIR will be installed. Shall I copy mctdhrc to $HOME/.mctdhrc (y/n) ? :
- Answer "yes"
4) In UNIX there are two variants of how to place the bytes in a word. These variants are called LITTLE ENDIANS (le) and BIG ENDIANS (be). Select the kind of endians of your machine, in this case you have to choose the LITTLE ENDIANS format:
In UNIX there are two variants of how to place the bytes in a word. These variants are called LITTLE ENDIANS (le) and BIG ENDIANS (be). You will be able to read binary files created on different machines as long as they all use the same format, i.e. all are either le or be. If you use the g77, you are tied to the le format, but when you use the IBM compiler you are tied to the be format. The compilers: alpha, intel, absoft, and pfg77 can perform a byte swap to either format. Do you want the le or be format for those compilers? Choose from: "y" or "le" if you want the LITTLE ENDIANS format. "n" or "be" if you want the BIG ENDIANS format. (If you do not know what to do, choose "y".) (y|n) ? :
- Answer "No"
5) The program asks you about compile the stored documentation in Latex files.
Some of the documentation is stored as Latex files. These need to be compiled before they can be read. Would you like to compile the Latex documentation now ? Choose: y) yes Or : n) no
* Answer "No"
6) The script shows you the parameters chosen for the installation, and asks you about compiling the progam.
Would you like to compile the programs now ? Choose: y) yes Or : n) no (y|n) ? :
- Answer "No". We need to compile the program "manually" in order to set some options of the compiler.
- If the installation has been successful, you should see the message:
******************************************************************************** ******************** Finished Installation (install_mctdh) ******************** ******************** Sat Dec 20 19:48:09 GMT 2008 ******************** ********************************************************************************
- At the end of the installation process, don't forget to source your .bashrc in order to set some environment variables. Simply type:
source ~/.bashrc
When the .bashrc is sourced, the the hidden file .mctdhrc will then be sourced as well. The .mctdhrc script sets the link:
mctdh -> /home/gaussian-develop/mctdh_name/mctdh90.31/mctdh90dev
and defines the bash-function cdm and menv.
- Now you should notice that:
- A link to the folder /home/gaussian-devel/mctdh has been created in your HOME directory.
- Now you have two new commands:
cdm: the command cdm cd-es to /Users/$USER/DYN/mctdh90dev and any subdirectory
menv: the MCTDH environment variables are listed
dd_generator: script which allows to create the required files to run dynamics calculation. The script asks a few simple questions, and automatically generates all the necessary files.
Compilation
- One change more stills remaining. Inside the install folder, open the file compile.cnf (copy from compile.cnf_be)
Between lines 343 and 361 there are the default settings for the Intel compiler. The variables $FC and $CC define the FORTRAN and C compilers respectively. As you can see the default Intel Fortran anc compilers are ifort, and icc.
Either line 347 or 348 must be commented
MCTDH_FFLAGS_OPT="-O2 -align all -openmp -xT -cm -complex_limited_range -ftz -ip -unroll -w" MCTDH_FFLAGS_OPT="-O2 -align all -xP -cm -complex_limited_range -ftz -ip -unroll -w"
MCTDH_FFLAGS_OPT="-O2 -align all -xP -cm -complex_limited_range -ftz -ip -unroll -w" is for serial
MCTDH_FFLAGS_OPT="-O2 -align all -openmp -xT -cm -complex_limited_range -ftz -ip -unroll -w" is for parallel
Choses the appropriate one depending on how you want to run MCTDH
- Now, finally we can compile MCTDH. Type for serial:
compile mctdh
or for parallel:
compile -p x86_64_omp mctdh
- If you did all the steps correctly and in the right order, you should see the message:
Executable /home/gaussian-devel/mctdh_david/mctdh90.31/bin/x86_64/mctdh90 created. Congratulations, the compilation was successful. ------ compile --- Sat Dec 20 20:25:50 GMT 2008 --- good bye! ------------- --------------------------------------------------------------------------------