User Tools

Site Tools


exercises:2019_uzh_acpc2:installation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
exercises:2019_uzh_acpc2:installation [2019/01/25 12:36] – created jglanexercises:2019_uzh_acpc2:installation [2020/08/21 10:15] (current) – external edit 127.0.0.1
Line 77: Line 77:
 ===== 0.2a CP2K Installation on Windows ===== ===== 0.2a CP2K Installation on Windows =====
  
-Visit [[http://sourceforge.net/projects/cp2k/files/|sourceforge CP2K project page]] and download ''cp2k-2.6.2.tar.bz2''.\\ +Download CP2K using git command or from [[https://github.com/cp2k/cp2k.git github website]]:\\
-Unpack the compressed ''tar.bz2'' file by using the following command from within a Cygwin terminal:\\+
 <code> <code>
-tar -xvf cp2k-2.6.2.tar.bz2+git clone --recursive https://github.com/cp2k/cp2k.git cp2k
 </code> </code>
  
-After the code has been extracted you will find it in the directory ''cp2k-2.6.2''.+After downloading using git or extract the zip file from [[https://github.com/cp2k/cp2k.git | CP2K-github]] you will find it in the directory ''cp2k''.
  
 In order to compile cp2k one has to specify an arch file to indicate which compilers and libraries to use. In order to compile cp2k one has to specify an arch file to indicate which compilers and libraries to use.
-Change directory to ''cp2k-2.6.2/arch''. Once you are in this directory open a new file called ''Cygwin-i686-gfortran.sopt''+Change directory to ''cp2k/arch''. Once you are in this directory open a new file called ''Cygwin-i686-gfortran.sopt''
  
 Copy the following lines and paste into the newly opened ''Cygwin-i686-gfortran.sopt'' file:\\ Copy the following lines and paste into the newly opened ''Cygwin-i686-gfortran.sopt'' file:\\
Line 100: Line 99:
 CPPFLAGS =  CPPFLAGS = 
 DFLAGS   = -D__GFORTRAN -D__FFTSG DFLAGS   = -D__GFORTRAN -D__FFTSG
-FCFLAGS  = -g -O2 -ffast-math -funroll-loops -ftree-vectorize -march=native -ffree-form $(DFLAGS) +FCFLAGS  = -g -O2 -funroll-loops -ftree-vectorize -march=native -ffree-form $(DFLAGS) 
 LDFLAGS  = $(FCFLAGS)  LDFLAGS  = $(FCFLAGS) 
 LIBS     = -llapack -lblas LIBS     = -llapack -lblas
Line 107: Line 106:
 </file> </file>
 Save this file (again if you use vim type ''ESC'' and then ':wq').\\ Save this file (again if you use vim type ''ESC'' and then ':wq').\\
-Finally change directory to ''cp2k-2.6.2/makefiles''Run the ''make'' command as follows in order to compile cp2k:\\+Run the ''make'' command as follows in order to compile cp2k:\\
 <code> <code>
 make ARCH=Cygwin-i686-gfortran VERSION=sopt make ARCH=Cygwin-i686-gfortran VERSION=sopt
 </code> </code>
  
-If you find ''cp2k.sopt'' in ''cp2k-2.6.2/exe'' directory, then compilation is successfully done. +If you find ''cp2k.sopt'' in ''cp2k/exe'' directory, then compilation is successfully done.
 ===== 0.2b CP2K Installation on Mac OS X ===== ===== 0.2b CP2K Installation on Mac OS X =====
  
-Visit [[http://sourceforge.net/projects/cp2k/files/|sourceforge CP2K project page]] and download ''cp2k-2.6.2.tar.bz2''.\\ +Download CP2K using git command or from [[https://github.com/cp2k/cp2k.git github website]]:\\
-Unpack the compressed ''tar.bz2'' file by using the following command from the Apple terminal:\\+
 <code> <code>
-tar -xvf cp2k-2.6.2.tar.bz2+git clone --recursive https://github.com/cp2k/cp2k.git cp2k
 </code> </code>
  
-After the code has been extracted you will find it in the directory ''cp2k-2.6.2''.+ 
 +After the code you will find it in the directory ''cp2k''.
  
 In order to compile cp2k one has to specify an arch file to indicate which compilers and libraries to use. In order to compile cp2k one has to specify an arch file to indicate which compilers and libraries to use.
-Change directory to ''cp2k-2.6.2/arch''. Once you are in this directory open a new file called ''Darwin-IntelMacintosh-gfortran.sopt'', copy and paste the following lines into this file.+Change directory to ''cp2k/arch''. Once you are in this directory open a new file called ''Darwin-IntelMacintosh-gfortran.sopt'', copy and paste the following lines into this file.
  
 <file> <file>
Line 135: Line 133:
 RANLIB   = ranlib RANLIB   = ranlib
 DFLAGS   = -D__NO_STATM_ACCESS -D__ACCELERATE DFLAGS   = -D__NO_STATM_ACCESS -D__ACCELERATE
-FCFLAGS  = -O2 -ffast-math -funroll-loops \+FCFLAGS  = -O2 -funroll-loops \
            -ftree-vectorize -ffree-form $(DFLAGS)            -ftree-vectorize -ffree-form $(DFLAGS)
 LDFLAGS  = $(FCFLAGS) LDFLAGS  = $(FCFLAGS)
Line 141: Line 139:
  
 </file> </file>
-Save it as ''Darwin-IntelMacintosh-gfortran.sopt'' in the ''cp2k-2.6.2/arch'' directory alongside the other ARCH files.\\ +Save it as ''Darwin-IntelMacintosh-gfortran.sopt'' in the ''cp2k/arch'' directory alongside the other ARCH files.\\ 
-Launch the Terminal and change the working directory to ''cp2k-2.6.2/makefiles''. Type make command as follows:\\+Launch the Terminal and change the working directory to ''cp2k/Makefiles''. Type make command as follows:\\
 <code> <code>
 make ARCH=Darwin-IntelMacintosh-gfortran VERSION=sopt make ARCH=Darwin-IntelMacintosh-gfortran VERSION=sopt
Line 148: Line 146:
 It may take quite a while until a compilation is completed.  It may take quite a while until a compilation is completed. 
    
-If you find ''cp2k.sopt'' in ''cp2k-2.6.2/exe'' directory, then compilation is successfully done.+If you find ''cp2k.sopt'' in ''cp2k/exe'' directory, then compilation is successfully done.
  
 ===== 0.3 First CP2K simulation ===== ===== 0.3 First CP2K simulation =====
exercises/2019_uzh_acpc2/installation.1548419817.txt.gz · Last modified: 2020/08/21 10:15 (external edit)