Skip to content

Commit

Permalink
merged from master branch, commit d6c690f
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyangzhuan committed Sep 3, 2018
1 parent 5c98bd1 commit 50c32ce
Show file tree
Hide file tree
Showing 75 changed files with 1,507 additions and 457 deletions.
56 changes: 28 additions & 28 deletions .travis_tests.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
#!/bin/sh
set -e

export RED="\033[31;1m"
export BLUE="\033[34;1m"
printf "${BLUE} GC; Entered tests file:\n"

export DATA_FOLDER=$TRAVIS_BUILD_DIR/EXAMPLE
export EXAMPLE_FOLDER=$TRAVIS_BUILD_DIR/build/EXAMPLE
export TEST_FOLDER=$TRAVIS_BUILD_DIR/build/TEST

case "${TEST_NUMBER}" in
1) mpirun "-n" "1" "$TEST_FOLDER/pdtest" "-r" "1" "-c" "1" "-s" "1" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
2) mpirun "-n" "1" "$TEST_FOLDER/pdtest" "-r" "1" "-c" "1" "-s" "3" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
3) mpirun "-n" "3" "$TEST_FOLDER/pdtest" "-r" "1" "-c" "3" "-s" "1" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
4) mpirun "-n" "3" "$TEST_FOLDER/pdtest" "-r" "1" "-c" "3" "-s" "3" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
5) mpirun "-n" "2" "$TEST_FOLDER/pdtest" "-r" "2" "-c" "1" "-s" "1" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
6) mpirun "-n" "2" "$TEST_FOLDER/pdtest" "-r" "2" "-c" "1" "-s" "3" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
7) mpirun "-n" "6" "$TEST_FOLDER/pdtest" "-r" "2" "-c" "3" "-s" "1" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
8) mpirun "-n" "6" "$TEST_FOLDER/pdtest" "-r" "2" "-c" "3" "-s" "3" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
9) mpirun "-n" "4" "$EXAMPLE_FOLDER/pddrive1" "-r" "2" "-c" "2" "$DATA_FOLDER/big.rua" ;;
10) mpirun "-n" "4" "$EXAMPLE_FOLDER/pddrive2" "-r" "2" "-c" "2" "$DATA_FOLDER/big.rua" ;;
11) mpirun "-n" "4" "$EXAMPLE_FOLDER/pddrive3" "-r" "2" "-c" "2" "$DATA_FOLDER/big.rua" ;;
12) mpirun "-n" "4" "$EXAMPLE_FOLDER/pzdrive1" "-r" "2" "-c" "2" "$DATA_FOLDER/cg20.cua" ;;
13) mpirun "-n" "4" "$EXAMPLE_FOLDER/pzdrive2" "-r" "2" "-c" "2" "$DATA_FOLDER/cg20.cua" ;;
14) mpirun "-n" "4" "$EXAMPLE_FOLDER/pzdrive3" "-r" "2" "-c" "2" "$DATA_FOLDER/cg20.cua" ;;
*) printf "${RED} ###GC: Unknown test\n" ;;
esac
#!/bin/sh
set -e

export RED="\033[31;1m"
export BLUE="\033[34;1m"
printf "${BLUE} GC; Entered tests file:\n"

export DATA_FOLDER=$TRAVIS_BUILD_DIR/EXAMPLE
export EXAMPLE_FOLDER=$TRAVIS_BUILD_DIR/build/EXAMPLE
export TEST_FOLDER=$TRAVIS_BUILD_DIR/build/TEST

case "${TEST_NUMBER}" in
1) mpirun "-n" "1" "$TEST_FOLDER/pdtest" "-r" "1" "-c" "1" "-s" "1" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
2) mpirun "-n" "1" "$TEST_FOLDER/pdtest" "-r" "1" "-c" "1" "-s" "3" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
3) mpirun "-n" "3" "$TEST_FOLDER/pdtest" "-r" "1" "-c" "3" "-s" "1" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
4) mpirun "-n" "3" "$TEST_FOLDER/pdtest" "-r" "1" "-c" "3" "-s" "3" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
5) mpirun "-n" "2" "$TEST_FOLDER/pdtest" "-r" "2" "-c" "1" "-s" "1" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
6) mpirun "-n" "2" "$TEST_FOLDER/pdtest" "-r" "2" "-c" "1" "-s" "3" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
7) mpirun "-n" "6" "$TEST_FOLDER/pdtest" "-r" "2" "-c" "3" "-s" "1" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
8) mpirun "-n" "6" "$TEST_FOLDER/pdtest" "-r" "2" "-c" "3" "-s" "3" "-b" "2" "-x" "8" "-m" "20" "-f" "$DATA_FOLDER/g20.rua" ;;
9) mpirun "-n" "4" "$EXAMPLE_FOLDER/pddrive1" "-r" "2" "-c" "2" "$DATA_FOLDER/big.rua" ;;
10) mpirun "-n" "4" "$EXAMPLE_FOLDER/pddrive2" "-r" "2" "-c" "2" "$DATA_FOLDER/big.rua" ;;
11) mpirun "-n" "4" "$EXAMPLE_FOLDER/pddrive3" "-r" "2" "-c" "2" "$DATA_FOLDER/big.rua" ;;
12) mpirun "-n" "4" "$EXAMPLE_FOLDER/pzdrive1" "-r" "2" "-c" "2" "$DATA_FOLDER/cg20.cua" ;;
13) mpirun "-n" "4" "$EXAMPLE_FOLDER/pzdrive2" "-r" "2" "-c" "2" "$DATA_FOLDER/cg20.cua" ;;
14) mpirun "-n" "4" "$EXAMPLE_FOLDER/pzdrive3" "-r" "2" "-c" "2" "$DATA_FOLDER/cg20.cua" ;;
*) printf "${RED} ###GC: Unknown test\n" ;;
esac
90 changes: 71 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,39 @@
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)

# Project version numbers
project(SuperLU_DIST NONE)
project(SuperLU_DIST C)
set(VERSION_MAJOR "5")
set(VERSION_MINOR "3")
set(VERSION_MINOR "4")
set(VERSION_BugFix "0")
set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BugFix})

list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")

# Set up options
option(enable_blaslib "Build the CBLAS library" ${enable_blaslib_DEFAULT})
option(enable_doc "Build doxygen documentation" OFF)
option(enable_double "Enable double precision library" ON)
option(enable_complex16 "Enable complex16 precision library" ON)
option(enable_tests "Build tests" ON)
option(enable_examples "Build examples" ON)
option(enable_parmetislib "Build the ParMETIS library" ON)
option(TPL_PARMETIS_LIBRARIES "List of absolute paths to ParMETIS link libraries [].")
option(TPL_PARMETIS_INCLUDE_DIRS "List of absolute paths to ParMETIS include directories [].")
option(enable_combblaslib "Build the CombBLAS library" OFF)
option(TPL_COMBBLAS_LIBRARIES "List of absolute paths to CombBLAS link libraries [].")
option(TPL_COMBBLAS_INCLUDE_DIRS "List of absolute paths to CombBLAS include directories [].")

# if (NOT enable_combblaslib)
SET(XSDK_ENABLE_CXX ON)
# endif()

######################################################################
#
# IDEAS: xSDK standards module
MESSAGE("\nProcess XSDK defaults ...")
# SET(USE_XSDK_DEFAULTS_DEFAULT TRUE) # Set to false if desired
INCLUDE("cmake/XSDKDefaults.cmake")
INCLUDE(CTest)

######################################################################

######################################################################
Expand Down Expand Up @@ -51,6 +69,7 @@ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
#----

SET(BUILD_STATIC_LIBS TRUE CACHE BOOL "Include static libs when building shared")

if (BUILD_SHARED_LIBS)
message("-- SuperLU_DIST will be built as a shared library.")
set(PROJECT_NAME_LIB_EXPORT libsuperlu_dist.so)
Expand All @@ -62,9 +81,10 @@ else()
set(PROJECT_NAME_LIB_EXPORT libsuperlu_dist.a)
endif()

enable_language (C)
enable_language (CXX)
set(CMAKE_CXX_STANDARD 11)
if (XSDK_ENABLE_CXX)
enable_language (CXX)
set(NOCXX FALSE)
endif()
if (XSDK_ENABLE_Fortran)
enable_language (Fortran)
set(NOFORTRAN FALSE)
Expand All @@ -84,17 +104,6 @@ if (NOT CMAKE_INSTALL_PREFIX)
endif()


# setup options
option(enable_blaslib "Build the CBLAS library" ${enable_blaslib_DEFAULT})
option(enable_parmetislib "Build the ParMETIS library" ON)
option(enable_doc "Build doxygen documentation" OFF)
option(enable_double "Enable double precision library" ON)
option(enable_complex16 "Enable complex16 precision library" ON)
option(enable_tests "Build tests" ON)
option(enable_examples "Build examples" ON)
option(TPL_PARMETIS_LIBRARIES "List of absolute paths to ParMETIS link libraries [].")
option(TPL_PARMETIS_INCLUDE_DIRS "List of absolute paths to ParMETIS include directories [].")

if(NOT MSVC)
include(GNUInstallDirs)
set(default_install_inc_dir ${CMAKE_INSTALL_INCLUDEDIR})
Expand All @@ -110,13 +119,15 @@ set(INSTALL_INC_DIR "${default_install_inc_dir}" CACHE STRING "The folder where
set(INSTALL_LIB_DIR "${default_install_lib_dir}" CACHE STRING "The folder where libraries will be installed.")
set(INSTALL_BIN_DIR "${default_install_bin_dir}" CACHE STRING "The folder where runtime files will be installed.")


# Set up required compiler defines and options.
## get_directory_property( DirDefs COMPILE_DEFINITIONS )
# set(CMAKE_C_FLAGS "-DDEBUGlevel=0 -DPRNTlevel=0 ${CMAKE_C_FLAGS}")
if(XSDK_INDEX_SIZE EQUAL 64)
message("-- Using 64 bit integer for index size")
endif()
set(CMAKE_C_FLAGS_RELEASE "-O3" CACHE STRING "")
set(CMAKE_CXX_FLAGS_RELEASE "-O3" CACHE STRING "")

######################################################################
#
Expand All @@ -128,6 +139,7 @@ set(CMAKE_C_FLAGS_RELEASE "-O3" CACHE STRING "")
find_package(MPI)
if(MPI_C_FOUND)
set(CMAKE_C_FLAGS "${MPI_C_COMPILE_FLAGS} ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${MPI_CXX_COMPILE_FLAGS} ${CMAKE_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MPI_C_LINK_FLAGS}" )
endif()
#--------------------- OpenMP ---------------------
Expand All @@ -139,6 +151,7 @@ if (enable_openmp)
## include(FindOpenMP) # Strumpack uses this
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${OpenMP_C_FLAGS} ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${OpenMP_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")
# On edison, OpenMP_EXE_LINKER_FLAGS is empty
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_C_FLAGS}")
Expand Down Expand Up @@ -219,6 +232,42 @@ if(PARMETIS_FOUND)
set(HAVE_PARMETIS TRUE)
endif()

#--------------------- CombBLAS ---------------------
if (enable_combblaslib) ## want to use CombBLAS
if (NOT TPL_COMBBLAS_LIBRARIES)
message(FATAL_ERROR "TPL_COMBBLAS_LIBRARIES option should be set for COMBBLAS support to be enabled.")
endif()

if (NOT TPL_COMBBLAS_INCLUDE_DIRS)
message(FATAL_ERROR "TPL_COMBBLAS_INCLUDE_DIRS option be set for COMBBLAS support to be enabled.")
endif()
foreach(dir ${TPL_COMBBLAS_INCLUDE_DIRS})
if (NOT EXISTS ${dir})
message(FATAL_ERROR "COMBBLAS include directory not found: ${dir}")
endif()
set(CMAKE_CXX_FLAGS "-I${dir} ${CMAKE_CXX_FLAGS}")
endforeach()

message("-- Enabled support for COMBBLAS")
set(COMBBLAS_FOUND TRUE)

set(COMBBLAS_LIB ${TPL_COMBBLAS_LIBRARIES})
# fix up COMBBLAS library names
string (REPLACE ";" " " COMBBLAS_LIB_STR "${COMBBLAS_LIB}")
set(COMBBLAS_LIB_EXPORT ${COMBBLAS_LIB_STR})

else()
message("-- Will not link with CombBLAS.")
endif()

if(COMBBLAS_FOUND)
set(HAVE_COMBBLAS TRUE)
set(LOADER $(CXX))
else()
set(LOADER $(CC))
endif()


######################################################################
#
# Include directories
Expand All @@ -230,7 +279,11 @@ include_directories(${CMAKE_SOURCE_DIR}/SRC)
if (TPL_PARMETIS_INCLUDE_DIRS)
include_directories(${TPL_PARMETIS_INCLUDE_DIRS}) ## parmetis
endif ()
if (TPL_COMBBLAS_INCLUDE_DIRS)
include_directories(${TPL_COMBBLAS_INCLUDE_DIRS}) ## CombBLAS
endif ()
include_directories(${MPI_C_INCLUDE_PATH})

######################################################################
#
# Add subdirectories
Expand All @@ -254,11 +307,10 @@ if(enable_examples)
add_subdirectory(EXAMPLE)
endif()

# file(WRITE "make.defs" "# can be exposed to users" ${CMAKE_C_COMPILER})
# configure_file(${CMAKE_SOURCE_DIR}/make.inc.in ${CMAKE_BINARY_DIR}/make.inc)
configure_file(${SuperLU_DIST_SOURCE_DIR}/make.inc.in ${SuperLU_DIST_SOURCE_DIR}/make.inc)
configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU_DIST_BINARY_DIR}/SRC/superlu_dist_config.h)
# configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h)
configure_file(${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h.in ${SuperLU_DIST_SOURCE_DIR}/SRC/superlu_dist_config.h)

# Add pkg-config support
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/superlu_dist.pc.in ${CMAKE_CURRENT_BINARY_DIR}/superlu_dist.pc @ONLY)
Expand Down
Binary file modified DOC/ug.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions DoxyConfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ PROJECT_NAME = SuperLU Distributed
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = 5.0.0
PROJECT_NUMBER = 5.4.0
e
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
Expand Down Expand Up @@ -513,7 +513,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.

INPUT = SRC/ EXAMPLE/ FORTRAN/
INPUT = SRC/ EXAMPLE/ FORTRAN/ TEST/

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
Expand Down
5 changes: 2 additions & 3 deletions EXAMPLE/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#
#######################################################################
include ../make.inc
INCLUDEDIR = -I../SRC

DEXM = pddrive.o dcreate_matrix.o sp_ienv.o #pdgstrf2.o
#pdgssvx.o
Expand Down Expand Up @@ -132,9 +131,9 @@ pzdrive4_ABglobal: $(ZEXMG4) $(DSUPERLULIB)
#pdgstrf.o: dscatter.c dSchCompUdt-cuda.c pdgstrf.c
# $(CC) $(CFLAGS) $(CDEFS) $(BLASDEF) $(INCLUDEDIR) -c pdgstrf.c $(VERBOSE)
.c.o:
$(CC) $(CFLAGS) $(CDEFS) $(BLASDEF) $(INCLUDEDIR) -c $< $(VERBOSE)
$(CC) $(CFLAGS) $(CDEFS) $(BLASDEF) -I $(INCLUDEDIR) -c $< $(VERBOSE)
.cpp.o:
$(CPP) $(CPPFLAGS) $(CDEFS) $(BLASDEF) $(INCLUDEDIR) -c $< $(VERBOSE)
$(CPP) $(CPPFLAGS) $(CDEFS) $(BLASDEF) -I $(INCLUDEDIR) -c $< $(VERBOSE)
.f.o:
$(FORTRAN) $(FFLAGS) -c $< $(VERBOSE)

Expand Down
Loading

0 comments on commit 50c32ce

Please sign in to comment.