15 June 2018

649. N/EDA in GAMESS. 1. Recompiling GAMESS US with NBO6

I need to do energy decomposition analysis (EDA), but only have licenses for Gaussian and NBO6 (i.e. not ADF, turbomole, QChem etc.). NEDA isn't supported by NBO6 with gaussian (afaik).

NWChem, my usual gaussian alternative, doesn't support NBO6 beyond writing a .47 file.

Enter GAMESS US. I've been trying out gamess every few years, but I've found that it's slow and unreliable (very difficult to get SCF convergence) for the systems I work with (polyanions). Some of this may obviously be down to my lack of familiarity with the code -- there are probably plenty of satisified users of GAMESS US.

Either way, NBO6 suppports NEDA with GAMESS US. Also, GAMESS US does two different types  of   EDA: the common Morokuma-Kitaura (MOROKM) one (although only with HF) and an alternative approach by Su and Li that's referred to by GAMESS as LMOEDA (or CMOEDA).

MOROKM and LMOEDA as supported out of the box by GAMESS, but to get it to do NEDA you need to re-link it against NBO. Luckily it's even easier than the instructions in the NBO gamess file (i.e. no need to edit code).

NOTE: I could only link with gfortran 4.9 (jessie). gfortran 6.3 (stretch) failed to link (messages re -fPIC; recompiling gamess with -fPIC didn't solve it).

To compile gamess, see e.g. http://verahill.blogspot.com/2013/06/4xx-gamess-us-2013-r1-on-debian-wheezy.html

Once you've done the ddi/comp and compall steps, edit lked and search for NBO. Change to

set NBO=true set NBOLIB="/opt/nbo6/bin/gmsnbo.i8.a"
assuming that this location is correct.

Then do lked as in the post above.

17 April 2018

648. Compiling Quantum Espresso 6.2.1 on debian 8

Time has come for me to expand my horizons and skills. As I drift farther and farther away from my origins as an organic chemist and more and more towards inorganic materials science and non-discrete, extended systems, localised orbital DFT (i.e. 'standard' DFT) is not always looking as an appropriate method.

NWChem
Time thus to start using periodic systems and planewave basis sets. I've started working with nwpw and pspw in nwchem, and since I've used nwchem since ca 2002, in terms of setting up jobs and getting results it's been fairly straightforward. Understanding what all the options do and what's appropriate is another issue, but that's something I can work out empirically by comparing with benchmark systems (beginning to discover the importance of simulation cell now...)

Either way, nwchem does not yet afford a way of computing raman spectra for pspw jobs, which is one of the properties I'm interested in. Quantum Espresso, on the other hand, does, and is geared towards materials science in a way that nwchem isn't. Although quantum-espresso is included in the debian repos, I prefer to compile my own version. So, here I am.

I did this on one of my AMD nodes, but will follow up later with a post using intel MKL on my intel nodes. I only used the debian math libs, and not the AMD ACML (now replaced with ACL?), which I probably should've. Maybe I'll do an updated post on that later.

Note: I specify libblas.a instead of -lblas in the configure step since I have a custom openblas package installed as well, but which didn't work during compilation of QE.

Quantum Espresso (on an 8 core AMD processor)

'make' for gwl failed, and I didn't want to figure out why, so I skipped it. You can try doing make all instead of doing make for individual parts as I do below (type make to see what your options are).


sudo mkdir /opt/QE
sudo chown $USER /opt/QE
mkdir ~/tmp/QE -p
mkdir $HOME/scratch/QE -p
cd ~/tmp/QE
wget https://gitlab.com/QEF/q-e/-/archive/qe-6.2.1/q-e-qe-6.2.1.tar.gz
tar xvf q-e-qe-6.2.1.tar.gz
cd q-e-qe-6.2.1/

edit environment_variables
20 PREFIX=`/opt/QE` 21 BIN_DIR=$PREFIX/bin 22 PSEUDO_DIR=$PREFIX/pseudo 23 # Beware: everything in $TMP_DIR will be destroyed ! 24 TMP_DIR=$HOME/scratch/QE

sudo apt-get install libblas-dev libfftw3-dev libopenmpi-dev
./configure --prefix=/opt/QE/bin --exec-prefix=/opt/QE/bin/ FC=mpif90 BLAS_LIBS="/usr/lib/libblas/libblas.a" LIBS="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread" CPPFLAGS="-I/usr/lib/openmpi/include"
sudo apt-get install libblas-dev libfftw3-dev libopenmpi-dev
-------------------------------------------------------------------- ESPRESSO can take advantage of several optimized numerical libraries (essl, fftw, mkl...). This configure script attempts to find them, but may fail if they have been installed in non-standard locations. If a required library is not found, the local copy will be compiled. The following libraries have been found: BLAS_LIBS="/usr/lib/libblas/libblas.a" LAPACK_LIBS=-L/opt/ATLAS/lib -llapack -lblas FFT_LIBS= -lfftw3 Please check if this is what you expect. If any libraries are missing, you may specify a list of directories to search and retry, as follows: ./configure LIBDIRS="list of directories, separated by spaces" Parallel environment detected successfully.\ Configured for compilation of parallel executables. For more info, read the ESPRESSO User's Guide (Doc/users-guide.tex). --------------------------------------------------------------------

make -j8 pwall cp ld1 upf xspectra tddft
make couple epw gui gwl

echo 'export PATH=$PATH:/opt/QE/bin' >>~/.bashrc
echo 'export PSEUDO_DIR=/opt/QE/pseudo' >>~/.bashrc
cp * -R /opt/QE/

source ~/.bashrc

To benchmark:
 make test-suite


14 February 2018

647. Linda/G16 and ecce + slurm

I had the opportunity to test G16 with Linda on my cluster. Suprisingly, I observed a decent reduction in computational time for geometry optimisation, and a fair reduction for vibrational analysis.

Computational time -- geometry optimisation
1x6 cores: 100%
2x6 cores: 56% (2 nodes)
3x6 cores: 44% (3 nodes)

Computational time -- normal mode computation
1x6 cores: 100%
2x6 cores: 63% (2 nodes)
3x6 cores: 57% (3 nodes)

In no case was the speed up good enough that it actually makes long-term sense to use Linda (need less than 50% for 2 nodes and 33% or less for 3 nodes), but if you're itching for quick results, it might be worth it.

Either way, as part of this I wrote a CONFIG.Linda for ECCE and SLURM:
Gaussian-16: /opt/gaussian/g16a/g16/g16 perlPath: /usr/bin/ qmgrPath: /usr/bin/ xappsPath: /usr/bin/ Slurm { #!/bin/csh #SBATCH -p linda #SBATCH --time=$walltime #SBATCH --output=slurm.out #SBATCH --job-name=$submitFile #SBATCH --nodes=$nodes #SBATCH --cpus-per-task=$ppn } Gaussian-16FilesToRemove{ core } Gaussian-16Command{ set path = ( /opt/nbo6/bin $path ) set nnodes = `scontrol show job $SLURM_JOBID|grep NodeList|sed 's/=/\t/'|gawk '{print $2}'|tail -n 1` sed -i "2s/^/%LindaWorkers=$nnodes\n/" g16.g16in sed -i '3s/^/%UseSSH\n/' g16.g16in sed -i "s/nprocshared.*/nprocshared=$ppn./" g16.g16in setenv GAUSS_SCRDIR /home/me/scratch setenv GAUSS_EXEDIR /opt/gaussian/g16a/g16 setenv GAUSS_ARCHDIR /opt/gaussian/g16a/g16/arch setenv GAUSS_BSDDIR /opt/gaussian/g16a/g16/bsd setenv GAUSS_LEXEDIR /opt/gaussian/g16a/g16/linda-exe /opt/gaussian/g16a/g16/g16< $infile > $outfile }
The slurm partition linda has all the nodes that has g16.