by Pasquale Pavone for exciting neon
Purpose: Here, it will be given fundamental information on how to set exciting before starting with the calculation performed in the hands-on tutorials.
Table of Contents
|
1. Setting environment variables
The next instructions have to be executed only once before starting your first tutorial!
For a correct installation of exciting neon, users need to set some important environment variables:
- EXCITINGROOT = Full path of the directory in which the exciting neon code can be found. For "HoW exciting! 2023" participants this path is fixed to /data/scratch/how-exciting-2023/exciting-git .
The above variable is used to define other environment variables
- EXCITINGTOOLS = Directory where the tutorial scripts are located, defined as $EXCITINGROOT/tools/tutorial_scripts .
- TIMEFORMAT = Output format for writing on the screen the running elapsed time, used in some script.
- JUPYTER_PATH = Path to locate custom jupyter kernels for using jupyter tutorials.
The setting of these variables can be done in a bash shell by appending to the ~/.bashrc file in your $HOME directory the following shell snippet.
#=====================================================================================
# The following shell variables are needed for executing scripts in exciting tutorials
#
export EXCITINGROOT=/data/scratch/how-exciting-2023/exciting-git
export EXCITINGTOOLS=$EXCITINGROOT/tools/tutorial_scripts
#-------------------------------------------------------------------------------------
export TIMEFORMAT=" Elapsed time = %0lR"
#-------------------------------------------------------------------------------------
export WRITEMINMAX="1"
ulimit -s unlimited
module purge
module load intel-oneapi
export OMP_NUM_THREADS=4
#-------------------------------------------------------------------------------------
export PYTHONPATH=$PYTHONPATH:$EXCITINGTOOLS/stm
export PATH=$PATH:$EXCITINGTOOLS:$EXCITINGROOT/bin:$EXCITINGTOOLS/stm
export JUPYTER_PATH=/data/scratch/how-exciting-2023/jupyter-tutorials-venv
alias xcrysden=/usr/global/xcrysden-1.5.24/xcrysden
#=====================================================================================
A shell script to add this snippet to your $HOME/.bashrc file is the script UPDATE-bashrc.sh that you can find in the directory /data/scratch/how-exciting-2023 . It can be executed as following (from now on and for the whole tutorials the symbol $ will indicate the shell prompt)
$ /data/scratch/how-exciting-2023/UPDATE-bashrc.sh
In order to activate the changes in $HOME/.bashrc, you must use the commands
$ source $HOME/.bashrc
You can check if everything went well by typing
$ echo $EXCITINGROOT
/data/scratch/how-exciting-2023/exciting-git
Everything is ok if you get /data/scratch/how-exciting-2023/exciting-git as a replay.
2. Download and compile exciting
Contrary to general users of exciting, you do not have to download and compile exciting.
A shared-memory version of exciting, exciting_smp compiled with ifort (intel-2019), is available for you in /data/scratch/how-exciting-2023/exciting-git/bin
($EXCITINGROOT/bin). You can check this by typing on the command line the following command
$ ls $EXCITINGROOT/bin
exciting_smp
3. Tutorial scripts
All the scripts used in the exciting tutorials are stored in the directory $EXCITINGROOT/tools/tutorial_scripts .
4. Work directory
Before starting the calculations of the hands-on tutorial, a work directory has to be created.
- We strongly suggest to create this directory as /home/tutorials on the local disk of the workstation where you are sitting.
$ mkdir /home/tutorials
- Due to what is said above, you should always use the same workstation. Notice that the workstations in the computer room are labeled as pool## where ## ranges from 01 to 48.
- Move to the work directory /home/tutorials and start the Tutorials for exciting Neon (link) omitting How to set environment variables for tutorial scripts and Download and compile exciting (these two tutorials are needed to perform the steps you have already done here!)
$ cd /home/tutorials
5. Tips for Linux beginners
i) Useful commands for our workstations (as implemented in the standard $HOME/.bashrc file)
- For editing a file named NAMEFILE, the suggested editor command (using kwrite) is
$ g NAMEFILE
- For visualizing PNG, JPEG, and PDF files, use the command okular. A useful short cut is oku, as shown in the following.
$ oku NAMEFILE.png
- For visualizing specifically the file PLOT.png, you can use the simple command opng :
$ opng