-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
176 changed files
with
136,635 additions
and
121,014 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.