howto:compile_on_windows_with_cygwin
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
howto:compile_on_windows_with_cygwin [2018/04/05 15:26] – [1.Cygwin installation:] gtocci | howto:compile_on_windows_with_cygwin [2019/05/11 07:58] – [3.Compilation with Cygwin] 222.195.80.180 | ||
---|---|---|---|
Line 17: | Line 17: | ||
*“liblapack-devel” | *“liblapack-devel” | ||
*“liblapack0” | *“liblapack0” | ||
- | *Python | + | *Python\\ |
- | *Vim\\ | + | |
Please operate according to the wizard to finish the Cygwin installation.\\ | Please operate according to the wizard to finish the Cygwin installation.\\ | ||
- | ===== 2.Acquiring | + | ===== 2.Acquisition |
- | Visit [[http:// | + | Visit [[http:// |
- | Some archivers generate | + | Some archivers generate PaxHeaders.xxxx directories in cp2k-2.x.x directory when unpacking. Files in these directories may prevent CP2K compilation with Cygwin, it is recommended to unpack tar.bz2 by using the following Cygwin |
< | < | ||
tar -xvf cp2k-2.x.x.tar.bz2 | tar -xvf cp2k-2.x.x.tar.bz2 | ||
Line 29: | Line 28: | ||
===== 3.Compilation with Cygwin ===== | ===== 3.Compilation with Cygwin ===== | ||
- | An example CP2K ARCH file for a serial build of CP2K on Cygwin is as follows:\\ | + | An ARCH file (a definition file) for Cygwin is as follows:\\ |
< | < | ||
CC = cc | CC = cc | ||
CPP = | CPP = | ||
- | |||
FC = gfortran | FC = gfortran | ||
LD = gfortran | LD = gfortran | ||
- | |||
AR = ar -r | AR = ar -r | ||
- | |||
CPPFLAGS = | CPPFLAGS = | ||
- | DFLAGS | + | DFLAGS |
- | FCFLAGS | + | FCFLAGS |
LDFLAGS | LDFLAGS | ||
- | LIBS = -llapack -lblas | + | LIBS |
- | + | ||
- | OBJECTS_ARCHITECTURE = machine_gfortran.o | + | |
</ | </ | ||
- | Remove the -D__GFORTRAN flag if you compile CP2K 2.6.0. | + | Save as “Cygwin-i686-gfortran.sopt” on cp2k-2.x.x/ |
- | Launch the Cygwin Terminal (Cygwin bash) and change the working directory to '' | + | Launch the Cygwin Terminal (Cygwin bash) and change the working directory to cp2k-2.x.x/ |
< | < | ||
make ARCH=Cygwin-i686-gfortran VERSION=sopt | make ARCH=Cygwin-i686-gfortran VERSION=sopt | ||
</ | </ | ||
- | It may take 1 or 2 hours until a compilation is completed. If you have a multi-core machine you may use e.g. '' | + | It may take 1 or 2 hours until a compilation is completed.\\ |
- | If you find '' | + | If you find cp2k.sopt in cp2k-2.x.x/ |
===== 4.Installation CP2K on Windows PC which not installed Cygwin ===== | ===== 4.Installation CP2K on Windows PC which not installed Cygwin ===== | ||
- | By using either cygcheck command | + | By using either cygcheck command or an executable parser such as [[http:// |
- | The following six DLLs may be required | + | The following six DLLs are maybe necessary and sufficient |
*cygwin\lib\lapack\cygblas-0.dll | *cygwin\lib\lapack\cygblas-0.dll | ||
*cygwin\bin\cygwin1.dll | *cygwin\bin\cygwin1.dll | ||
Line 64: | Line 58: | ||
*cygwin\bin\cyggcc_s-1.dll | *cygwin\bin\cyggcc_s-1.dll | ||
*cygwin\lib\lapack\cyglapack-0.dll | *cygwin\lib\lapack\cyglapack-0.dll | ||
- | Copy these DLLs (except Windows system DLLs) to the same directory | + | Copy these DLLs (except Windows system DLLs) to the cp2k.sopt |
- | Pressing SHIFT key right-click | + | Pressing SHIFT key right-click cp2k.sopt directory icon and select “Open Command Window Here” menu.\\ |
And you type on the command prompt: | And you type on the command prompt: | ||
< | < | ||
Line 73: | Line 67: | ||
SVN source code revision svn:XXXXX | SVN source code revision svn:XXXXX | ||
</ | </ | ||
- | Congratulations! You can now run CP2K on Windows. | + | Congratulations! You got a hold of CP2K run on Windows. |
howto/compile_on_windows_with_cygwin.txt · Last modified: 2023/12/01 00:25 by krack