howto:compile_on_mac
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howto:compile_on_mac [2018/04/10 13:42] – [How to Compile and Install CP2K on Windows with Cygwin] 130.60.136.218 | howto:compile_on_mac [2022/11/20 15:05] (current) – created krack | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How to Compile and Install CP2K Mac OS X ====== | + | This how-to page has been replaced |
- | + | ||
- | ===== 1.Acquiring the code ===== | + | |
- | Visit [[https:// | + | |
- | ====1.1 Download from Sourceforge ==== | + | |
- | If one get the distribution from [[https:// | + | |
- | < | + | |
- | tar -xvf cp2k-2.x.x.tar.bz2 | + | |
- | </ | + | |
- | + | ||
- | + | ||
- | ==== 1.2 Download using SVN Access ==== | + | |
- | <note warning> | + | |
- | The code in SVN is under constant development. Check the [[http:// | + | |
- | </ | + | |
- | + | ||
- | The latest and all prior versions are available from the [[https:// | + | |
- | + | ||
- | Check out only a needed branch (the branch will then be in cp2k/cp2k). | + | |
- | + | ||
- | * current trunk: < | + | |
- | + | ||
- | These branches can be updated to their latest version in the following way: | + | |
- | < | + | |
- | cd cp2k/cp2k | + | |
- | svn update | + | |
- | </ | + | |
- | + | ||
- | Alternatively, | + | |
- | < | + | |
- | svn checkout http:// | + | |
- | </ | + | |
- | Analogous checkouts work for the branch versions. | + | |
- | + | ||
- | The [[http:// | + | |
- | on your machine for this to work. | + | |
- | + | ||
- | + | ||
- | ===== 3.Compilation on Mac ===== | + | |
- | An example CP2K ARCH file for a serial build of CP2K on Mac is as follows: | + | |
- | < | + | |
- | # With GCC 4.9 or later, for gcc and gfortran | + | |
- | # libxc is installed in LIBXC_INCLUDE_DIR / LIBXC_LIB_DIR | + | |
- | # libint is installed in LIBINT_LIB_DIR | + | |
- | CC = gcc | + | |
- | CPP = | + | |
- | FC = gfortran | + | |
- | LD = gfortran | + | |
- | AR = ar -r | + | |
- | RANLIB | + | |
- | DFLAGS | + | |
- | FCFLAGS | + | |
- | | + | |
- | LDFLAGS | + | |
- | LIBS = -framework Accelerate | + | |
- | + | ||
- | </ | + | |
- | Remove the -D__LIBXC -D__LIBINT flag if you compile CP2K. Save it as '' | + | |
- | Launch the Terminal and change the working directory to '' | + | |
- | < | + | |
- | make ARCH=Darwin-IntelMacintosh-gfortran VERSION=sopt | + | |
- | </ | + | |
- | It may take quite a while until a compilation is completed. | + | |
- | If you find '' | + |
howto/compile_on_mac.1523367740.txt.gz · Last modified: 2020/08/21 10:15 (external edit)