howto:compile_on_mac
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
howto:compile_on_mac [2018/04/16 11:18] – gtocci | howto:compile_on_mac [2022/11/20 15:01] – Delete outdated howto krack | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== How to Compile CP2K on Mac OS X ====== | ||
- | |||
- | ===== 1.Acquiring the code ===== | ||
- | |||
- | If you don't have it already, you need an X11 server. on Mac OS X/OSX/macOS Sierra: you need to download and install [[https:// | ||
- | |||
- | |||
- | After that, go to the [[https:// | ||
- | |||
- | Using the Mac terminal, go to the directory where cp2k has been downloaded (if it has been downloaded in the '' | ||
- | To unpack the archive files type the command given below | ||
- | < | ||
- | tar -xvf cp2k-2.6.2.tar.bz2 | ||
- | </ | ||
- | |||
- | |||
- | ===== 2.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.txt · Last modified: 2022/11/20 15:05 by krack