Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuaki1987 committed Dec 28, 2015
2 parents a4d50df + 346e9b6 commit 0920300
Show file tree
Hide file tree
Showing 425 changed files with 227,645 additions and 163,039 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ build
html/
GPATH
GRTAGS
GTAGS
GTAGS
.idea
24 changes: 18 additions & 6 deletions HPhiconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,33 @@ if [ -z ${1} ] || [ ${1} = "help" ]; then
else
if [ ${1} = "sekirei" ]; then
cat > src/make.sys <<EOF
CC = icc
CC = mpiicc
LAPACK_FLAGS = -Dlapack -mkl=parallel
FLAGS = -qopenmp -O3 -xCORE-AVX2 -mcmodel=large -shared-intel
FLAGS = -qopenmp -O3 -xCORE-AVX2 -mcmodel=large -shared-intel -D MPI -g -traceback
MTFLAGS = -DDSFMT_MEXP=19937 \$(FLAGS)
INCLUDE_DIR=./include
EOF
elif [ ${1} = "maki" ]; then
cat > src/make.sys <<EOF
CC = fccpx
CC = mpifccpx
LAPACK_FLAGS = -Dlapack -SSL2BLAMP
FLAGS = -Kfast,openmp,SPARC64IXfx,parallel -Kmemalias,alias_const
FLAGS = -Kfast,openmp,SPARC64IXfx,parallel -Kmemalias,alias_const -D MPI -g
MTFLAGS = -DDSFMT_MEXP=19937 \$(FLAGS)
INCLUDE_DIR=./include
EOF
elif [ ${1} = "intel" ]; then
cat > src/make.sys <<EOF
CC = icc
LAPACK_FLAGS = -Dlapack -mkl=parallel
FLAGS = -openmp -O3 -DHAVE_SSE2
FLAGS = -openmp -O3 -DHAVE_SSE2 -g -traceback
MTFLAGS = -DDSFMT_MEXP=19937 \$(FLAGS)
INCLUDE_DIR=./include
EOF
elif [ ${1} = "mpicc-intel" ]; then
cat > src/make.sys <<EOF
CC = mpicc
LAPACK_FLAGS = -Dlapack -mkl=parallel
FLAGS = -openmp -O3 -DHAVE_SSE2 -D MPI
FLAGS = -openmp -O3 -DHAVE_SSE2 -D MPI -g -traceback
MTFLAGS = -DDSFMT_MEXP=19937 \$(FLAGS)
INCLUDE_DIR=./include
EOF
Expand Down Expand Up @@ -99,6 +99,18 @@ EOF
echo

cat > makefile <<EOF
help:
@echo ""
@echo "Usage :"
@echo "make <entry>"
@echo ""
@echo "<entry> is chosen from below"
@echo " HPhi : Build simulator HPhi in src/"
@echo " userguide : Generate userguid_jp.pdf & userguide_en.pdf in doc/"
@echo " clean : Remove all generated files excepting makefile"
@echo " veryclean : Remove all generated files including makefile"
@echo ""
HPhi:
cd src;make -f makefile_src
Expand Down
6 changes: 6 additions & 0 deletions doc/doc_origin/com.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
platex main
bibtex main
platex main
platex main
dvipdfmx main.dvi
#open -a Preview.app main.pdf
6 changes: 6 additions & 0 deletions doc/doc_ver0.1/com.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
platex main
bibtex main
platex main
platex main
dvipdfmx main.dvi
#open -a Preview.app main.pdf
1 change: 1 addition & 0 deletions doc/en/chap01_en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ \subsection{Contributors}
\label{subsec:contributors}
This software is developed by following contributors.
\begin{itemize}
\item{ver.0.2 (released at 2015/12/28)}
\item{ver.0.1 (released at 2015/10/09)}
\begin{itemize}
\item{\bf Developers}
Expand Down
48 changes: 45 additions & 3 deletions doc/en/chap02_1_en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ \subsection{Using \texttt{HPhiconfig.sh}}
\item \verb|sekirei| : ISSP system-B ''sekirei''
\item \verb|maki| : ISSP system-C ''maki''
\item \verb|intel| : intel compiler + Linux PC
\item \verb|mpicc-intel| : intel compiler + MPI (excepting intelMPI) + Linux PC
\item \verb|gcc| : GCC + Linux PC
\item \verb|gcc-mac| : GCC + Mac
\end{itemize}

\verb|make.sys| is as follows (for ISSP-system-B ''sekirei''):
\begin{verbatim}
CC = icc
CC = mpiicc
LAPACK_FLAGS = -Dlapack -mkl=parallel
FLAGS = -qopenmp -O3 -xCORE-AVX2 -mcmodel=large -shared-intel
FLAGS = -qopenmp -O3 -xCORE-AVX2 -mcmodel=large -shared-intel -D MPI
MTFLAGS = -DDSFMT_MEXP=19937 $(FLAGS)
INCLUDE_DIR=./include
\end{verbatim}
Expand All @@ -43,6 +44,7 @@ \subsection{Using \texttt{HPhiconfig.sh}}
\item \verb|FLAGS| : Other compilation options.
OpenMP utilization option (\verb|-openmp|, \verb|-fopenmp|, \verb|-qopenmp|, etc.)
must be specified.
When you use MPI, please set \verb|-D MPI|.
\item \verb|MTFLAGS|, \verb|INCLUDE_DIR| : Options for the Mersenne Twister
and additional include directory. You do not have to modify them.
\end{itemize}
Expand All @@ -56,7 +58,6 @@ \subsection{Using \texttt{HPhiconfig.sh}}
and obtain an executable \verb|HPhi| in \verb|src/| directory;
you should add this directory to the \verb|$PATH|.

\subsection{Using \texttt{cmake}}


\begin{screen}
Expand All @@ -73,3 +74,44 @@ \subsection{Using \texttt{cmake}}

\end{screen}


\subsection{Using \texttt{cmake}}

\begin{screen}
\Large
{\bf Tips}
\normalsize\\
Before using cmake for sekirei, you must type
\begin{verbatim}
source /home/issp/materiapps/tool/env.sh
\end{verbatim}
while for maki, you must type
\begin{verbatim}
source /global/app/materiapps/tool/env.sh
\end{verbatim}
\end{screen}

We can compile Hphi as
\begin{verbatim}
cd $HOME/build/hphi
cmake -DCONFIG=gcc $PathTohphi
make
\end{verbatim}
Here, we set a path to $\HPhi$ as \verb| $PathTohphi| and to a build directory as \verb| $HOME/build/hphi|. After compiling, a src folder is constructed below a \verb| $HOME/build/hphi |folder and obtain an executable \verb|HPhi| in \verb|src/| directory. When there is not a MPI library in your system, an executable \verb|HPhi| is automatically compiled without a MPI library.

In the above example, we compile $\HPhi$ by using a gcc compiler. We can select a compiler by using following options
\begin{itemize}
\item \verb|sekirei| : ISSP system-B ''sekirei''
\item \verb|fujitsu| : Fujitsu compiler (ISSP system-C ''maki'')
\item \verb|intel| : intel compiler + Linux PC
\item \verb|gcc| : GCC compiler + Linux PC.
\end{itemize}
An example for compiling $\HPhi$ by an intel compiler is shown as follows,
\begin{verbatim}
mkdir ./build
cd ./build
cmake -DCONFIG=intel ../
make
\end{verbatim}
After compiling, a \verb|src| folder is made below the \verb|build| folder and an execute $\HPhi$ is made in the \verb|src| folder. It is noted that we must delete the \verb|build| folder and do the above works again when we change the compilers.

47 changes: 42 additions & 5 deletions doc/en/chap02_en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ \section{Prerequisite}
\begin{itemize}
\item C compiler (intel, Fujitsu, GNU, etc. )
\item LAPACK library (intel MKL, Fujitsu TCL, ATLAS, etc.)
\item MPI library (If you do not use MPI, it is not necessary.)
\end{itemize}

\begin{screen}
Expand Down Expand Up @@ -40,8 +41,13 @@ \section{Installation}
\section{Directory structure}
When HPhi-xxx.tar.gz is unzipped, the following directory structure is composed.\\
\\
├──CMakeLists.txt\\
├──COPYING\\
├──doc/\\
├──config/\\
│~~~~~~~├──fujitsu.cmake\\
│~~~~~~~├──gcc.cmake\\
│~~~~~~~├──intel.cmake\\
│~~~~~~~└──sekirei.cmake\\├──doc/\\
│~~~~~~~├──en/\\
│~~~~~~~├──jp/\\
│~~~~~~~├──userguide\_en.pdf\\
Expand All @@ -68,7 +74,11 @@ \section{Directory structure}
│~~~~~~│~~~~~~~~~~~~~~~│~~~~~~└──$\cdots$\\
│~~~~~~│~~~~~~~~~~~~~~~├─HeisenbergSquare/\\
│~~~~~~│~~~~~~~~~~~~~~~│~~~~~~└──$\cdots$\\
│~~~~~~│~~~~~~~~~~~~~~~└─Kitaev/\\
│~~~~~~│~~~~~~~~~~~~~~~├─Kagome/\\
│~~~~~~│~~~~~~~~~~~~~~~│~~~~~~└──$\cdots$\\
│~~~~~~│~~~~~~~~~~~~~~~├─Kitaev/\\
│~~~~~~│~~~~~~~~~~~~~~~│~~~~~~└──$\cdots$\\
│~~~~~~│~~~~~~~~~~~~~~~└─S1Chain/\\
│~~~~~~│~~~~~~~~~~~~~~~~~~~~~~~└──$\cdots$\\
│~~~~~~└──Standard/\\
│~~~~~~~~~~~~~~~~~~├──Hubbard/\\
Expand All @@ -90,10 +100,13 @@ \section{Directory structure}
│~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~│~~~~~~└──$\cdots$\\
│~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~├─HeisenbergSquare/\\
│~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~│~~~~~~└──$\cdots$\\
│~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~└─Kitaev/\\
│~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~├─Kitaev/\\
│~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~│~~~~~~└──$\cdots$\\
│~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~└─S1Chain/\\
│~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~└──$\cdots$\\
└──src/\\
~~~~~~~~~~~~~├──**.c\\
~~~~~~~~~~~~~├──CMakeLists.txt\\
~~~~~~~~~~~~~├──include/\\
~~~~~~~~~~~~~│~~~~~~~└──**.h\\
~~~~~~~~~~~~~└──makefile\_src\\
Expand Down Expand Up @@ -124,7 +137,21 @@ \subsection{{\it Standard} mode}

Run a executable \verb|HPhi| in terminal by setting option ``\verb|-s|" (or ``\verb|--standard|'') and the name of input file written in previous step.

\verb|$ |\textit{Path}\verb|/HPhi -s |\textit{Input\_file\_name}
\begin{itemize}

\item Serial/OpenMP parallel

\verb|$ |\textit{Path}\verb|/HPhi -s |\textit{Input\_file\_name}

\item MPI parallel/ Hybrid parallel

\verb|$ mpiexec -np |\textit{number\_of\_processes}\verb| |\textit{Path}\verb|/HPhi -s |\textit{Input\_file\_name}

When you use a queuing system in workstations or super computers,
sometimes the number of processes is specified as an argument for the job-submitting command.
If you need more information, please refer manuals for your system.

\end{itemize}

\item Watch calculation logs

Expand Down Expand Up @@ -164,8 +191,18 @@ \subsection{{\it Expert} mode}
{\bf Note:} A List file can be easily made by using standard mode.
\item Run\\
Run $\HPhi$ in terminal by setting option ``\verb|-e|" (or ``\verb|--expert|'') and a file name of a list file.\\
\verb|$ |\textit{Path}\verb|/HPhi -e |\textit{Input\_List\_file\_name}

\begin{itemize}

\item Serial/OpenMPI

\verb|$ |\textit{Path}\verb|/HPhi -e |\textit{Input\_List\_file\_name}

\item MPI/Hybrid

\verb|$ mpiexec -np |\textit{number\_of\_processes}\verb| |\textit{Path}\verb|/HPhi -e |\textit{Input\_List\_file\_name}

\end{itemize}

\item Under running\\
Log files are outputted in the ``output" folder which is automatically made in the directory for a calculation scenario.
Expand Down
43 changes: 13 additions & 30 deletions doc/en/chap03_en.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,6 @@
%----------------------------------------------------------
\chapter{Tutorial}
\label{Ch:model}
\section{Common works}
In this section, we describe the procedure for constructing calculation environments after installation.
\begin{enumerate}
\item Make a directory for a calculation scenario.
%
\item Move to the directory.
\end{enumerate}
Here, we show a simple example for commands on a terminal below.\\
\begin{minipage}{10cm}
\begin{screen}
\begin{verbatim}
mkdir ./CalcScenario
mv ./CalcScenario
\end{verbatim}
\end{screen}
\end{minipage}

\section{{\it Standard} mode}
\input{chap03_2_en.tex}

Expand Down Expand Up @@ -97,8 +80,8 @@ \subsection{Files for basic parameters}
CParaFileHead zqp
--------------------
Nsite 16
Nup 8
Ndown 8
Ncond 0
2Sz 0
Lanczos_max 1000
initial_iv 12
nvec 1
Expand All @@ -112,10 +95,10 @@ \subsection{Files for basic parameters}
\end{screen}
\end{minipage}
~\\
In this file, we set parameters for calculation such as a site number, a total number of up spin, a total number of down spin and a number of Lanczos step etc. The details of ModPara file are shown in \ref{Subsec:modpara}.\\
In this file, we set parameters for calculation such as a site number, {a total number of conduction electrons, a total $S_z$} and a number of Lanczos step etc. The details of ModPara file are shown in \ref{Subsec:modpara}.\\

\item {\bf Setting positions of localized spins}\\
Positions of localized spins are defined by a LocSpin file (in this sample, locspn.def). The contents of files are shown as below.\\
Positions {and $S$} of localized spins are defined by a LocSpin file (in this sample, locspn.def). The contents of files are shown as below.\\
\begin{minipage}{15cm}
\begin{screen}
\begin{verbatim}
Expand All @@ -124,12 +107,12 @@ \subsection{Files for basic parameters}
================================
========i_0LocSpn_1IteElc ======
================================
0 0
1 0
2 0
3 0
4 0
5 0
0 1
1 1
2 1
3 1
4 1
5 1
\end{verbatim}
\end{screen}
Expand All @@ -139,7 +122,7 @@ \subsection{Files for basic parameters}
\end{description}

\subsection{Files for constructing Hamiltonian}
After setting basic parameters, we make input files for constructing Hamiltonian. Since calculations are done by the representation of fermion operators in $\HPhi$, we must rewrite spin operator using the following relation
After setting basic parameters, we make input files for constructing Hamiltonian. Since calculations are done by the representation of fermion operators in $\HPhi$, we must rewrite spin operator. {For example, in the case of $S=1/2$, we rewrite the equation by} using the following relation
\begin{align}
S_z^{(i)}&=(c_{i\uparrow}^{\dag}c_{i\uparrow}-c_{i\downarrow}^{\dag}c_{i\downarrow})/2,\\
S_+^{(i)}&=c_{i\uparrow}^{\dag}c_{i\downarrow},\\
Expand All @@ -165,7 +148,7 @@ \subsection{Files for constructing Hamiltonian}
\end{screen}
\end{minipage}
~\\
We can use this term when an electric magnetic field is added in spin system. For example, when an magnetic field is added at a site 1 such as $-0.5 S_z^{(1)}$, this term can be rewritten as $-0.5/2(c_{1\uparrow}^{\dag}c_{1\uparrow}-c_{1\downarrow}^{\dag}c_{1\downarrow})$. Thus, the input file becomes as follows.\\
We can use this term when an electric magnetic field is added in spin system. For example, when an magnetic field is added at a site 1 such as $-0.5 S_z^{(1)}$ { for $S=1/2$}, this term can be rewritten as $-0.5/2(c_{1\uparrow}^{\dag}c_{1\uparrow}-c_{1\downarrow}^{\dag}c_{1\downarrow})$. Thus, the input file becomes as follows.\\
\begin{minipage}{15cm}
\begin{screen}
\begin{verbatim}
Expand Down Expand Up @@ -208,7 +191,7 @@ \subsection{Files for constructing Hamiltonian}
\end{screen}
\end{minipage}
~\\
Here, we explain an interaction between a site $i$ and a site $j$, for simplicity. Using fermion operators, interaction terms for spin operators can be rewritten as
Here, we explain an interaction between a site $i$ and a site $j$ {in the case of $S=1/2$}, for simplicity. Using fermion operators, interaction terms for spin operators can be rewritten as
\begin{align}
H_{i,i+1}&=J(S_x^{(i)}S_x^{(i+1)}+S_y^{(i)}S_y^{(i+1)}+S_z^{(i)}S_z^{(i+1)}) \nonumber\\
&=J \left( \frac{1}{2}S_+^{(i)}S_-^{(i+1)}+\frac{1}{2}S_-^{(i)}S_+^{(i+1)}+S_z^{(i)}S_z^{(i+1)} \right) \nonumber\\
Expand Down
Loading

0 comments on commit 0920300

Please sign in to comment.