Skip to content

Commit

Permalink
Merge branch 'release_v0.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuaki1987 committed Oct 28, 2015
2 parents 0b013c9 + e97d1d5 commit a4d50df
Show file tree
Hide file tree
Showing 176 changed files with 136,635 additions and 121,014 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
HPhi
makefile
Makefile
make.sys
*backup*
*cisajs*.dat
*Time*
Expand All @@ -15,4 +18,9 @@ HPhi
*.synctex.gz
*.toc
*~
build
#*
html/
GPATH
GRTAGS
GTAGS
29 changes: 29 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR)
project(HPhi NONE)

if(CONFIG)
message(STATUS "Loading configration: " ${PROJECT_SOURCE_DIR}/config/${CONFIG}.cmake)
include(${PROJECT_SOURCE_DIR}/config/${CONFIG}.cmake)
endif(CONFIG)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Type of build" FORCE)
endif(NOT CMAKE_BUILD_TYPE)
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})

enable_language(C)

find_package(OpenMP)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
endif(OPENMP_FOUND)

find_package(MPI)
if(MPI_FOUND)
include_directories(${MPI_C_INCLUDE_PATH})
add_definitions(-DMPI)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MPI_C_LINK_FLAGS}")
endif(MPI_FOUND)

find_package(LAPACK)

add_subdirectory(src)
119 changes: 119 additions & 0 deletions HPhiconfig.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
#!/bin/bash
if [ -z ${1} ] || [ ${1} = "help" ]; then
echo ""
echo "Usage:"
echo "./HPhiconfig.sh system_name"
echo " system_name should be choosen from below:"
echo " sekirei : ISSP system-B"
echo " maki : ISSP system-C"
echo " intel : Intel compiler + Linux PC"
echo " mpicc-intel : Intel compiler + Linux PC + mpicc"
echo " gcc : GCC + Linux"
echo " gcc-mac : GCC + Mac"
echo " manual : Manual configuration. See below."
echo ""
echo "In manual HPhi configtion, please type, for example, "
echo "./HPhiconfig.sh CC=icc LAPACK_FLAGS=\"-Dlapack -mkl=parallel\" \\"
echo " FLAGS=\"-qopenmp -O3 -xCORE-AVX2 -mcmodel=large -shared-intel\""
echo " where"
echo " CC : Compilation command for C"
echo " LAPACK_FLAGS : Compile option for LAPACK"
echo " FLAGS : Other Compilation options"
echo ""
else
if [ ${1} = "sekirei" ]; then
cat > src/make.sys <<EOF
CC = icc
LAPACK_FLAGS = -Dlapack -mkl=parallel
FLAGS = -qopenmp -O3 -xCORE-AVX2 -mcmodel=large -shared-intel
MTFLAGS = -DDSFMT_MEXP=19937 \$(FLAGS)
INCLUDE_DIR=./include
EOF
elif [ ${1} = "maki" ]; then
cat > src/make.sys <<EOF
CC = fccpx
LAPACK_FLAGS = -Dlapack -SSL2BLAMP
FLAGS = -Kfast,openmp,SPARC64IXfx,parallel -Kmemalias,alias_const
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
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
MTFLAGS = -DDSFMT_MEXP=19937 \$(FLAGS)
INCLUDE_DIR=./include
EOF
elif [ ${1} = "gcc-mac" ]; then
cat > src/make.sys <<EOF
CC = gcc
LAPACK_FLAGS = -framework Accelerate
FLAGS = -fopenmp
MTFLAGS = -DDSFMT_MEXP=19937 \$(FLAGS)
INCLUDE_DIR=./include
EOF
elif [ ${1} = "gcc" ]; then
cat > src/make.sys <<EOF
CC = gcc
LAPACK_FLAGS = -Dlapack -llapack -lblas
FLAGS = -fopenmp -lm
MTFLAGS = -DDSFMT_MEXP=19937 \$(FLAGS)
INCLUDE_DIR=./include
EOF
elif [ ${1} == "manual" ]; then
echo " C compiler ?"
read CC
echo " LAPACK option ?"
read LAPACK_FLAGS
echo " Other compilation flags ?"
read FLAGS
cat > src/make.sys <<EOF
CC = ${CC}
LAPACK_FLAGS = ${LAPACK_FLAGS}
FLAGS = ${FLAGS}
MTFLAGS = -DDSFMT_MEXP=19937 \$(FLAGS)
INCLUDE_DIR=./include
EOF
else
echo ""
echo "Unsupported system. Please type"
echo "./HPhiconfig.sh help"
echo ""
exit
fi

echo "cat src/make.sys"
cat src/make.sys

echo
echo "HPhiconfig DONE"
echo

cat > makefile <<EOF
HPhi:
cd src;make -f makefile_src
userguide:
cd doc/jp/;make -f makefile_doc_jp;mv userguide_jp.pdf ../
cd doc/en/;make -f makefile_doc_en;mv userguide_en.pdf ../
clean:
cd src; make -f makefile_src clean
cd doc/jp; make -f makefile_doc_jp clean
cd doc/en; make -f makefile_doc_en clean
rm -f doc/userguide_??.pdf
veryclean:
make clean
rm -f src/make.sys makefile
EOF
fi
7 changes: 7 additions & 0 deletions config/fujitsu.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# for Fujitsu Compiler
set(CMAKE_C_COMPILER "mpifccpx" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -Kfast,parallel -Kmemalias,alias_const" CACHE STRING "" FORCE)
set(OpenMP_C_FLAGS "-Kopenmp" CACHE STRING "" FORCE)

# for SSL2
set(BLAS_LIBRARIES "-SSL2 --linkfortran" CACHE STRING "" FORCE)
2 changes: 2 additions & 0 deletions config/gcc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# for GCC Compiler
set(CMAKE_C_COMPILER "gcc" CACHE STRING "" FORCE)
6 changes: 6 additions & 0 deletions config/intel.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# for Intel Compiler
set(CMAKE_C_COMPILER "icc" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG -DHAVE_SSE2" CACHE STRING "" FORCE)

# for Intel MKL
set(BLA_VENDOR "Intel10_64lp" CACHE STRING "" FORCE)
6 changes: 6 additions & 0 deletions config/sekirei.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# for Intel Compiler
set(CMAKE_C_COMPILER "icc" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS "-O3 -DNDEBUG -xCORE-AVX2 -mcmodel=large -shared-intel" CACHE STRING "" FORCE)

# for Intel MKL
set(BLA_VENDOR "Intel10_64lp" CACHE STRING "" FORCE)
73 changes: 45 additions & 28 deletions doc/en/chap02_1_en.tex
Original file line number Diff line number Diff line change
@@ -1,45 +1,63 @@
% !TEX root = userguide_en.tex
%----------------------------------------------------------
\begin{enumerate}

\item You can download $\HPhi$ in the following place.\\
You can download $\HPhi$ in the following place.\\
\url{https://github.com/QLMS/HPhi/releases}

\item After expanding downloaded files,
move into \verb|src| in the expanded directory.
You can obtain the $\HPhi$ directory by tiping
\begin{verbatim}
$ tar xzvf
$ cd /src/
$ tar xzvf HPhi-xxx.tar.gz
\end{verbatim}

\item Configure the environment for the installation;
please edit \verb|make.sys| and specify the compiler and the option.
For some known system,
you can find prepared settings as comments in \verb|make.sys| and use them.
For example, when you install $\HPhi$ into the ISSP System-B(sekirei),
find
\begin{verbatim}
##### ISSP System-B "sekirei" #####|
There are two kind of procedures to install $\HPhi$.

# CC = icc
# LAPACK_FLAGS = -Dlapack -mkl=parallel
# FLAGS = -qopenmp -O3 -xCORE-AVX2 -mcmodel=large -shared-intel
# MTFLAGS = -DDSFMT_MEXP=19937 $(FLAGS)
# INCLUDE_DIR=./include
\subsection{Using \texttt{HPhiconfig.sh}}

Please run \verb|HPhiconfig.sh| script in the $\HPhi$ directory as follow
(for ISSP system-B ''sekirei''):
\begin{verbatim}
$ bash HPhiconfig.sh sekirei
\end{verbatim}
and uncomment it.
Then environmental configuration file \verb|make.sys| is generated in
\verb|src/| directory.
The command-line argment of \verb|HPhiconfig.sh| is as folows:
\begin{itemize}
\item \verb|sekirei| : ISSP system-B ''sekirei''
\item \verb|maki| : ISSP system-C ''maki''
\item \verb|intel| : intel compiler + Linux PC
\item \verb|gcc| : GCC + Linux PC
\item \verb|gcc-mac| : GCC + Mac
\end{itemize}

\item Save the modified \verb|make.sys| and type \verb|make| as follows:
\verb|make.sys| is as follows (for ISSP-system-B ''sekirei''):
\begin{verbatim}
$ make all
CC = icc
LAPACK_FLAGS = -Dlapack -mkl=parallel
FLAGS = -qopenmp -O3 -xCORE-AVX2 -mcmodel=large -shared-intel
MTFLAGS = -DDSFMT_MEXP=19937 $(FLAGS)
INCLUDE_DIR=./include
\end{verbatim}
We explatin macros of this file as:
\begin{itemize}
\item \verb|CC| : The Compilation command (\verb|icc|, \verb|gcc|, \verb|fccpx|)
\item \verb|LAPACK_FLAGS| : Compilation options for LAPACK. \verb|-Dlapack| can not be removed.
\item \verb|FLAGS| : Other compilation options.
OpenMP utilization option (\verb|-openmp|, \verb|-fopenmp|, \verb|-qopenmp|, etc.)
must be specified.
\item \verb|MTFLAGS|, \verb|INCLUDE_DIR| : Options for the Mersenne Twister
and additional include directory. You do not have to modify them.
\end{itemize}

Then an executable \verb|HPhi| in the current directory;
you should add this directory to the \verb|$PATH| or
make a symbolic link in a place belonging \verb|$PATH|.

Then you are ready to compile HPhi.
Please type
\begin{verbatim}
$ sudo ln -fs `pwd`/HPhi /usr/local/bin/
$ make HPhi
\end{verbatim}
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}
\Large
Expand All @@ -55,4 +73,3 @@

\end{screen}

\end{enumerate}
Loading

0 comments on commit a4d50df

Please sign in to comment.