Skip to content

Commit

Permalink
Merge pull request #416 from DrTimothyAldenDavis/dev2
Browse files Browse the repository at this point in the history
7.2.1
  • Loading branch information
DrTimothyAldenDavis authored Sep 18, 2023
2 parents 5ffb460 + 507c6a1 commit bc500f8
Show file tree
Hide file tree
Showing 36 changed files with 650 additions and 95 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Sept 18, 2023: version 7.2.1

* UMFPACK v6.2.1 and GPUQREngine v3.2.1: copies internal include files
from other SuiteSparse packages (AMD and SuiteSparse_GPURuntime),
so these two packages can be built independently.

Sept 8, 2023: version 7.2.0

* build system: modern cmake structure, by Markus Muetzel.
Expand Down
4 changes: 2 additions & 2 deletions GPUQREngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

cmake_minimum_required ( VERSION 3.20 )

set ( GPUQRENGINE_DATE "Sept 8, 2023" )
set ( GPUQRENGINE_DATE "Sept 18, 2023" )
set ( GPUQRENGINE_VERSION_MAJOR 3 )
set ( GPUQRENGINE_VERSION_MINOR 2 )
set ( GPUQRENGINE_VERSION_SUB 0 )
set ( GPUQRENGINE_VERSION_SUB 1 )

message ( STATUS "Building GPUQRENGINE version: v"
${GPUQRENGINE_VERSION_MAJOR}.
Expand Down
5 changes: 5 additions & 0 deletions GPUQREngine/Doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Sept 18, 2023: version 3.2.1

* SuiteSparse_GPURuntime: internal include files copied into
GPUQREngine/Include

Sept 8, 2023: version 3.2.0

* cmake updates: SuiteSparse:: namespace by Markus Muetzel
Expand Down
4 changes: 2 additions & 2 deletions GPUQREngine/Include/GPUQREngine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#define GPUQRENGINE_HPP

// Version information:
#define GPUQRENGINE_DATE "Sept 8, 2023"
#define GPUQRENGINE_DATE "Sept 18, 2023"
#define GPUQRENGINE_MAIN_VERSION 3
#define GPUQRENGINE_SUB_VERSION 2
#define GPUQRENGINE_SUBSUB_VERSION 0
#define GPUQRENGINE_SUBSUB_VERSION 1

#define GPUQRENGINE_VER_CODE(main,sub) ((main) * 1000 + (sub))
#define GPUQRENGINE_VERSION \
Expand Down
8 changes: 8 additions & 0 deletions GPUQREngine/Include/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The following files must be exact copies of the files in
SuiteSparse_GPURuntime/Include:

SuiteSparseGPU_debug.hpp
SuiteSparseGPU_internal.hpp
SuiteSparseGPU_macros.hpp
SuiteSparseGPU_Workspace.hpp
SuiteSparseGPU_workspace_macros.hpp
116 changes: 116 additions & 0 deletions GPUQREngine/Include/SuiteSparseGPU_Workspace.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
// =============================================================================
// === SuiteSparse_GPURuntime/Include/SuiteSparseGPU_Workspace.hpp =============
// =============================================================================

// SuiteSparse_GPURuntime, Copyright (c) 2013-2016, Timothy A Davis,
// Sencer Nuri Yeralan, and Sanjay Ranka. All Rights Reserved.
// SPDX-License-Identifier: GPL-2.0+

//------------------------------------------------------------------------------

#ifndef SUITESPARSE_GPURUNTIME_WORKSPACE_HPP
#define SUITESPARSE_GPURUNTIME_WORKSPACE_HPP

#include "SuiteSparseGPU_internal.hpp"

class Workspace
{
private:

size_t nitems; // number of items to allocate
size_t size_of_item; // size of each item, in bytes
size_t totalSize; // nitems * size_of_item

// bool lazyAllocate; // no longer used (for possible future use)
bool pageLocked; // true if CPU memory is pagelocked

void *cpuReference; // pointer to CPU memory
void *gpuReference; // pointer to GPU memory

public:
// Read-Only Properties
size_t getCount(void){ return nitems; }
size_t getStride(void){ return size_of_item; }
void *cpu(void){ return cpuReference; }
void *gpu(void){ return gpuReference; }

// Constructor/Destructor
void *operator new(size_t bytes, Workspace* ptr){ return ptr; }
Workspace(size_t nitems, size_t size_of_item);
~Workspace();

// Memory management wrappers
static void *cpu_malloc(size_t nitems, size_t size_of_item,
bool pageLocked=false);
static void *cpu_calloc(size_t nitems, size_t size_of_item,
bool pageLocked=false);
static void *cpu_free(void *address, bool pageLocked = false);
static void *gpu_malloc(size_t nitems, size_t size_of_item);
static void *gpu_calloc(size_t nitems, size_t size_of_item);
static void *gpu_free(void *);

// Workspace management
static Workspace *allocate
(
size_t nitems, // number of items to allocate
size_t size_of_item, // size of each item, in bytes
bool doCalloc = false, // if true, then calloc; else malloc
bool cpuAlloc = true, // if true, then allocate CPU memory
bool gpuAlloc = true, // if true, then allocate GPU memory
bool pageLocked = false // true if CPU memory is pagelocked
);

// destroy workspace, freeing memory on both the CPU and GPU
static Workspace *destroy
(
Workspace *address
);

// Reference manipulation functions
template <typename T> void extract(T *cpu_arg, T *gpu_arg)
{
*cpu_arg = (T) cpuReference;
*gpu_arg = (T) gpuReference;
}
void assign(void *cpu_arg, void *gpu_arg)
{
cpuReference = cpu_arg;
gpuReference = gpu_arg;
}

// unused, left commented out for possible future use
// void setLazy()
// {
// lazyAllocate = true;
// }

// Memory management for workspaces
virtual bool ws_malloc(bool cpuAlloc = true, bool gpuAlloc = true);
virtual bool ws_calloc(bool cpuAlloc = true, bool gpuAlloc = true);
virtual void ws_free(bool cpuFree=true, bool gpuFree=true);

// GPU-CPU transfer routines
virtual bool transfer(cudaMemcpyKind direction, bool synchronous=true,
cudaStream_t stream=0);

// CPU & GPU memory functions
// memset functions unused, left commented out for possible future use
// bool gpu_memset(size_t newValue);
// bool cpu_memset(size_t newValue);

// Debug
#if DEBUG_ATLEAST_ERRORONLY
static void print(Workspace *workspace)
{
printf (
"(%ld,%ld) has %ld entries of size %ld each.\n",
(size_t) workspace->cpu(),
(size_t) workspace->gpu(),
workspace->getCount(),
workspace->getStride()
);
}
#endif
};

#endif
49 changes: 49 additions & 0 deletions GPUQREngine/Include/SuiteSparseGPU_debug.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// =============================================================================
// === SuiteSparse_GPURuntime/Include/SuiteSparseGPU_debug.hpp =================
// =============================================================================

// SuiteSparse_GPURuntime, Copyright (c) 2013-2016, Timothy A Davis,
// Sencer Nuri Yeralan, and Sanjay Ranka. All Rights Reserved.
// SPDX-License-Identifier: GPL-2.0+

//------------------------------------------------------------------------------

#ifndef SUITESPARSE_GPURUNTIME_DEBUG_HPP
#define SUITESPARSE_GPURUNTIME_DEBUG_HPP

#define GPURUNTIME_DLEVEL_OFF 0
#define GPURUNTIME_DLEVEL_ERRORONLY 1
#define GPURUNTIME_DLEVEL_CASUAL 2
#define GPURUNTIME_DLEVEL_VERBOSE 3
#define GPURUNTIME_DLEVEL_EXTREME 4

//------------------------------------------------------------------------------
// force debugging off
//------------------------------------------------------------------------------

#ifndef NDEBUG
#define NDEBUG
#endif

// uncomment this line to turn on debugging
// #undef NDEBUG

//------------------------------------------------------------------------------

#ifndef NDEBUG
#define GPURUNTIME_DLEVEL GPURUNTIME_DLEVEL_CASUAL
#else
// no debugging
#define GPURUNTIME_DLEVEL GPURUNTIME_DLEVEL_OFF
#endif

#define DEBUG_ATLEAST_ERRORONLY (GPURUNTIME_DLEVEL >= GPURUNTIME_DLEVEL_ERRORONLY)
#define DEBUG_ATLEAST_CASUAL (GPURUNTIME_DLEVEL >= GPURUNTIME_DLEVEL_CASUAL)
#define DEBUG_ATLEAST_VERBOSE (GPURUNTIME_DLEVEL >= GPURUNTIME_DLEVEL_VERBOSE)
#define DEBUG_ATLEAST_EXTREME (GPURUNTIME_DLEVEL >= GPURUNTIME_DLEVEL_EXTREME)

#ifndef GPURUNTIME_LOGFILE_PATH
#define GPURUNTIME_LOGFILE_PATH "SuiteSparse_GPURuntime-logfile.txt"
#endif

#endif
35 changes: 35 additions & 0 deletions GPUQREngine/Include/SuiteSparseGPU_internal.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// =============================================================================
// SuiteSparse_GPURuntime/Include/SuiteSparseGPU_internal.hpp
// =============================================================================

// SuiteSparse_GPURuntime, Copyright (c) 2013-2016, Timothy A Davis,
// Sencer Nuri Yeralan, and Sanjay Ranka. All Rights Reserved.
// SPDX-License-Identifier: GPL-2.0+

//------------------------------------------------------------------------------

#ifndef SUITESPARSEGPU_INTERNAL_HPP
#define SUITESPARSEGPU_INTERNAL_HPP

#ifdef SUITESPARSE_CUDA

#include "cuda_runtime.h"
#include "SuiteSparse_config.h"

#include <stdlib.h>

#include "SuiteSparseGPU_macros.hpp"

#if DEBUG_ATLEAST_ERRORONLY
#include <stdio.h>
#endif

class Workspace;

#include "SuiteSparseGPU_Workspace.hpp"

#endif

#include "SuiteSparse_GPURuntime.hpp"

#endif
21 changes: 21 additions & 0 deletions GPUQREngine/Include/SuiteSparseGPU_macros.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// =============================================================================
// === SuiteSparse_GPURuntime/Include/SuiteSparseGPU_macros.hpp ================
// =============================================================================

// SuiteSparse_GPURuntime, Copyright (c) 2013-2016, Timothy A Davis,
// Sencer Nuri Yeralan, and Sanjay Ranka. All Rights Reserved.
// SPDX-License-Identifier: GPL-2.0+

//------------------------------------------------------------------------------

#ifndef SUITESPARSE_GPURUNTIME_MACROS_HPP
#define SUITESPARSE_GPURUNTIME_MACROS_HPP

#ifndef IMPLIES
#define IMPLIES(p,q) (!(p) || ((p) && (q)))
#endif

#include "SuiteSparseGPU_debug.hpp"
#include "SuiteSparseGPU_workspace_macros.hpp"

#endif
24 changes: 24 additions & 0 deletions GPUQREngine/Include/SuiteSparseGPU_workspace_macros.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// =============================================================================
// SuiteSparse_GPURuntime/Include/SuiteSparseGPU_workspace_macros.hpp
// =============================================================================

// SuiteSparse_GPURuntime, Copyright (c) 2013-2016, Timothy A Davis,
// Sencer Nuri Yeralan, and Sanjay Ranka. All Rights Reserved.
// SPDX-License-Identifier: GPL-2.0+

//------------------------------------------------------------------------------

#ifndef SUITESPARSE_GPURUNTIME_WORKSPACE_MACROS_HPP
#define SUITESPARSE_GPURUNTIME_WORKSPACE_MACROS_HPP

#ifndef GPU_REFERENCE
#define GPU_REFERENCE(WORKSPACE, TYPE) \
((TYPE) (WORKSPACE != NULL ? (WORKSPACE)->gpu() : NULL))
#endif

#ifndef CPU_REFERENCE
#define CPU_REFERENCE(WORKSPACE, TYPE) \
((TYPE) (WORKSPACE != NULL ? (WORKSPACE)->cpu() : NULL))
#endif

#endif
6 changes: 3 additions & 3 deletions Mongoose/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ include ( SuiteSparsePolicy )

#-------------------------------------------------------------------------------

set(Mongoose_DATE "Sept 8, 2023")
set(Mongoose_NUMERIC_DATE "2023-09-08")
set(Mongoose_DATE "Sept 18, 2023")
set(Mongoose_NUMERIC_DATE "2023-09-18")
set(Mongoose_VERSION_MAJOR 3)
set(Mongoose_VERSION_MINOR 2)
set(Mongoose_VERSION_PATCH 0)
set(Mongoose_VERSION_PATCH 1)

project(Mongoose
VERSION "${Mongoose_VERSION_MAJOR}.${Mongoose_VERSION_MINOR}.${Mongoose_VERSION_PATCH}"
Expand Down
5 changes: 5 additions & 0 deletions Mongoose/Doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Sept 18, 2023: version 3.2.1

* cmake updates: link executables to SuiteSparse_config that depend on it;
by Markus Muetzel

Sept 8, 2023: version 3.2.0

* cmake updates: SuiteSparse:: namespace by Markus Muetzel
Expand Down
Binary file modified Mongoose/Doc/Mongoose_UserGuide.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions Mongoose/Doc/title-info.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
\title{Mongoose User Guide, Version 3.2.0}
\title{Mongoose User Guide, Version 3.2.1}
\author{Scott Kolodziej, Nuri Yeralan, Tim Davis, William W. Hager}
\date{Sept 8, 2023}
\date{Sept 18, 2023}
4 changes: 2 additions & 2 deletions Mongoose/Include/Mongoose.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
// Configuration information from CMake
#define Mongoose_VERSION_MAJOR 3
#define Mongoose_VERSION_MINOR 2
#define Mongoose_VERSION_PATCH 0
#define Mongoose_DATE "Sept 8, 2023"
#define Mongoose_VERSION_PATCH 1
#define Mongoose_DATE "Sept 18, 2023"

namespace Mongoose
{
Expand Down
8 changes: 4 additions & 4 deletions Mongoose/codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"codeRepository": "https://github.com/ScottKolo/Mongoose",
"issueTracker": "https://github.com/ScottKolo/Mongoose/issues",
"license": "https://spdx.org/licenses/GPL-3.0-only.html",
"version": "3.2.0",
"softwareVersion": "3.2.0",
"version": "3.2.1",
"softwareVersion": "3.2.1",
"author": [
{
"@type": "Person",
Expand Down Expand Up @@ -47,7 +47,7 @@
},
"contIntegration": "https://travis-ci.com/ScottKolo/Mongoose",
"developmentStatus": "active",
"downloadUrl": "https://github.com/ScottKolo/Mongoose/archive/v3.2.0.zip",
"downloadUrl": "https://github.com/ScottKolo/Mongoose/archive/v3.2.1.zip",
"funding":"Office of Naval Research grant N00014-11-1-0068",
"funding":"Office of Naval Research grant N00014-15-1-2048",
"funding":"Office of Naval Research grant N00014-18-1-2100",
Expand All @@ -66,7 +66,7 @@
],
"dateCreated":"2018-04-09",
"datePublished":"2018-05-25",
"dateModified":"2023-09-08",
"dateModified":"2023-09-18",
"programmingLanguage": "C++",
"programmingLanguage": "MATLAB"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SuiteSparse: A Suite of Sparse matrix packages at http://suitesparse.com
-----------------------------------------------------------------------------

Sept 8, 2023, SuiteSparse VERSION 7.2.0
Sept 18, 2023, SuiteSparse VERSION 7.2.1

SuiteSparse is a set of sparse-matrix-related packages written or co-authored
by Tim Davis, available at https://github.com/DrTimothyAldenDavis/SuiteSparse .
Expand Down
4 changes: 2 additions & 2 deletions SuiteSparse_config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
cmake_minimum_required ( VERSION 3.22 )

# version of both SuiteSparse and SuiteSparse_config
set ( SUITESPARSE_DATE "Sept 8, 2023" )
set ( SUITESPARSE_DATE "Sept 18, 2023" )
set ( SUITESPARSE_VERSION_MAJOR 7 )
set ( SUITESPARSE_VERSION_MINOR 2 )
set ( SUITESPARSE_VERSION_SUB 0 )
set ( SUITESPARSE_VERSION_SUB 1 )

message ( STATUS "Building SuiteSparse_config version: v"
${SUITESPARSE_VERSION_MAJOR}.
Expand Down
Loading

0 comments on commit bc500f8

Please sign in to comment.