Installation of OpenMX 3.6.1 and its tools on OS X 10.

7 (Lion) chibaf 21 May 2012 "OpenMX (Open source package for Material eXplorer) is a software package for nano-scale material simulations based on density functional theories (DFT) , norm-conserving pseudopotentials, and pseudo-atomic localized basis functions. ": OpenMX web site OpenMX 3.6.1 is built with OpenMPI and OpenMP on Mac OS X 10.7.x. 1. Building OpenMX 3.6.1 (1) OS X 10.7.x (lion) is used with MacBook Core2Duo (late 2009). (2) Xcode 4.x for OS X 10.7.x is installed. # Xcode is Apple's development tool for OS X and can be obtained from http://developer.apple.com/ (You need an account for this site.) remark: if you use xcode 4.3 or later, you need to install command line tools for it. (3) downloading gfortran from http://hpc.sf.net : gfortran-

lion.tar.gz for os x 10.7.x
instruction: (A) $ gunzip gfortran-lion.tar.gz (B) $ sudo tar -xf gfortrn-lion.tar -C / (3') you can also obtain gfortran from: Tools - R for Mac OS X developer's page - GNU Fortan for Xcode (4) installation of OpenMPI downloading OpenMPI from http://www.open-mpi.org/software/ompi/v1.4/ extracting tar file (double clicking tar.gz file) and: $ ./configure $ make all $ make check $ sudo make install (5) installation of FFTW we employ FFTW version 3.x http://www.fftw.org/download.html extracting tar file (double clicking tar.gz file) and: $ ./configure $ make all $ make check $ sudo make install (6) Downloading OpenMX the latest version is obtained from below: Download of OpenMX and patch (7) building OpenMX We employ OpenMX 3.6 + patch 3.6.1.

$ cp ./patch3.6.1.tar.gz openmx3.6/source $ cd openmx3.6/source $ tar zxvf patch3.6.1.tar.gz

at source directory: modify the following two lines of makefile
CC = mpicc -O3 -fopenmp -I/usr/local/include LIB = -L/usr/local/lib -lfftw3 -framework vecLib -lgfortran -lgomp

download: a modified makefile
Construction of OpenMX binary: $ make $ make install then biary openmx is generated at ../work directry. (8) execution of OpenMX as multi-process $ mpirun -np M ./openmx input.dat -nt N > output.dat where M is a number of MPI process, N is a number of OpenMP threads per one mpi process. (9) Tests of OpenMX (1) at the directory: work/ $ mpirun -np 2 ./openmx Methane.dat -nt 1 > met.std & where "-np 2" shows a number of mpi process, "-nt 1" a number of OpenMP threads per one mpi process. (10) Tests of OpenMX (2: Automatic running test) (a) at the directory: work/ $ mpirun -np 2 ./openmx -runtest -nt 1 where "-np 2" shows a number of mpi process, "-nt 1" a number of OpenMP threads per one mpi process. (b) Large Model: at the directory: work/ remark: 16GB or more RAM is necessary for the following case: $ mpirun -np 2 ./openmx -runtestL -nt 1 where "-np 2" shows a number of mpi process, "-nt 1" a number of OpenMP threads per one mpi process.

OpenMX 3.6.1 as two mpi process on Macbook core2duo late2009 via "a big tree of black honey and a sprig of hot water" / illustration by poko [pixiv] (in japanese) 2. Building adpack2.2

(1) get adpack2.2 from User's manual of ADPACK Ver. 2.2 (2) modification of adpack2.2/source/makefile as follows: CC = gcc -fopenmp -std=c99 -O3 -I/usr/local/include LIB = -L/usr/local/lib -framework vecLib -gomp (3) modification of adpack2.2/source/Inputtools.c:line 87 as follows: old: static char* strcasestr( char *str1, const char *str2) new: char* strcasestr(const char *str1, const char *str2) (4) build adpack2.2 at adpack2.2/source $ make $ make install # adpack is copied to ../work (5) usage $ ./adpack input_file.inp -nt N where N is a number of OpenMP threads. When “-nt N” is omitted, a number of threads is set to 1.

My web site: http://math.digi2.jp/ http://math.digi2.jp/math/openmx/: OpenMX

Sign up to vote on this title
UsefulNot useful