Header Ads Widget

Ab initio Calculations Using Elk Code

Last Posts

10/recent/ticker-posts

How to download and install the Elk code

 

This tutorial is inspired from the following video:

https://elk-algerien1970.blogspot.com/2021/09/hands-on-tutorials-for-density.html 

 

 I will use the version elk.3.3.17 which I have got 2 years ago which it works for me ( I have tried with the last version elk-7.2.42 but I haven't succeded to install it ).

 

First,  we need to add the path to the  ~/.bashrc  file

 

#---------Elk path----------------------------------
export ELKROOT=/home/algerien/abinitio/elk-3.3.17/bin
export PATH=$PATH:$ELKROOT

#---------------------------------------------------------

 

It's better to create a directory called bin and put the executables and the utilities inside it

 

algerien1970@linux-ml0a:~/abinitio/elk-3.3.17> mkdir bin

 

Downloading:

You can download this version from the following link:

https://drive.google.com/file/d/15GUfWFNBLeN5spncvNKYQP47MY078UHn/view?usp=sharing 

 

Installing:

To install the elk code follow the following steps:

 

* Extracting the tar package  elk-3.3.17.tgz

 

algerien1970@linux-ml0a:~/abinitio> tar -xvf elk-3.3.17.tgz

* Change to root directory

 

algerien1970@linux-ml0a:~/abinitio> cd elk-3.3.17

 

* Execute setup  ( or ./setup )  

 

algerien1970@linux-ml0a:~/abinitio/elk-3.3.17> ./setup    

 


Choose compiler:


1. Intel Fortran (ifort) with OpenMP
  2. GNU Fortran (gfortran) with OpenMP
  3. Portland Group Fortran (pgf90) with OpenMP
  4. G95 (g95)
  5. NAG Fortran (nagfor)
  6. IBM Fortran (xlf90_r) with OpenMP

 20. Intel Fortran profiling (debug only)
 21. GNU Fortran code check (debug only)
 22. G95 code check (debug only)

  o. Other       x. Exit


 

2  

It's better to choose gfortran compiler  

 
 

You can now edit the compiler options in 'make.inc' to use optimised
BLAS/LAPACK/FFT libraries, MPI parallelisation and Libxc.
See the Elk manual for details.

Then run 'make' to compile the code.


To enable syntax highlighting in vim run 'make vim



* Compile using make all


algerien1970@linux-ml0a:~/abinitio/elk-3.3.17> cd src
algerien1970@linux-ml0a:~/abinitio/elk-3.3.17/src> make all 

make[1]: Entering directory '/home/algerien-1970/soft/elk-3.3.17/src'
cd BLAS; make; cp blas.a ..
make[2]: Entering directory '/home/algerien-1970/soft/elk-3.3.17/src/BLAS'
gfortran -O3 -ffast-math -funroll-loops -fopenmp -c dasum.f
gfortran -O3 -ffast-math -funroll-loops -fopenmp -c daxpy.f


.

.

.

.

l.o r3frac.o r3mv.o r3cross.o r3minv.o r3mm.o
make[1]: Leaving directory '/home/algerien-1970/soft/elk-3.3.17/src/spacegroup'

 

 


( if you get this last message thus your installation has succeded )


 

Testing the success of the installation:


 

algerien1970@linux-ml0a:~/abinitio/elk-3.3.17> make test

cd
 tests; 
./tests.sh                                                                                                                                                                          
 
                                                                                                                                                                                              
Running test in directory test-001...                                                                                                                                                         
 Passed                                                                                                                                                                                       
                                                                                                                                                                                              
Running test in directory test-002...                                                                                                                                                         
 Passed

Running test in directory test-003...
 Passed

Running test in directory test-004...
 Passed


.

.

.

.


Running test in directory test-016...
Passed

Running test in directory test-017...
Passed

Running test in directory test-018...
Passed


The installation is ok


Now, we will copy the executable elk to the created directory bin


> sudo cp /home/algerien/abinitio/elk-3.3.17/src/elk /home/algerien/abinitio/elk-3.3.17/bin/elk



Post a Comment

0 Comments