-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PMR^3: templated eigensolver for Elemental #189
base: master
Are you sure you want to change the base?
Changes from all commits
685bf4a
e94630b
dc13004
ca7c9e7
628436f
724df2d
27da86b
3854e23
bcc2999
08c8a0c
f2f6b08
fb90124
c26ff4e
7e216cd
a52aa80
cd42d3b
47dec0c
01d2037
7cf5d11
0480119
bdbce36
6d35bb6
6bb4639
9d125f7
f31bfa7
9a3b3a7
8268f91
98a618b
1b7acb9
25d68e8
fd4c0d3
f0981a0
cada3ad
38157c4
aeb7cbb
e98005d
2c625f6
997a039
c8b3d4b
edd0c45
3beb5fc
66400aa
b66876e
39cdaa0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,10 +10,13 @@ | |
# http://opensource.org/licenses/BSD-2-Clause | ||
# | ||
|
||
# Create a set of defines for including in templated code | ||
set(pmrrr_defines "\n") | ||
|
||
option(HAVE_SPINLOCKS "Enable if pthread lib supports spinlocks" OFF) | ||
MARK_AS_ADVANCED(HAVE_SPINLOCKS) | ||
if(NOT HAVE_SPINLOCKS) | ||
add_definitions(-DNOSPINLOCKS) | ||
set(pmrrr_defines "${pmrrr_defines}#define NOSPINLOCKS\n") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the reason for this change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Those defines have been used as a flag to build PMR^3 as a library. Now most of the code (and 100% of code relying on availability of pthreads and spinlocks) have been moved to templated code included by Elemental. To make configuration flags available, I changed one of PMR^3 headers to a CMake configuration file, installed in both build and install directory. That's why those flags are accumulated and used for configuration of the header, not passed directly to compiler. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for the detailed reply; though it seems it would be more usual to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! I didn't know about that feature. |
||
endif() | ||
|
||
# Include the header directory | ||
|
@@ -24,9 +27,6 @@ include_directories(BEFORE "${CMAKE_CURRENT_SOURCE_DIR}/include") | |
|
||
# Define the header files installation rules | ||
# ------------------------------------------ | ||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ | ||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||
FILES_MATCHING PATTERN "*.h") | ||
if(WIN32 OR APPLE OR NOT EL_HYBRID) | ||
# Disable for Windows because of lack of POSIX support; | ||
# disable for Mac OS X because of deprecation of unnamed semaphores | ||
|
@@ -36,9 +36,21 @@ else() | |
option(DISABLE_PTHREADS "Disable pthreads?" OFF) | ||
endif() | ||
if(DISABLE_PTHREADS) | ||
add_definitions(-DDISABLE_PTHREADS) | ||
set(pmrrr_defines "${pmrrr_defines}#define DISABLE_PTHREADS\n") | ||
endif() | ||
|
||
#Build directory | ||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/global.h.in" | ||
"${PROJECT_BINARY_DIR}/include/pmrrr/definitions/global.h" | ||
@ONLY) | ||
#Install directory | ||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/global.h.in" | ||
"${CMAKE_INSTALL_INCLUDEDIR}/pmrrr/definitions/lobal.h" | ||
@ONLY) | ||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ | ||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp") | ||
|
||
# Ensure that an MPI C compiler was found | ||
if(NOT MPI_C_FOUND) | ||
message(FATAL_ERROR "No MPI C compiler was found, so PMRRR cannot be built") | ||
|
@@ -74,7 +86,7 @@ set(CMAKE_THREAD_LIBS_INIT ${CMAKE_THREAD_LIBS_INIT} PARENT_SCOPE) | |
|
||
# Define the main library and its link libraries | ||
# ---------------------------------------------- | ||
file(GLOB_RECURSE PMRRR_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.c" "*.h") | ||
file(GLOB_RECURSE PMRRR_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cpp" "*.h") | ||
add_library(pmrrr ${LIBRARY_TYPE} ${PMRRR_SRC}) | ||
if(DISABLE_PTHREADS) | ||
target_link_libraries(pmrrr ${MPI_C_LIBRARIES} ${MATH_LIBS}) | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't properly documented, but the
examples/
folder is meant to be more for demonstrating functionality, and thetests/
folder is meant for correctness tests.As an aside, Elemental uses
CamelCase
for function names rather thansnake_case
.It might also be preferred to test both single-precision and double-precision in the same run (with the ideal case being able to individually disable each precision).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comment, I'm going to fix that.
By being able to disable each precision you mean a compilation flag? Or runtime argument?