Skip to content

Commit

Permalink
the newly modified library compiles with no internal undefined symbols
Browse files Browse the repository at this point in the history
there are still some linking issues due to non having resolved all the
math library stuff just yet. these are being resolved.

this commit removes all Graph, DistGraph, DistMultiVec, SparseMatrix
and DistSparseMatrix routines. hydrogen will only support dense linear
algebra.
  • Loading branch information
benson31 committed Oct 26, 2017
1 parent 31fae01 commit 35d9820
Show file tree
Hide file tree
Showing 151 changed files with 315 additions and 18,463 deletions.
67 changes: 57 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.4)
cmake_minimum_required(VERSION 3.5)

project(Hydrogen CXX)
project(Hydrogen C CXX)
set(HYDROGEN_VERSION_MAJOR 0)
set(HYDROGEN_VERSION_MINOR 1)

Expand All @@ -20,6 +20,12 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
# Legacy options, with EL_ prefix intact
option(BINARY_SUBDIRECTORIES "Install binaries into tree based on type" ON)



#
# MEMORY-RELATED OPTIONS
#

option(EL_USE_64BIT_INTS "Use 64-bit integers for El indexing" OFF)
option(EL_USE_64BIT_BLAS_INTS "Use 64-bit integers for BLAS/LAPACK" OFF)
if(EL_USE_64BIT_BLAS_INTS)
Expand All @@ -32,6 +38,20 @@ mark_as_advanced(EL_ZERO_INIT)
option(EL_DISABLE_VALGRIND "Prevent Elemental from looking for valgrind?" OFF)
mark_as_advanced(EL_DISABLE_VALGRIND)

#
# OpenMP
#

# At one point, a bug was found in IBM's C++ compiler for Blue Gene/P,
# where OpenMP statements of the form a[i] += alpha b[i], with complex data,
# would segfault and/or return incorrect results
option(EL_AVOID_OMP_FMA "Avoid a bug in the IBM compilers." OFF)
mark_as_advanced(EL_AVOID_OMP_FMA)

#
# MPI
#

option(EL_USE_CUSTOM_ALLTOALLV "Avoid MPI_Alltoallv for performance reasons" ON)
mark_as_advanced(EL_USE_CUSTOM_ALLTOALLV)

Expand All @@ -41,12 +61,6 @@ mark_as_advanced(EL_USE_CUSTOM_ALLTOALLV)
option(EL_AVOID_COMPLEX_MPI "Avoid potentially buggy complex MPI routines" ON)
mark_as_advanced(EL_AVOID_COMPLEX_MPI)

# At one point, a bug was found in IBM's C++ compiler for Blue Gene/P,
# where OpenMP statements of the form a[i] += alpha b[i], with complex data,
# would segfault and/or return incorrect results
option(EL_AVOID_OMP_FMA "Avoid a bug in the IBM compilers." OFF)
mark_as_advanced(EL_AVOID_OMP_FMA)

# Due to a subtle flaw in the Blue Gene/P extensions for MPICH2, treating
# floating-point data as a collection of byte-sized objects results in a
# better algorithm being chosen for MPI_Allgather. This should not effect
Expand All @@ -60,6 +74,10 @@ option(EL_REDUCE_SCATTER_BLOCK_VIA_ALLREDUCE
"AllReduce based block MPI_Reduce_scatter" OFF)
mark_as_advanced(EL_REDUCE_SCATTER_BLOCK_VIA_ALLREDUCE)

#
# Runtime warnings
#

# Print a warning any time a redistribution is performed which unpacks a
# large amount of data with a non-unit stride
option(EL_CACHE_WARNINGS "Warns when using cache-unfriendly routines" OFF)
Expand All @@ -77,6 +95,22 @@ option(EL_VECTOR_WARNINGS
"Warn when vector redistribution chances are missed" OFF)
mark_as_advanced(EL_VECTOR_WARNINGS)

#
# Find third-party libraries
#

include(FindAndVerifyMPI)

# FIXME: GET RID OF FORTRAN
include(detect/Fortran)

# External projects build internally
# TODO Investigate why
add_subdirectory(external/pmrrr)

# Add SuiteSparse (TODO: Why bundled here?)
add_subdirectory(external/suite_sparse)
include_directories(external/suite_sparse/include)

# Macro for setting up full paths
macro(set_full_path VAR)
Expand All @@ -94,6 +128,19 @@ set(HYDROGEN_SOURCES)
add_subdirectory(include)
add_subdirectory(src)

add_library(hydrogen "${HYDROGEN_SOURCES}" "${HYDROGEN_HEADERS}")

configure_file("${PROJECT_SOURCE_DIR}/cmake/configure_files/config.h.in"
"${PROJECT_BINARY_DIR}/include/El/config.h")

add_library(hydrogen "${HYDROGEN_SOURCES}" "${HYDROGEN_HEADERS}")
target_include_directories(hydrogen PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/El>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include/El>)
target_link_libraries(hydrogen PUBLIC pmrrr)
target_link_libraries(hydrogen PUBLIC MPI::MPI_CXX)
target_link_libraries(hydrogen PUBLIC lapack blas)

if (BUILD_SHARED_LIBS)
target_link_libraries(hydrogen PUBLIC "-Wl,-no-undefined")
endif()
1 change: 1 addition & 0 deletions cmake/detect/Fortran.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ endif()
# argument for enable_language is still completely broken as of 3.0.2
workaround_9220(Fortran FORTRAN_WORKS)
if(FORTRAN_WORKS)
enable_language(C OPTIONAL)
enable_language(Fortran OPTIONAL)
set(EL_HAVE_F90_INTERFACE FALSE)
if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
Expand Down
86 changes: 0 additions & 86 deletions cmake/external_projects/ElMath/METIS.cmake

This file was deleted.

124 changes: 0 additions & 124 deletions cmake/external_projects/ElMath/ParMETIS.cmake

This file was deleted.

Loading

0 comments on commit 35d9820

Please sign in to comment.