<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9205204096304834269</id><updated>2011-11-28T02:15:08.885+01:00</updated><category term='phonons'/><category term='compilation'/><category term='SIESTA'/><category term='supercomputers'/><category term='wien2k'/><title type='text'>A One Little DFT Calculations Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dft-blog.natanzon.eu/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dft-blog.natanzon.eu/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>noddeat</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9205204096304834269.post-5430815306463800315</id><published>2010-06-22T18:42:00.005+02:00</published><updated>2010-06-22T19:33:01.629+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='phonons'/><category scheme='http://www.blogger.com/atom/ns#' term='wien2k'/><title type='text'>Using Phonopy with Wien2k</title><content type='html'>In this post I will describe how to calculate various phonon properties from Wien2k calculations, using Atsushi Togo's &lt;a href="http://phonopy.sourceforge.net/"&gt;Phonopy&lt;/a&gt; program. As an example, I will use lithium hydride (LiH) which has a simple NaCl structure with a lattice constant of 4.01A (optimized in GGA approximation).&lt;br /&gt;&lt;br /&gt;1. LiH has an &lt;span style="font-weight: bold;"&gt;fcc&lt;/span&gt; structure, but phonopy requires the &lt;span style="font-weight: bold;"&gt;P1&lt;/span&gt; symmetry for Wien2k. So we convert LiH.struct to &lt;span style="font-weight: bold;"&gt;P1&lt;/span&gt; by running &lt;span style="font-family:courier new;"&gt;x supercell&lt;/span&gt; and creating 1x1x1 cell with a type &lt;span style="font-weight: bold;"&gt;P&lt;/span&gt;. This cell should have 8 atoms - 4 Li and 4 H.&lt;br /&gt;&lt;br /&gt;2. Create INPHON file with the following content:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ATOM_NAME = Li H&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;NDIM =  1 1 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;LSUPER = .TRUE.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The number of dimensions should be larger (e.g. &lt;span style="font-family:courier new;"&gt;NDIM 2 2 2&lt;/span&gt;), but for the testing purposes I've set it to 1 1 1. Then run:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;phonopy --wien2k=LiH.struct &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This creates the DISP file and several struct files with the supercells (in this particular case - LiH.structS, LiH.structS-001, LiH.structS-002. Having a look at the DISP file:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;1  1  0  0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;5  1  0  0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And having a look at LiH.structS-* files, one can see, that in these files atom 1 (Li) and atom 5 (H) are displaced by 0.01A in x direction.  You can change the displacement manually, if you want.&lt;br /&gt;&lt;br /&gt;3. Next step is to run two Wien2k calculations for LiH.structS-001 and LiH.structS-002 structure files, respectively, and save the resulting *scf files.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Important!&lt;/span&gt; The init for this calculations should begin from symmetry, e.g.:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;init_lapw -b -s symmetry -vxc 13 -numk 100 -sp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is important to start from symmetry because sgroup could reduce the symmetry, which will make phonopy unable to create a proper FORCES file. Also, the RMT spheres can overlap (check it with &lt;span style="font-family:courier new;"&gt;x nn&lt;/span&gt;!) and should be reduced if needed.&lt;br /&gt;&lt;br /&gt;4. Once you have LiH001.scf and  LiH002.scf from the above calculations, copy them in the directory with INPHON and DISP files, and run the following to generate FORCES:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;phonopy --wien2k=LiH.struct -f LiH001.scf LiH002.scf&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The order of scf files in this command should match the order of the atoms in DISP! If everything is ok, than the FORCES file will be saved and you can calculate various properties.&lt;br /&gt;&lt;br /&gt;5. Backup INPHON to INPHON.1 and modify it for your needs as described in the &lt;a href="http://phonopy.sourceforge.net/input-files.html"&gt;phonopy manual&lt;/a&gt;. It is important that you comment or remove &lt;span style="font-family:courier new;"&gt;LSUPER=TRUE&lt;/span&gt; line. To calculate phonon DOS the new INPHON may look as follows:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ATOM_NAME = Li H&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;NDIM =  1 1 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;MP = 21 21 21&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The phonon DOS can be calculated by invoking the command:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;phonopy --wien2k=LiH.struct -p&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;References&lt;/span&gt;&lt;br /&gt;1. &lt;a href="http://phonopy.sourceforge.net/input-files.html"&gt;Phonopy web page&lt;/a&gt;, where you may find the documentation.&lt;br /&gt;2. &lt;a href="http://blog.zhuli.name/archives/6679"&gt;Using phonopy with VASP&lt;/a&gt; (in Chinese, but readable with Google translate for non-speakers).&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9205204096304834269-5430815306463800315?l=dft-blog.natanzon.eu' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dft-blog.natanzon.eu/feeds/5430815306463800315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dft-blog.natanzon.eu/2010/06/using-phonopy-with-wien2k.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/5430815306463800315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/5430815306463800315'/><link rel='alternate' type='text/html' href='http://dft-blog.natanzon.eu/2010/06/using-phonopy-with-wien2k.html' title='Using Phonopy with Wien2k'/><author><name>noddeat</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9205204096304834269.post-1824441519171948110</id><published>2010-03-07T00:04:00.005+01:00</published><updated>2010-03-07T00:36:41.999+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wien2k'/><category scheme='http://www.blogger.com/atom/ns#' term='compilation'/><title type='text'>Parallel compilation of Wien2k on Intel Itanium architecture</title><content type='html'>Here I briefly describe how to compile Wien2k on the supercomputer with Intel Itanium processors. I suppose that you have read the Wien2k UserGuide and know how to compile the serial version of the program.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;What do we need: &lt;/span&gt;&lt;br /&gt;Intel Fortran Compiler (ifort), I use version 11.0&lt;br /&gt;Gcc or Intel C/C++ compiler (icc)&lt;br /&gt;Intel CMKL libraries (I have used 10.1.1.019 version)&lt;br /&gt;FFTW 2.1.5 (not 3.0!!) compiled with mpi support&lt;br /&gt;MPI (I use MPICH2)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Compiling serial version&lt;/span&gt;&lt;br /&gt;For serial version the compilation options given to siteconfig are the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;System type&lt;/span&gt;: K    Linux (Intel ifort 11.x compiler + mkl )&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Fortran compiler&lt;/span&gt;: ifort&lt;br /&gt;&lt;span style="font-style: italic;"&gt;C compiler&lt;/span&gt;: cc&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Compiler options, BLAS and LAPACK&lt;/span&gt;:&lt;br /&gt;O   Compiler options:        -FR -mp1 -w -prec_div -pc80 -pad -align -DINTEL_VML -traceback&lt;br /&gt;L   Linker Flags:            $(FOPT) -L/opt/intel/cmkl/10.1.1.019/lib/64 -lguide -pthread&lt;br /&gt;P   Preprocessor flags       '-DParallel'&lt;br /&gt;R   R_LIB (LAPACK+BLAS):     $(FOPT) -L/opt/intel/mkl/10.1.1.019/lib/64 -lmkl_lapack -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lguide -pthread&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;Note: replace the path to your own one, and mind that &lt;/span&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;lib/64&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; libraries are needed for Itanium. If you have Intel Xeon or similar processor, use &lt;/span&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;lib/emt64&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; libraries instead.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Compiling FFTW&lt;/span&gt;&lt;br /&gt;This is needed only for the parallel compilation. &lt;a href="http://fftw.org/fftw-2.1.5.tar.gz"&gt;Download FFTW 2.1.5&lt;/a&gt;, unpack it and use the following commands for the compilation:&lt;br /&gt;&lt;br /&gt;export CC=icc&lt;br /&gt;export F77=ifort&lt;br /&gt;./configure --enable-mpi --enable-threads&lt;br /&gt;make&lt;br /&gt;&lt;br /&gt;Copy the libraries from fftw-2.1.5/fftw/.libs and mpi/.libs somewhere to /opt/fftw or leave them there (as I did).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Compiling in parallel&lt;/span&gt;&lt;br /&gt;I have mpich2 installed in /opt/mpich2, so I add /opt/mpich2/bin into the path:&lt;br /&gt;&lt;br /&gt;export PATH="$PATH:/opt/mpich2/bin"&lt;br /&gt;&lt;br /&gt;Check if mpif90 command works:&lt;br /&gt;&lt;br /&gt;$mpif90 -v&lt;br /&gt;mpif90 for 1.0.8p1&lt;br /&gt;Version 11.0&lt;br /&gt;&lt;br /&gt;The compilation options will be the following:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Compiler&lt;/span&gt;: mpif90&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;RP  RP_LIB(SCALAPACK+PBLAS)&lt;/span&gt;: -L/opt/intel/mkl/10.1.1.0.19/lib/64 -lmkl_intel_lp64 -lmkl_scalapack_lp64 -lmkl_blacs_lp64 -lmkl_sequential -lmkl -L/opt/mpich2/lib -lmpich -L/home/hartree-fock/fftw-2.1.5/mpi/.libs -lfftw_mpi -L/home/hartree-fock/fftw-2.1.5/fftw/.libs -lfftw&lt;br /&gt;&lt;span style="font-style: italic;"&gt;     FP  FPOPT(par.comp.options)&lt;/span&gt;: $(FOPT) -I/opt/mpich2/include&lt;br /&gt;&lt;span style="font-style: italic;"&gt;     MP  MPIRUN commando        &lt;/span&gt;: mpirun -np _NP_ -machinefile _HOSTS_ _EXEC_&lt;br /&gt;&lt;br /&gt;That's it! Don't forget to add the necessary lines to .bashrc (LD_LIBRARY_PATH etc).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9205204096304834269-1824441519171948110?l=dft-blog.natanzon.eu' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dft-blog.natanzon.eu/feeds/1824441519171948110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dft-blog.natanzon.eu/2010/03/parallel-compilation-of-wien2k-on-intel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/1824441519171948110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/1824441519171948110'/><link rel='alternate' type='text/html' href='http://dft-blog.natanzon.eu/2010/03/parallel-compilation-of-wien2k-on-intel.html' title='Parallel compilation of Wien2k on Intel Itanium architecture'/><author><name>noddeat</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9205204096304834269.post-1645621778133396519</id><published>2009-11-27T12:43:00.002+01:00</published><updated>2009-11-27T12:50:09.132+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='compilation'/><title type='text'>Intel MKL compilation options</title><content type='html'>Intel has published the &lt;a href="http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/"&gt;Math Kernel Library Link Line Advisor&lt;/a&gt; which helps to find which link line to use for the specific compiler, math library and MPI version.&lt;br /&gt;&lt;br /&gt;For example, for Linux on IA64 architecture with Intel compilers, ScaLAPACK and MPICH2 it will generate the following link line:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;-L$MKLPATH -lmkl_scalapack_ilp64 $MKLPATH/libmkl_solver_ilp64.a -Wl,--start-group -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_ilp64 -Wl,--end-group -openmp -lpthread&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9205204096304834269-1645621778133396519?l=dft-blog.natanzon.eu' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dft-blog.natanzon.eu/feeds/1645621778133396519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dft-blog.natanzon.eu/2009/11/intel-mkl-compilation-options.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/1645621778133396519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/1645621778133396519'/><link rel='alternate' type='text/html' href='http://dft-blog.natanzon.eu/2009/11/intel-mkl-compilation-options.html' title='Intel MKL compilation options'/><author><name>noddeat</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9205204096304834269.post-7197010615750309088</id><published>2009-06-22T20:07:00.003+02:00</published><updated>2009-06-22T20:12:23.414+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wien2k'/><title type='text'>Magic command to prevent Wien2k crash</title><content type='html'>Sometimes Wien2k program crashes without any reasons and &lt;span style="font-style: italic;"&gt;*.error&lt;/span&gt; files are empty or just contain the line like "Error in LAPW0". Then run the following command before running Wien2k:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ulimit -s unlimited&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It sets the maximum stacks size for the current user unlimited. For clusters and supercomputers you need to add this line to the script which runs Wien2k.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9205204096304834269-7197010615750309088?l=dft-blog.natanzon.eu' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dft-blog.natanzon.eu/feeds/7197010615750309088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dft-blog.natanzon.eu/2009/06/magic-command-to-prevent-wien2k-crash.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/7197010615750309088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/7197010615750309088'/><link rel='alternate' type='text/html' href='http://dft-blog.natanzon.eu/2009/06/magic-command-to-prevent-wien2k-crash.html' title='Magic command to prevent Wien2k crash'/><author><name>noddeat</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9205204096304834269.post-6147488006804946080</id><published>2009-02-06T16:53:00.004+01:00</published><updated>2009-02-06T17:02:11.370+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wien2k'/><title type='text'>Wien2k Fedora 10 issue</title><content type='html'>In Fedora 10 the Wien2k program doesn't work at all because of csh/tcsh compatibility issues, giving the error message like this:&lt;br /&gt;&lt;blockquote style="font-style: italic;"&gt;argv1: Subscript out of range&lt;/blockquote&gt;The solution to the problem is described on Wien2k mailing list. You either have to install tcsh package from Fedora 8 (you may find one on rpmfind.net), or do the following:&lt;br /&gt;1. Edit x_lapw script and find the following line (should be around the lines 238—248):&lt;br /&gt;&lt;blockquote style="font-style: italic;"&gt;echo "`date`&gt; ($name) $command $argv1[2-]" &gt;&gt; $log&lt;/blockquote&gt;2. Comment it and replace with this one:&lt;br /&gt;&lt;blockquote style="font-style: italic;"&gt;echo "`date`&gt; ($name) $argv1" &gt;&gt; $log&lt;/blockquote&gt;Now it should work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9205204096304834269-6147488006804946080?l=dft-blog.natanzon.eu' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dft-blog.natanzon.eu/feeds/6147488006804946080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dft-blog.natanzon.eu/2009/02/wien2k-fedora-10-issue.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/6147488006804946080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/6147488006804946080'/><link rel='alternate' type='text/html' href='http://dft-blog.natanzon.eu/2009/02/wien2k-fedora-10-issue.html' title='Wien2k Fedora 10 issue'/><author><name>noddeat</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9205204096304834269.post-3774187728052388046</id><published>2009-01-12T16:42:00.000+01:00</published><updated>2009-01-12T16:53:16.595+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wien2k'/><title type='text'>Calculate DOS after band structure calculations in Wien2k</title><content type='html'>Density of States and band structure are calculated on different k point meshes in Wien2k. One mights notice that you cannot calculate density of states after band structure because you get the following error:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:lucida grande;" &gt;forrtl: severe (24): end-of-file during read, unit 29&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:lucida grande;" &gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:lucida grande;" &gt;Image              PC        Routine            Line        Source             &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:lucida grande;" &gt;lapw2              0820F1E4  Unknown               Unknown  Unknown&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:lucida grande;" &gt;lapw2              0820D97D  Unknown               Unknown  Unknown&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:lucida grande;" &gt;lapw2              081E1CFB  Unknown               Unknown  Unknown&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:lucida grande;" &gt;lapw2              081B840A  Unknown               Unknown  Unknown&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:lucida grande;" &gt;lapw2              081CC100  Unknown               Unknown  Unknown&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:lucida grande;" &gt;lapw2              080624C0  fermi_                     67  fermi_tmp_.F&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:lucida grande;" &gt;lapw2              080881DD  MAIN__                    258  lapw2_tmp_.F&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:lucida grande;" &gt;lapw2              0804B906  Unknown               Unknown  Unknown&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:lucida grande;" &gt;libc.so.6          00BA1390  Unknown               Unknown  Unknown&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:lucida grande;" &gt;lapw2              0804B811  Unknown               Unknown  Unknown&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:lucida grande;" &gt;0.215u 0.000s 0:00.21 100.0% 0+0k 0+120io 0pf+0w&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-family:lucida grande;" &gt;error: command   /home/hartree-fock/wien2k/source/lapw2 uplapw2.def   failed&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But there is the way to fix this by running lapw1 without a -band switch. For spin-polarized calculation run:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-size:85%;" &gt;x lapw1 -up&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;font-size:85%;" &gt;x lapw1 -dn&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;If you are running non-spinpolarized case than just run "x lapw1". Also, don't forget about the "-orb" switch if you're using some orbital dependent potentials.&lt;br /&gt;&lt;br /&gt;After that you'll be able to calculate DOS without any problems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9205204096304834269-3774187728052388046?l=dft-blog.natanzon.eu' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dft-blog.natanzon.eu/feeds/3774187728052388046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dft-blog.natanzon.eu/2009/01/calculate-dos-after-band-structure.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/3774187728052388046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/3774187728052388046'/><link rel='alternate' type='text/html' href='http://dft-blog.natanzon.eu/2009/01/calculate-dos-after-band-structure.html' title='Calculate DOS after band structure calculations in Wien2k'/><author><name>noddeat</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9205204096304834269.post-7250208912346845803</id><published>2008-03-31T22:40:00.000+02:00</published><updated>2009-01-15T16:09:37.395+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SIESTA'/><title type='text'>How to calculate elastic constants with SIESTA?</title><content type='html'>The answer to this question can of course be found in SIESTA mail list archives. Let me repeat my own answer which has been posted there recently:&lt;br /&gt;&lt;blockquote&gt;&lt;font size="5"&gt;&amp;ldquo;&lt;/font&gt;&lt;span style="font-style: italic;"&gt;SIESTA calculates stress tensor and you know stress/strain relationship from the textbooks. You have to relax your system properly to have your stress tensor be close to zero. Then manually deform lattice vectors in selected directions and obtain the value of stress. For example, if you want to calculate C11, you have to deform lattice vector &lt;span style="font-weight: bold;"&gt;a&lt;/span&gt; (I suppose it is (a,0,0)) to a(1+e), where e is your value of strain. Then you make the calculation with relaxing atomic positions but NOT lattice vectors (VariableCell &lt;b&gt;false&lt;/b&gt;) and obtain the value of stress tensor Sigma_ij and find C11:&lt;/span&gt;&lt;br style="font-style: italic;" /&gt;&lt;br style="font-style: italic;" /&gt;&lt;span style="font-style: italic;"&gt;C11 = Sigma11/e&lt;/span&gt;&lt;font size="5"&gt;&amp;rdquo;&lt;br /&gt;&lt;/font&gt;&lt;/blockquote&gt;This gives you the main idea. Here I want to describe this procedure more properly and focus on how to overcome some common problems. &lt;br /&gt;&lt;br /&gt;&lt;lj-cut text="Read article"&gt;&lt;b&gt;Problem 1&lt;/b&gt;. &lt;i&gt;Which value of strain to choose?&lt;/i&gt;&lt;br /&gt;It depends on the material. You have to be sure that you're in the linear regime and Hook's law works, so the smaller the strain the better chance that you'll not be mistaken. BUT! Small values of strain mean less accuracy (I'll explain why), so the value of strain shouldn't be too small. I recommend the value of 0.5% or 1%. You may also (if you want) perform convergence test of elastic constant vs value of strain. To my experience, values in the range of 0.3%--1% give good results.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Problem 2&lt;/b&gt;. &lt;i&gt;How to choose the components of strain tensor?&lt;/i&gt;&lt;br /&gt;That's simple. If you want to calculate C11, the strain tensor &lt;b&gt;eij&lt;/b&gt; should be&lt;br /&gt;&lt;blockquote&gt;e 0 0&lt;br /&gt;0 0 0&lt;br /&gt;0 0 0&lt;br /&gt;&lt;/blockquote&gt;Where e is the value of strain (0.01 typically) Such tensor can also be used for computing C12 and C13. For C22 it should be&lt;br /&gt;&lt;blockquote&gt;0 0 0&lt;br /&gt;0 e 0&lt;br /&gt;0 0 0&lt;br /&gt;&lt;/blockquote&gt;And the same for C33. As for shear elastic constants (C44, C55 and C66) it has nondiagonal elements. For example for C66 it will be:&lt;br /&gt;&lt;blockquote&gt;0 e 0&lt;br /&gt;0 0 0&lt;br /&gt;0 0 0&lt;br /&gt;&lt;/blockquote&gt;Then to calculate elastic constant you have to deform your lattice tensor (containing three lattice vectors) like this:&lt;br /&gt;&lt;blockquote&gt;aij = a0ij(1+eij)&lt;br /&gt;&lt;/blockquote&gt;And then run the calculation with relaxation of atomic positions (VariableCell false). SIESTA gives the values of stress tensor. For example, you want to calculate C66. Only e12 is nonzero, so the expression for Sigma12 will be:&lt;br /&gt;&lt;blockquote&gt;Sigma12 = C1212e12 = C66e&lt;br /&gt;then C66 = Sigma12/e&lt;br /&gt;&lt;/blockquote&gt;This is in the ideal case assuming that the initial lattice was fully relaxed and the stress tensor was completely zero for relaxed cell. But it is not the case, yes?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Problem 2.&lt;/b&gt;&lt;i&gt; I've relaxed the cell but the stress tensor is not zero. Does it influence the results?&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Yes, but not much. You may improve the results if you provide &amp;ldquo;zero stress correction&amp;rdquo;. For example, for C66 elastic constant:&lt;br /&gt;&lt;blockquote&gt;C66 = (Sigma12-Sigma012)/e,&lt;br /&gt;&lt;/blockquote&gt;Where Sigma0ij is the stress tensor of the relaxed cell. It should be zero but it doesn't. This correction will work only if Sigma012 &amp;lt;&amp;lt; Sigma12! If not, I advice to increase e, so that it will work. Note also, if you use some geometry constraints, you will not be able to compute elastic constants or the error will be big! &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Problem 3.&lt;/b&gt;&lt;i&gt; When I perform the deformation of +1% and -1%, I obtain different values of stress tensor.&lt;/i&gt;&lt;br /&gt;Yes, this happen. See Problem 2 for solution - introducing zero stress correction will improve the results (maybe:). I advice that you always do two calculations for e&amp;gt;0 and e&amp;lt;0. In ideal case the results will be the same, but in real world you'll get the difference. Taking the average value of two elastic constants and introducing zero stress correction will improve the accuracy.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The last but not least: &lt;/b&gt;even if you have a cubic system with C11, C12 and C44 independent elastic constants, compute all of them! Calculate C11, C22 etc. to reduce the error - if you have time to do so. &lt;br /&gt;&lt;br /&gt;Hope this short information helps. Feel free to correct me if I'm wrong or ask questions in the comments (you don't need to register!)&lt;br /&gt;&amp;nbsp;&lt;/lj-cut&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9205204096304834269-7250208912346845803?l=dft-blog.natanzon.eu' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dft-blog.natanzon.eu/feeds/7250208912346845803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dft-blog.natanzon.eu/2008/03/how-to-calculate-elastic-constants-with.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/7250208912346845803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/7250208912346845803'/><link rel='alternate' type='text/html' href='http://dft-blog.natanzon.eu/2008/03/how-to-calculate-elastic-constants-with.html' title='How to calculate elastic constants with SIESTA?'/><author><name>noddeat</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9205204096304834269.post-2961738510130294340</id><published>2007-02-25T18:04:00.001+01:00</published><updated>2009-11-27T12:55:45.170+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SIESTA'/><category scheme='http://www.blogger.com/atom/ns#' term='compilation'/><title type='text'>Compiling SIESTA in parallel with Portland compiler</title><content type='html'>Here I'll post my notes on SIESTA compilation on AMD Opteron machine using Portland compiler (pgf90/pgf95). However, you may also make use of them while doing your compilation with other compiler/architecture. I do not guarantee anything just that everything written below worked for me. However, this doesn't mean that it will work for you. More, if after  following my instructions you hard disk will somehow get formatted, dont blame me - your using my advices at your own risk. I also have unfinished version of similarly notes of SIESTA compilation on Intel machine with ifort (an extended version of ones by Sebastien Le Roux) but I still don't have time to finish and publish them. If I do, I'll post the link here also. No instructions on compiling Mpich are given because I assume you're using cluster which has mpich already installed. If this is not the case, I refer you to &lt;b&gt;Sebastien Le Roux HOW-TO&lt;/b&gt; which can be found in &lt;i&gt;SIESTA mailing list archives&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div class="ljcut" text="Read notes"&gt; &lt;p&gt;&lt;b&gt;What is needed to compile parallel SIESTA?&lt;/b&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;p&gt;SIESTA distribution&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Compartible Fortran and C compilers (Intel ifort and icc for  intel machine, pgf95/pgcc for AMD etc)&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;MPI (Open MPI/ MPICH/LAM etc) – compiled with the same  compiler which will be used for SIESTA compilation. Actually, it is  already installed on clusters and supercomputers, so you'd check  available MPI and the supporting compilers. If mpich2 and mpich are  available, I'd rather recommend using mpich instead of mpich2 – I  remember having some problems with the latter.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;BLAS nad LAPACK – can be downloaded from netlib.org or  (which is better) use ACML or Intel MKL instead. Also you may try  Goto BLAS but I haven't manage to compile SIESTA with GOTO.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;BLACS  - should be compiled from scratch with the same  options and the same compiler as SIESTA.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;SCALAPACK – should be compiled from scratch after  compilation of LAPACK/BLAS and BLACS.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;Examples below will actually be related to Opteron Machine with Portland compiler (accessible as pgf95 for Fortran and pgcc for C), but the idea could be transferred to another compilers and architectures.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Option 1. Compiling BLAS and LAPACK from scratch&lt;/b&gt;&lt;/p&gt; &lt;p style=""&gt;This works almost everywhere, but less efficient than using specific libraries optimized for specific processors (like ACML, Intel MKL or so). This option is described also in Sebasti&lt;span style="font-family:Nimbus Roman No9 L, serif;"&gt;é&lt;/span&gt;n Le Roux's HOW-TO, but for Intel machine. I repeat almost the same but for AMD machine which makes almost no difference. Also some things from Sebastién's HOWTO didn't work for me, so I'll mention them also.&lt;/p&gt;  &lt;p style=""&gt;To compile BLAS and LAPACK you only need a lapack.tar.gz file with LAPACK, so BLAS is included in this package downloadable from &lt;a href="http://www.netlib.org/"&gt;netlib.org&lt;/a&gt;.&lt;/p&gt; &lt;p style=""&gt;&lt;i&gt;&lt;u&gt;BLAS AND LAPACK&lt;/u&gt;&lt;/i&gt;&lt;/p&gt; &lt;p style=""&gt;Here is my &lt;i&gt;make.inc&lt;/i&gt; (comments are skipped, my comments are written in italic):&lt;/p&gt; &lt;p style=""&gt;PLAT = _LINUX&lt;/p&gt; &lt;p style=""&gt;FORTRAN  = pgf95 &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;The compiler which will be used for SIESTA compilation. On Intel machine it could be ifort. Also you can use pgf90 instead.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=""&gt;OPTS     = -g -O0 &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;This indicates that we do not want optimization. Generally, the options should be the same as used for SIESTA compilation, but not necessary. You may want to change to &lt;/i&gt;&lt;span style="font-style: normal;"&gt;-fastsse&lt;/span&gt;&lt;i&gt; or &lt;/i&gt;&lt;span style="font-style: normal;"&gt;-O2&lt;/span&gt;&lt;i&gt; or smth else available via &lt;/i&gt;&lt;b&gt;&lt;span style="font-style: normal;"&gt;man pgf95&lt;/span&gt;&lt;/b&gt;&lt;i&gt; command. I do not recommend to use &lt;/i&gt;&lt;span style="font-style: normal;"&gt;-fast&lt;/span&gt;&lt;i&gt; flag here, but you may try. Anyway never use it for SIESTA compile, better use &lt;/i&gt;&lt;span style="font-style: normal;"&gt;-fastsse&lt;/span&gt;&lt;i&gt; instead – I'll speak on it later.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=""&gt;DRVOPTS  = $(OPTS)&lt;/p&gt; &lt;p style=""&gt;NOOPT    =&lt;/p&gt; &lt;p style=""&gt;LOADER   = pgf95 &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;Generally, a loader should be the same as compiler indicated in FORTRAN section&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=""&gt;LOADOPTS =&lt;/p&gt; &lt;p style=""&gt;ARCH     = ar&lt;/p&gt; &lt;p style=""&gt;ARCHFLAGS= cr&lt;/p&gt; &lt;p style=""&gt;RANLIB   = ranlib&lt;/p&gt; &lt;p style=""&gt;BLASLIB      = ../../blas$(PLAT).a&lt;/p&gt; &lt;p style=""&gt;LAPACKLIB    = lapack$(PLAT).a&lt;/p&gt; &lt;p style=""&gt;TMGLIB       = tmglib$(PLAT).a&lt;/p&gt; &lt;p style=""&gt;EIGSRCLIB    = eigsrc$(PLAT).a&lt;/p&gt; &lt;p style=""&gt;LINSRCLIB    = linsrc$(PLAT).a&lt;/p&gt; &lt;p style=""&gt;Variables not commented generally were not changed by me and left default. To compile type:&lt;/p&gt; &lt;p style=""&gt;make blaslib&lt;/p&gt; &lt;p style=""&gt;make lapacklib&lt;/p&gt; &lt;p style=""&gt;After that the libraries .a will be found in the current direcrory. I suggest to rename them into libblas.a and liblapack.a and move somewhere to ~/siesta/lib directory (which you of course should create).&lt;/p&gt;  &lt;p style=""&gt;&lt;i&gt;&lt;u&gt;BLACS&lt;/u&gt;&lt;/i&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;Take some MPI file from BMAKES directory and use as a template for Bmake.inc. I'll post here only the lines which have to be modified:&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;BTOPdir = ~/BLACS &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;Current directory, where BLACS was unpacked&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;COMMLIB = MPI&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;PLAT = LINUX&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;MPIdir = /opt/mpich/pgi62_64 &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;b&gt;Nota bene!&lt;/b&gt;&lt;i&gt; Mpich should be compiled with the same compiler version and architecture as we will use! So you should do if you'll have to compile Mpich by yourself!&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;MPIdev = ch_p4&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;MPIplat = LINUX&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;MPILIBdir = $(MPIdir)/$(MPIdev)/lib &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;Check attentively where your libmpich.a (or equivalent like libmpi.a) is located, this pparameter should indicated the directory where it is stored&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;MPIINCdir = $(MPIdir)/$(MPIdev)/include &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;path to MPI include libs like mpi.h or so.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;MPILIB = $(MPILIBdir)/libmpich.a &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;full path to libmpich.a, check if it is correct and such a library exists&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;INTFACE = -Dadd_  &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;I don't really know what this option is responsible for, but setting it to -Dadd_ worked for me all the times.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style=""&gt;F77            = pgf95&lt;/p&gt; &lt;p style=""&gt;F77NO_OPTFLAGS = -g -O0 &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;Compiler flags for files which should not be compiled with optimization&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=""&gt;F77FLAGS       = $(F77NO_OPTFLAGS) &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;This can and should be changed, I'm just doing testing compilations without any optimization. As for LAPACK, such flags should be (but not necessary) the same as for SIESTA compilation. Also, in my benchmark tests, the change of such flags in BLACS didn't influence the overall SIESTA performance at all. But it doesn't meant that you should not try to optimize BLACS at all.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=""&gt;F77LOADER      = $(F77)&lt;/p&gt; &lt;p style=""&gt;F77LOADFLAGS   =&lt;/p&gt; &lt;p style=""&gt;CC          = pgcc &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;C compiler, should be fully compartible with Fortran compiler. As for Portland it should be of the same architecture and version as pgf95. So is true for Intel compilers.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=""&gt;CCFLAGS        = $(F77FLAGS) &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;In general C compiler flags should dublicate the fortran flags, but you may play with them also.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=""&gt;CCLOADER       = $(CC)&lt;/p&gt; &lt;p style=""&gt;CCLOADFLAGS    =&lt;/p&gt; &lt;p style=""&gt;So to compile just type: &lt;i&gt;make mpi&lt;/i&gt;.&lt;/p&gt; &lt;p style=""&gt;&lt;span style="background: rgb(255, 204, 153) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;b&gt;NOTA BENE:&lt;/b&gt; Generally, a command &lt;i&gt;make clean&lt;/i&gt; cleans the previous compilation, so you can compile from the very  beginning if you want to. This should be done after every change in makefiles and before the following recompilation. But in case of BLACS you should type &lt;i&gt;make mpi what=clean&lt;/i&gt; instead of &lt;i&gt;make clean&lt;/i&gt; which won't work.&lt;/span&gt;&lt;/p&gt; &lt;p style=""&gt;After compilation you'll find the compiled libraries in LIB subdirectory. I suggest also to move them into smth like ~/siesta/lib and rename to libblacsF77init.a, libblacsCinit.a, libblacs.a/&lt;/p&gt;  &lt;p style=""&gt;&lt;i&gt;&lt;u&gt;SCALAPACK&lt;/u&gt;&lt;/i&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;Here is my &lt;i&gt;SLmake.inc&lt;/i&gt; (it's editable part, actually) with comments:&lt;/p&gt; &lt;p style=""&gt;home          = ~/scalapack-1.7.5 &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;A path where SCALAPACK was unpacked&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=""&gt;PLAT          = LINUX&lt;/p&gt; &lt;p style=""&gt;BLACSdir      = ~/siesta/lib &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;A directory, where BLACS libraries are located, compiled before.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=""&gt;USEMPI        = -DUsingMpiBlacs&lt;/p&gt; &lt;p style=""&gt;SMPLIB        = /opt/mpich/pgi62_64/lib/libmpich.a Full path to mpich&lt;/p&gt; &lt;p style=""&gt;&lt;i&gt;&lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;I've set the wrong path to the BLACS libraries (three lines below), but it all still worked for me! So it seems SCALAPCK do not generally requires BLACS or it somehow finds the libraries automatically via BLACSdir.&lt;/span&gt;&lt;/i&gt;&lt;/p&gt; &lt;p style=""&gt;BLACSFINIT    = $(BLACSdir)/libblacsF77init.a&lt;/p&gt; &lt;p style=""&gt;BLACSCINIT    = $(BLACSdir)/libblacsCinit.a&lt;/p&gt; &lt;p style=""&gt;BLACSLIB      = $(BLACSdir)/libblacs.a&lt;/p&gt; &lt;p style=""&gt;&lt;i&gt;&lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;For compilers and options see the same comments for BLACS and LAPACK compilation&lt;/span&gt;&lt;/i&gt;&lt;/p&gt; &lt;p style=""&gt;F77           = pgf95&lt;/p&gt; &lt;p style=""&gt;CC            = pgcc&lt;/p&gt; &lt;p style=""&gt;NOOPT         = -g -O0&lt;/p&gt; &lt;p style=""&gt;F77FLAGS      =  $(NOOPT)&lt;/p&gt; &lt;p style=""&gt;DRVOPTS       = $(F77FLAGS)&lt;/p&gt; &lt;p style=""&gt;CCFLAGS       = $(NOOPT)&lt;/p&gt; &lt;p style=""&gt;SRCFLAG       =&lt;/p&gt; &lt;p style=""&gt;F77LOADER     = $(F77)&lt;/p&gt; &lt;p style=""&gt;CCLOADER      = $(CC)&lt;/p&gt; &lt;p style=""&gt;F77LOADFLAGS  =&lt;/p&gt; &lt;p style=""&gt;CCLOADFLAGS   =&lt;/p&gt; &lt;p style=""&gt;CDEFS         = -DAdd_ -DNO_IEEE $(USEMPI)&lt;/p&gt; &lt;p style=""&gt;BLASLIB       = ~/siesta/lib/libblas.a &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;Path to previously compiled BLAS lib.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;So after running &lt;i&gt;make&lt;/i&gt; you'll find libscalapack.a which I would also copy to ~/siesta/lib or so.&lt;/p&gt;  &lt;p&gt;&lt;i&gt;&lt;u&gt;At last: compiling SIESTA&lt;/u&gt;&lt;/i&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;So here is my &lt;i&gt;arch.make&lt;/i&gt; :&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;SIESTA_ARCH=pgf95-natanzon&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;FC=pgf95&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;FFLAGS= -g -O0 &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;We are compiling SIESTA without any optimization. You can (and I advise this) to play with optimization flags and not to stop at this options, because they are slow, but guarantee the succesfull compilation, which is more important at the time. You can also set this parameter to &lt;/i&gt;&lt;span style="font-style: normal;"&gt;-fastsse&lt;/span&gt;&lt;i&gt; or so (see &lt;/i&gt;&lt;b&gt;&lt;span style="font-style: normal;"&gt;man pgf95&lt;/span&gt;&lt;/b&gt;&lt;i&gt; for details). Problems were reported while using &lt;/i&gt;&lt;span style="font-style: normal;"&gt;-fast&lt;/span&gt;&lt;i&gt; flag, so I DO NOT recommend to use this flag – it may cause crashes in SIESTA runs.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;FPPFLAGS= -DMPI -DFC_HAVE_FLUSH -DFC_HAVE_ABORT&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;FFLAGS_DEBUG= -g -O0 &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;This normally should not be changed – some SIESTA files should be compiled without optimization&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;RANLIB=echo&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;#&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;NETCDF_LIBS=&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;NETCDF_INTERFACE=&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;DEFS_CDF=&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;#&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;MPI_INTERFACE=libmpi_f90.a &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;This also normally should not be changed&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;MPI_INCLUDE=/opt/mpich/pgi62_64/include &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;path to MPI include dir&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;MPI_LIBS=/opt/mpich/pgi62_64/lib path, where libmpich.a is located&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;DEFS_MPI=-DMPI &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;Option for compiling parallel version of SIESTA. Necessary!&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;#&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;HOME_LIB=~/siesta/lib &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;Path where previuosly compiled by us libraries (BLAS, LAPACK, BLACS, SLALAPCK) are located&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;LAPACK_LIBS= -llapack &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;There are two ways of indicating library path: describe full filename like &lt;/i&gt;&lt;span style="font-style: normal;"&gt;liblapack.a&lt;/span&gt;&lt;i&gt; or describe it in the way presented here. The linker will automatically replace &lt;/i&gt;&lt;span style="font-style: normal;"&gt;-l&lt;/span&gt;&lt;i&gt; by lib and add &lt;/i&gt;&lt;span style="font-style: normal;"&gt;.a&lt;/span&gt;&lt;i&gt; extension.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;BLAS_LIBS=-lblas&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;BLACS_LIBS = lblacsCinit blacsF77init -lblacs&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;SCALAPACK_LIBS = -lscalapack&lt;/p&gt;  &lt;p style="font-style: normal; text-decoration: none;"&gt;LIBS= -L$(HOME_LIB) $(SCALAPACK_LIBS) $(BLACS_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS) $(NETCDF_LIBS)&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;SYS=bsd&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;DEFS= $(DEFS_CDF) $(DEFS_MPI)&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;#&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;.F.o:&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;$(FC) -c $(FFLAGS) $(INCFLAGS)  $(DEFS) $&amp;lt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;.f.o:&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;$(FC) -c $(FFLAGS) $(INCFLAGS)   $&amp;lt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;.F90.o:&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;$(FC) -c $(FFLAGS) $(INCFLAGS)  $(DEFS) $&amp;lt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;.f90.o:&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;"&gt;$(FC) -c $(FFLAGS) $(INCFLAGS)   $&amp;lt;&lt;/p&gt;  &lt;p style="font-style: normal; text-decoration: none;"&gt;Two compile SIESTA just type &lt;i&gt;make&lt;/i&gt;. I expect everything should be ok.&lt;/p&gt;  &lt;p&gt;&lt;i&gt;&lt;u&gt;What else? Adding optimization&lt;/u&gt;&lt;/i&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;This should be done from the very beginning but sometimes overoptimized SIESTA doesn't work and it is safe to compile without any optimization first and be sure that everything works. For this I recommend to run some SCF tasks (without cell relaxation, 0 CG moves) to be sure the parallelization works (benchmarks will be presented below).&lt;/p&gt;  &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;To optimize you should replace F77FLAGS and CCFLAGS everywhere in the arch.make and supporting libraries and recompile everything from the beginning. So for pgf compiler I recommend to use this one:&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;F77FLAGS = -fastsse&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;I think this is the best can be done. On Intel machine &lt;i&gt;-O3 -ttp7&lt;/i&gt; (or so) flag should be used instead. It gives the most good optimization. Also try &lt;i&gt;-fast&lt;/i&gt; flag on Intel machine – the compiler should automatically discover the best optimization flags, but it does smth wrong for PGF. So never use it with pgf, but this is, say, N-th time I'm repeating this. Also some additional changes should be made into &lt;i&gt;arch.make&lt;/i&gt; :&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;atom.o: &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;This file and the following should be still compiled without optimization&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;$(FC) -c $(FFLAGS_DEBUG) atom.f&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;#&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;dfscf.o:&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;$(FC) -c $(FFLAGS_DEBUG) $(INCFLAGS) dfscf.f&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;#&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;#&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;electrostatic.o:&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;$(FC) -c $(FFLAGS_DEBUG) electrostatic.f&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;#&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;.F.o:&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;$(FC) -c $(FFLAGS) $(INCFLAGS)  $(DEFS) $&amp;lt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;.f.o:&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;$(FC) -c $(FFLAGS) $(INCFLAGS)   $&amp;lt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;.F90.o:&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;$(FC) -c $(FFLAGS) $(INCFLAGS)  $(DEFS) $&amp;lt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;.f90.o:&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;$(FC) -c $(FFLAGS) $(INCFLAGS)   $&amp;lt;&lt;/p&gt;  &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;b&gt;Option 2. Linking SIESTA with external libraries (ACML,  Intel MKL)&lt;/b&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;What for? My benchmarks show, that using ACML library on AMD64 machine gradually increases the overall SIESTA performance, so it's worth thinking of linking external libraries like ACML, Intel MKL, GotoBLAS etc.&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;b&gt;Note:&lt;/b&gt; I haven't manage to link Intel MKL by now, however it doesn't mean this can't be done. Keep trying. So, I just share my experience of linking ACML here. I think another libraries can be linked in the same way.&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;b&gt;What is needed?&lt;/b&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;ACML library installed. If you don't have one, just download, unpack  and run install-blablabla.sh script, which will do everythin  automatically, you only have to provide a path where to install. I  suppose my ACML to be installed in &lt;i&gt;~/acml&lt;/i&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;Precompiled BLACS according to instructions in &lt;b&gt;Option 1&lt;/b&gt;  chapter.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;Sources of SCALAPACK and of course SIESTA, those two should be  recompiled with ACML support.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;No LAPACK/BLAS are needed at this time, because ACML will replace  them.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p style="" align="justify"&gt;&lt;i&gt;&lt;u&gt;SCALAPACK&lt;/u&gt;&lt;/i&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;Compared to the previous chapter, only one change should be made into Slmake.inc file, which shows the path to BLAS:&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;BLASLIB       = ~/acml/pgi64/lib/libacml.a &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;A full path to &lt;/i&gt;&lt;span style="font-style: normal;"&gt;libacml.a&lt;/span&gt;&lt;i&gt; Be aware to provide the correct vesrion (32 or 64 bit) compartible with compiler.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="" align="justify"&gt;&lt;i&gt;&lt;u&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;SIESTA&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;Here I'll give you my arch.make file again, but the comments will be given only for lines which have changed.&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;SIESTA_ARCH=pgf95-matterhorn&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;FC=pgf95&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;FC_ASIS=$(FC)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;FFLAGS= -fastsse -Wl,-R/opt/pgi/linux86-64/6.2/libso/ -Wl,-R~/acml/pgi64/lib/ &lt;/span&gt;&lt;/p&gt; &lt;p style="text-decoration: none;" align="justify"&gt;&lt;i&gt;&lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;You see additional flags are being passed to compiler. -fastsse indicates optimization, while two other paths tell using  ACML and PGI libraries which both are necessary for correct linking&lt;/span&gt;&lt;/i&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;FFLAGS_DEBUG= -g O0&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;LDFLAGS= -fastsse -Bstatic &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;The second flags tells to statically link the libraries so you won't have troubles with indicating &lt;/i&gt;&lt;span style="font-style: normal;"&gt;LD_LIBRARY_PATH&lt;/span&gt;&lt;i&gt; before SIESTA run. If you have troubles with linking, try to delete -Bstatic flag and recompile. But in this case you should execute &lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;export LD_LIBRARY_PATH=/opt/pgi/linux86-64/6.2/libso&lt;/span&gt;&lt;/p&gt; &lt;p style="text-decoration: none;" align="justify"&gt;&lt;i&gt;&lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;before SIESTA run or otherwise you'll get errors like: Cannot load shared libraries &lt;/span&gt;&lt;/i&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;XXX.so&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="text-decoration: none;" align="justify"&gt;&lt;i&gt;&lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;Note, that &lt;/span&gt;&lt;/i&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;-Bstatic&lt;/span&gt;&lt;/span&gt;&lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt; flag is called &lt;/i&gt;&lt;span style="font-style: normal;"&gt;-static&lt;/span&gt;&lt;i&gt; for ifort. Also the linking can crash for Intel Compiler with such a flag, but for pgf it works fine.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;RANLIB=echo&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;COMP_LIBS= #dc_lapack.a &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;Do not use internal LAPACK of SIESTA!&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;MPI_ROOT=/opt/mpich/pgi62_64/ch_p4&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;MPI_LIBS= -L$(MPI_ROOT)/lib -lmpich&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;ACML = -mp -L~/acml/pgi64/lib -lacml -Wl,-R/opt/pgi/linux86-64/6.2/libso/ -Wl,-R~/acml/pgi64/lib/&lt;/span&gt;&lt;/p&gt; &lt;p style="text-decoration: none;" align="justify"&gt;&lt;i&gt;&lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;First parameter is a path to ACML and two others simply repeat the compiler flags. I don't know what -mp is for.&lt;/span&gt;&lt;/i&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;MPI_INTERFACE=libmpi_f90.a&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;MPI_INCLUDE=/opt/mpich/pgi62_64/ch_p4/include&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;DEFS_MPI=-DMPI&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;SCALAPACK = -L~/siesta/lib -lscalapack&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;BLACS = -L~/siesta/lib -lblacs -lblacsF77init -lblacsCinit -lblacsF77init -lblacs&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;NUMA = -L/opt/pgi/linux86-64/6.2/libso -lnuma &lt;span style="background: rgb(0, 0, 128) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;i&gt;This library is needed for static linking. If you link dynamically (no -Bstatic flag) you do not need this library.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;LIBS= $(SCALAPACK) $(BLACS) $(ACML) $(MPI_LIBS)   $(NUMA)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;SYS=cpu_time&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;DEFS= $(DEFS_CDF) $(DEFS_MPI)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;# Important (at least for V5.0-1 of the pgf90 compiler...)&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;# Compile atom.f and electrostatic.f without optimization.&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;atom.o:&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;        $(FC) -c $(FFLAGS_DEBUG) atom.f&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;dfscf.o:&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;        $(FC) -c $(FFLAGS_DEBUG) $(INCFLAGS) dfscf.f&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;electrostatic.o:&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;        $(FC) -c $(FFLAGS_DEBUG) electrostatic.f&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;.F.o:&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;        $(FC) -c $(FFLAGS) $(INCFLAGS)  $(DEFS) $&amp;lt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;.f.o:&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;        $(FC) -c $(FFLAGS) $(INCFLAGS)   $&amp;lt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;.F90.o:&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;        $(FC) -c $(FFLAGS) $(INCFLAGS)  $(DEFS) $&amp;lt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;.f90.o:&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;        $(FC) -c $(FFLAGS) $(INCFLAGS)   $&amp;lt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt; &lt;/p&gt;  &lt;p style="font-style: normal; text-decoration: none;" align="justify"&gt;&lt;span style="background: transparent none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;So, voila! That's all I can tell you on parallel SIESTA compilation. I've also done some benchmarks, but I decided not to include them here. Just ask me in the comments, if you want a pdf-file of these notes with benchmark tests on parallelization.&lt;/span&gt;&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9205204096304834269-2961738510130294340?l=dft-blog.natanzon.eu' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dft-blog.natanzon.eu/feeds/2961738510130294340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dft-blog.natanzon.eu/2007/02/compiling-siesta-in-parallel-with.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/2961738510130294340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/2961738510130294340'/><link rel='alternate' type='text/html' href='http://dft-blog.natanzon.eu/2007/02/compiling-siesta-in-parallel-with.html' title='Compiling SIESTA in parallel with Portland compiler'/><author><name>noddeat</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9205204096304834269.post-5076491348861363197</id><published>2007-02-04T02:21:00.000+01:00</published><updated>2009-01-12T17:46:23.786+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SIESTA'/><title type='text'>How to calculate Density of States with SIESTA</title><content type='html'>Here I'll shortly explain how to calculate density of states with SIESTA. &lt;br /&gt;&lt;lj-cut text="Click here to read the article"&gt;For this you need to run your calculations and finally get a file SystemLabel.EIG in the working directory. Take a look at this file. This is how a typical output looks like:&lt;br /&gt;&lt;table cellspacing="1" cellpadding="1" border="1" align="" width="95%" summary=""&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#ff0000"&gt;-3.4561&amp;nbsp;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;br /&gt;&lt;font color="#003366"&gt;196&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#00ff00"&gt;1&lt;/font&gt; &lt;font color="#993366"&gt;40&amp;nbsp;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#993366"&gt;1&lt;/font&gt;&amp;nbsp;&amp;nbsp; -52.65773&amp;nbsp;&amp;nbsp; -52.61839&amp;nbsp;&amp;nbsp; -52.61035&amp;nbsp;&amp;nbsp; -52.59173&amp;nbsp;&amp;nbsp; -31.48590&amp;nbsp;&amp;nbsp; -31.40974&amp;nbsp;&amp;nbsp; -31.38261&amp;nbsp;&amp;nbsp; -31.22230&amp;nbsp;&amp;nbsp; -31.10230&amp;nbsp;&amp;nbsp; -31.05041&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -30.99880&amp;nbsp;&amp;nbsp; -30.97822&amp;nbsp;&amp;nbsp; -30.88169&amp;nbsp;&amp;nbsp; -30.85002&amp;nbsp;&amp;nbsp; -30.80920&amp;nbsp;&amp;nbsp; -30.74749&amp;nbsp;&amp;nbsp; -22.38872&amp;nbsp;&amp;nbsp; -21.66313&amp;nbsp;&amp;nbsp; -21.52788&amp;nbsp;&amp;nbsp; -21.47900&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -21.10694&amp;nbsp;&amp;nbsp; -20.81325&amp;nbsp;&amp;nbsp; -20.77569&amp;nbsp;&amp;nbsp; -20.74793&amp;nbsp;&amp;nbsp; -10.80684&amp;nbsp;&amp;nbsp; -10.31129&amp;nbsp;&amp;nbsp; -10.14217&amp;nbsp;&amp;nbsp; -10.05258&amp;nbsp;&amp;nbsp;&amp;nbsp; -9.95418&amp;nbsp;&amp;nbsp;&amp;nbsp; -9.79580&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -8.93664&amp;nbsp;&amp;nbsp;&amp;nbsp; -8.90326&amp;nbsp;&amp;nbsp;&amp;nbsp; -8.39606&amp;nbsp;&amp;nbsp;&amp;nbsp; -8.29401&amp;nbsp;&amp;nbsp;&amp;nbsp; -8.20815&amp;nbsp;&amp;nbsp;&amp;nbsp; -7.69086&amp;nbsp;&amp;nbsp;&amp;nbsp; -7.60359&amp;nbsp;&amp;nbsp;&amp;nbsp; -7.48728&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .... &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#993366"&gt;2&lt;/font&gt;&amp;nbsp;&amp;nbsp; -52.66887&amp;nbsp;&amp;nbsp; -52.60975&amp;nbsp;&amp;nbsp; -52.60674&amp;nbsp;&amp;nbsp; -52.59284&amp;nbsp;&amp;nbsp; -31.51384&amp;nbsp;&amp;nbsp; -31.50220&amp;nbsp;&amp;nbsp; -31.45885&amp;nbsp;&amp;nbsp; -31.18657&amp;nbsp;&amp;nbsp; -31.02913&amp;nbsp;&amp;nbsp; -30.99967&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -30.99402&amp;nbsp;&amp;nbsp; -30.96087&amp;nbsp;&amp;nbsp; -30.86182&amp;nbsp;&amp;nbsp; -30.84823&amp;nbsp;&amp;nbsp; -30.79439&amp;nbsp;&amp;nbsp; -30.72731&amp;nbsp;&amp;nbsp; -22.64175&amp;nbsp;&amp;nbsp; -21.65435&amp;nbsp;&amp;nbsp; -21.63041&amp;nbsp;&amp;nbsp; -21.51864&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .... &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#800080"&gt;3&lt;/font&gt;&amp;nbsp;&amp;nbsp; -52.67693&amp;nbsp;&amp;nbsp; -52.60817&amp;nbsp;&amp;nbsp; -52.59919&amp;nbsp;&amp;nbsp; -52.59389&amp;nbsp;&amp;nbsp; -31.58918&amp;nbsp;&amp;nbsp; -31.51596&amp;nbsp;&amp;nbsp; -31.50736&amp;nbsp;&amp;nbsp; -31.14978&amp;nbsp;&amp;nbsp; -31.05660&amp;nbsp;&amp;nbsp; -31.00531&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;The highlighted numbers are very important, so here is the explanation of their meaning:&lt;br /&gt;&lt;font color="#ff0000"&gt;-3.4561 eV &lt;font color="#000000"&gt;is a Fermi energy of the system, which has &lt;/font&gt;&lt;/font&gt;&lt;font color="#003366"&gt;196 &lt;font color="#000000"&gt;bands,&lt;/font&gt; &lt;/font&gt;&lt;font color="#00ff00"&gt;1 &lt;font color="#000000"&gt;spin component (so it is unpolarized) and &lt;/font&gt;&lt;/font&gt;&lt;font color="#993366"&gt;40 &lt;font color="#000000"&gt;k-points each of them is also highlighted. After Fermi energy please add the following numbers: &lt;br /&gt;&lt;font color="#ff6600"&gt;eta&lt;/font&gt;&amp;nbsp; - I'd call it &lt;i&gt;precision&lt;/i&gt;, put it less than 1.&lt;br /&gt;&lt;font color="#99cc00"&gt;Ne&lt;/font&gt; - number of eigenvalues, I advise to put it large.&lt;br /&gt;&lt;font color="#00ffff"&gt;Emin&lt;/font&gt; and &lt;font color="#cc99ff"&gt;Emax&lt;/font&gt; - interval of energies for which DOS will be calculated (eV).&lt;br /&gt;&lt;br /&gt;Put this values exactly on the first line after the Fermi energy. I did it in this way:&lt;br /&gt;&lt;table cellspacing="1" cellpadding="1" border="1" align="" width="95%" summary=""&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;font color="#ff0000"&gt;-3.4561 &lt;/font&gt;&lt;font color="#993366"&gt;&lt;font color="#000000"&gt;&lt;font color="#ff6600"&gt;0.05 &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#993366"&gt;&lt;font color="#000000"&gt;&lt;font color="#99cc00"&gt;1000 &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#993366"&gt;&lt;font color="#000000"&gt;&lt;font color="#00ffff"&gt;-10 &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#993366"&gt;&lt;font color="#000000"&gt;&lt;font color="#cc99ff"&gt;10&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Close the file and run eig2dos utility:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; eig2dos &amp;lt; SystemLabel.EIG | tee dos.dat&lt;br /&gt;Eig2dos utility is located in &lt;i&gt;Utils&lt;/i&gt; directory of SIESTA. You can compile it using f95 compiler or another one:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; f95 eig2dos.f&lt;br /&gt;You may plot the results using &lt;i&gt;gnuplot&lt;/i&gt; or &lt;i&gt;grace&lt;/i&gt; program:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmgrace dos.dat&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/lj-cut&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9205204096304834269-5076491348861363197?l=dft-blog.natanzon.eu' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dft-blog.natanzon.eu/feeds/5076491348861363197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dft-blog.natanzon.eu/2007/02/how-to-calculate-density-of-states-with.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/5076491348861363197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/5076491348861363197'/><link rel='alternate' type='text/html' href='http://dft-blog.natanzon.eu/2007/02/how-to-calculate-density-of-states-with.html' title='How to calculate Density of States with SIESTA'/><author><name>noddeat</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9205204096304834269.post-8224802280714557167</id><published>2007-01-19T19:35:00.000+01:00</published><updated>2009-01-15T16:03:22.833+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='supercomputers'/><title type='text'>Notes on using PBS systems on clusters and supercomputers</title><content type='html'>&lt;p&gt;&lt;i&gt;This shortnotes may help you (and me after I'll forget it :) ) to make use of large supercomputers with PBS systems installed. I'll tell how to run, monitor and delete tasks using PBS systems. At the moment I'm using the computer located at ACK CYFRONET AGH in Krak&amp;oacute;w, where Torgue PBS is installed, and a cluster with OpenPBS located at Interdisciplinary Center for Computer Modelling of Warsaw University.&amp;nbsp; Generalizing a (short) experience of maintaining PBS, I'll tell you how to put tasks in a queue, monitor them and delete;&amp;nbsp; how to change resources required for the task; and a sample of typical PBS-skript will be provided here. It is supposed that you already know basics of Unix/Linux and have an account at the computer with PBS system installed.&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;&lt;/p&gt;&lt;lj-cut text="Read article"&gt;&lt;br /&gt;&lt;b&gt;P&lt;/b&gt;ortable &lt;b&gt;B&lt;/b&gt;atch &lt;b&gt;S&lt;/b&gt;ystem is a queue system which allows an optimal maintaining of computer resources (memory, CPU etc) on supercomputers and clusters, which are used by many users for large calculations. Most big computers consist of several nodes, each of which has several processor&amp;nbsp; units. Normally one runs a command from a workstation or terminal just by typing a command name and waits until it is finished.&amp;nbsp; This command will use 99% CPU time and will run on one processor unit. If one needs to run two commands at the same time, one opens two terminal windows and runs two commands, each of them will use 50% CPU. Well, when we want to make use of parallel calculations on several nodes and CPUs, a special software is needed, actually this is what PBS does. &lt;br /&gt;&lt;br /&gt;It works like a cron daemon or Task Scheduler in Windows. You specify a program to be runned, resources to be used (i.e. number of nodes and processors, amount of memory etc.) and put it into a queue with the following command:&lt;br /&gt;&lt;br /&gt;qsub script.sh&lt;br /&gt;&lt;br /&gt;where script.sh - is a shell script which contains a path to a program and resources to be used. I'll post example of such a script below.&lt;br /&gt;You may also specify resources in the command line. For details address: &lt;br /&gt;&lt;br /&gt;man qsub&lt;br /&gt;man pbs_resources&lt;br /&gt;&lt;br /&gt;Sometimes you have to specify a name of the node:&lt;br /&gt;&lt;br /&gt;qsub -q node_name&lt;br /&gt;&lt;br /&gt;For details address a documentation provided by system administrator. After putting a queue you'll get an output:&lt;br /&gt;&lt;br /&gt;98982.supercomp&lt;br /&gt;&lt;br /&gt;Here 98982 is job identifier, &amp;quot;supercomp&amp;quot; is a node hostname. You can run the following command to see the status of this job:&lt;br /&gt;&lt;br /&gt;qstat -f 98982&lt;br /&gt;&lt;br /&gt;To see the status of all jobs just type&lt;br /&gt;&lt;br /&gt;qstat -a&lt;br /&gt;&lt;br /&gt;Or you may want to see only your own jobs:&lt;br /&gt;&lt;br /&gt;qstat -n your_loginname&lt;br /&gt;&lt;br /&gt;In order to delete the job with id=98982 you may type:&lt;br /&gt;&lt;br /&gt;qdel 98982&lt;br /&gt;&lt;br /&gt;In order to change the resources given in the script run.sh, you may use the command qalter. I will not discuss all the possible options of the commands qsub, qalter, qdel and qstat, because you can find them typing man command_name. I'll give you minimum skills required for this and recommend to read manuals and literature for further details. Let us look inside of the script run.sh:&lt;br /&gt;&lt;br /&gt;&lt;font color="#0000ff" size="2"&gt;#!/bin/sh&lt;br /&gt;#PBS -N WaterStone&lt;br /&gt;#PBS -l nodes=1:ppn=8&lt;br /&gt;#PBS -l walltime=72:00:00&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;cd $PBS_O_WORKDIR/&lt;br /&gt;~/siesta/Src/siesta &amp;lt; input.fdf &amp;gt; screen.out&lt;br /&gt;&lt;/font&gt;&lt;p&gt;This is usual Unix shell script, where special commands recognized&amp;nbsp;by PBS system&amp;nbsp;are put in the comments and begin with #PBS.&amp;nbsp; On the first line the name of the task is specified (WaterStone) which will appear on statistics (qstat). Second line denotes the number of notes (1) and the number of processors (8). You should address the documentation provided by system administrator if you want to know how to set these parameters. For example, on computers which I'm using presently I have to set nodes=1 always, because I have an access to only one node, and the maximum number of processors is restricted to 8 for my account. Note also, that on most servers tasks which use less resources (less memory and fewer processors) have priority to run, so sometimes it's useful to set ppn=2 or ppn=1 because such a task will start earlier than the task with ppn=8. Of course, this depends on the policy of system administrators. &lt;/p&gt;&lt;p&gt;The fourth line describes the amount of time needed for the task. After this period of time the task will automatically terminated, so if you need more time for this task you should change this paramater with &lt;i&gt;qalter &lt;/i&gt;command later.&lt;/p&gt;The fifth line forces to use the directory where script run.sh is located as working directory, where all the program output will be stored, as well as files &lt;i&gt;WaterStone.task_id_o&lt;/i&gt; and &lt;i&gt;WaterStone.task_id_e&lt;/i&gt;. In the sooner file all &amp;quot;screen&amp;quot; output will be stored, and possible errors will be stored in the latter file. &lt;b&gt;I strongly recommend neighther use spaces in the name of working directory nor create a working directory in a folder which contains spaces in its name or path! &lt;/b&gt;This may cause problems, for example, the job cannot be started.&lt;br /&gt;&lt;br /&gt;The last line is a command to run with input read from input.fdf and output stored in screen.out. Note, in such a case no output will be written to &lt;i&gt;WaterStone.task_id_o &lt;/i&gt;because in such a command no output is put on the &amp;quot;screen&amp;quot;. &lt;i&gt;WaterStone.task_id_o &lt;/i&gt;file is created only after the task is finished, but in contrast output to &lt;i&gt;screen.out&lt;/i&gt; is stored all the time, so I recommend you to redirect all the output to the file like I did it, so you'll be able to monitor it all the time.&lt;br /&gt;&lt;br /&gt;Of course, there are many other options which can be defined in the script. For example, you may specify amount of memory for the program:&lt;br /&gt;&lt;br /&gt;&lt;font color="#0000ff"&gt;#PBS -l mem=1gb&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Or force the PBS system to notify you about the status of the job:&lt;br /&gt;&lt;br /&gt;&lt;font color="#0000ff"&gt;#PBS -M noddeat@leavejournal.com&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Not all the other options may work, this depends on the settings of the particular system.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;NOTE:&lt;/u&gt; This article is a draft. I'll add more information here as soon as I have time. You may ask questions or share your own experience on PBS here in the comments.&lt;br /&gt;&lt;br /&gt;Sorry for bad English, you may correct this article and post a corrected version in the comments. I also suppose that you post comments in English only because I may share a link to this article within English-speaking scientific community. &lt;/b&gt;&lt;/lj-cut&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9205204096304834269-8224802280714557167?l=dft-blog.natanzon.eu' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dft-blog.natanzon.eu/feeds/8224802280714557167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dft-blog.natanzon.eu/2007/01/notes-on-using-pbs-systems-on-clusters.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/8224802280714557167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9205204096304834269/posts/default/8224802280714557167'/><link rel='alternate' type='text/html' href='http://dft-blog.natanzon.eu/2007/01/notes-on-using-pbs-systems-on-clusters.html' title='Notes on using PBS systems on clusters and supercomputers'/><author><name>noddeat</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
