-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates in this PR: 1. Resolves several old issues/errors (switch c to c++ style allocations, fix HQRRP input format, add license, fix CMake regexp error, etc). 2. Adds sparse and general linear operator support. 3. Augments RBKI input format to accept dense and sparse matrices. --------- Co-authored-by: Riley Murray <[email protected]>
- Loading branch information
1 parent
4f1a3b8
commit 8ea1196
Showing
34 changed files
with
1,524 additions
and
792 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 |
---|---|---|
@@ -1,27 +1,53 @@ | ||
set(tmp) | ||
|
||
# Find Git executable | ||
find_package(Git QUIET) | ||
if(GIT_FOUND) | ||
execute_process(COMMAND ${GIT_EXECUTABLE} | ||
--git-dir=${CMAKE_SOURCE_DIR}/.git describe | ||
--tags --match "[0-9]*.[0-9]*.[0-9]*" | ||
OUTPUT_VARIABLE tmp OUTPUT_STRIP_TRAILING_WHITESPACE | ||
ERROR_QUIET) | ||
message(STATUS "Git found: ${GIT_EXECUTABLE}") | ||
execute_process( | ||
COMMAND ${GIT_EXECUTABLE} --git-dir=${CMAKE_SOURCE_DIR}/.git describe --tags --match "[0-9]*.[0-9]*.[0-9]*" | ||
OUTPUT_VARIABLE tmp | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
ERROR_VARIABLE git_error | ||
RESULT_VARIABLE git_result | ||
) | ||
|
||
# Print the result of the Git command | ||
message(STATUS "Git command result: ${git_result}") | ||
message(STATUS "Git command output: ${tmp}") | ||
if(NOT git_result EQUAL 0) | ||
message(WARNING "Git command failed with error: ${git_error}") | ||
set(tmp "0.0.0") | ||
endif() | ||
else() | ||
message(WARNING "Git not found, using fallback version 0.0.0") | ||
set(tmp "0.0.0") | ||
endif() | ||
|
||
# Check if tmp is empty and set a fallback version if necessary | ||
if(NOT tmp) | ||
message(WARNING "Git describe output is empty, using fallback version 0.0.0") | ||
set(tmp "0.0.0") | ||
endif() | ||
|
||
set(RandLAPACK_VERSION ${tmp} CACHE STRING "RandLAPACK version" FORCE) | ||
# Debugging: Print tmp before setting RandLAPACK_VERSION | ||
message(STATUS "tmp before setting RandLAPACK_VERSION: ${tmp}") | ||
|
||
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(.*$)" | ||
"\\1" RandLAPACK_VERSION_MAJOR ${RandLAPACK_VERSION}) | ||
# Set RandLAPACK_VERSION without CACHE option | ||
set(RandLAPACK_VERSION "${tmp}") | ||
message(STATUS "RandLAPACK_VERSION after setting: ${RandLAPACK_VERSION}") | ||
|
||
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(.*$)" | ||
"\\2" RandLAPACK_VERSION_MINOR ${RandLAPACK_VERSION}) | ||
# Ensure RandLAPACK_VERSION is not empty | ||
if(NOT RandLAPACK_VERSION) | ||
message(FATAL_ERROR "RandLAPACK_VERSION is empty") | ||
endif() | ||
|
||
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(.*$)" | ||
"\\3" RandLAPACK_VERSION_PATCH ${RandLAPACK_VERSION}) | ||
# Extract major, minor, and patch versions | ||
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(.*)$" "\\1" RandLAPACK_VERSION_MAJOR "${RandLAPACK_VERSION}") | ||
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(.*)$" "\\2" RandLAPACK_VERSION_MINOR "${RandLAPACK_VERSION}") | ||
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(.*)$" "\\3" RandLAPACK_VERSION_PATCH "${RandLAPACK_VERSION}") | ||
|
||
# Print extracted version components | ||
message(STATUS "RandLAPACK_VERSION_MAJOR=${RandLAPACK_VERSION_MAJOR}") | ||
message(STATUS "RandLAPACK_VERSION_MINOR=${RandLAPACK_VERSION_MINOR}") | ||
message(STATUS "RandLAPACK_VERSION_PATCH=${RandLAPACK_VERSION_PATCH}") |
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,103 @@ | ||
RandLAPACK Copyright Notices and License Agreement | ||
================================================ | ||
RandLAPACK is an open source software project. Contributors to RandLAPACK can act | ||
as individuals or as corporate entities. All contributions are licensed for | ||
use under the BSD 3-Clause License. The terms of the license appear below. | ||
|
||
Some contributors to RandLAPACK have chosen to make explicit statements concerning | ||
authorship, copyright, or other aspects of intellectual property. Those statements | ||
appear later in this file, after the license agreement. Future modifications of | ||
RandLAPACK code may result in ammendments to these statements. | ||
|
||
****************************************************************************** | ||
*** License Agreement *** | ||
****************************************************************************** | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
(1) Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
|
||
(2) Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
|
||
(3) Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
POSSIBILITY OF SUCH DAMAGE. | ||
|
||
****************************************************************************** | ||
*** Copyright Notice 1. *** | ||
****************************************************************************** | ||
|
||
Copyright (c) 2022, The Regents of the University of California, through | ||
Lawrence Berkeley National Laboratory (subject to receipt of any | ||
required approvals from the U.S. Dept. of Energy). All rights reserved. | ||
|
||
If you have questions about your rights to use or distribute this software, | ||
please contact Berkeley Lab's Intellectual Property Office at | ||
[email protected]. | ||
|
||
NOTICE. This Software was developed under funding from the U.S. Department | ||
of Energy and the U.S. Government consequently retains certain rights. As | ||
such, the U.S. Government has been granted for itself and others acting on | ||
its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the | ||
Software to reproduce, distribute copies to the public, prepare derivative | ||
works, and perform publicly and display publicly, and to permit others to do so. | ||
|
||
****************************************************************************** | ||
*** Copyright Notice 2. *** | ||
****************************************************************************** | ||
|
||
Copyright (c) 2022, University of Tennessee. All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
* Neither the name of the University of Tennessee nor the | ||
names of its contributors may be used to endorse or promote products | ||
derived from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR | ||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
****************************************************************************** | ||
*** Copyright Notice 3. *** | ||
****************************************************************************** | ||
|
||
Copyright (2023) National Technology & Engineering Solutions of Sandia, LLC (NTESS). | ||
Under the terms of Contract DE-NA0003525, there is a non-exclusive license for use | ||
of this work by or on behalf of the U.S. Government. Export of this program | ||
may require a license from the United States Government. | ||
|
||
NEITHER THE UNITED STATES GOVERNMENT, NOR THE UNITED STATES DEPARTMENT | ||
OF ENERGY, NOR NTESS, NOR ANY OF THEIR EMPLOYEES, MAKES | ||
ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR | ||
RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY | ||
INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS | ||
THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS. |
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
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
Oops, something went wrong.