Skip to content

Commit

Permalink
Merge pull request #289 from sethrj/release-v2.0.1
Browse files Browse the repository at this point in the history
Release v2.0.1
  • Loading branch information
sethrj committed Aug 14, 2022
2 parents 2a30c3f + 37af655 commit 60323bd
Show file tree
Hide file tree
Showing 7 changed files with 237 additions and 157 deletions.
42 changes: 28 additions & 14 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,29 @@ ability to rebuild ForTrilinos wrappers. (Note that SWIG is always optional;
the version here simply denotes the version used to generate the included
wrappers.)

The version scheme is based on semantic versioning:
- Major version numbers with Trilinos and minor versions of SWIG-Fortran (since
it's still not officially upstreamed) can result in major version number
changes for ForTrilinos.

- New features in Trilinos, and new support by ForTrilinos, can result in minor
version number changes. Features removed by a minor version change in
Trilinos may also result in a minor version change.

- Minor changes to the SWIG-Fortran implementation (which don't affect the
interface in the .F90 files) result in a patch version.

Essentially, the versioning will be driven by what the Fortran-only users see
in the committed version of the generated wrappers.

.. _version_table:

.. table:: Version compatibility table for ForTrilinos.

=========== ============== ======================
ForTrilinos Trilinos SWIG
=========== ============== ======================
2.0.1 13.0:13.1 4.1.0+fortran
2.0.1 13.0:13.1 4.1.0-dev1+fortran
2.0.0 13.0:13.1 4.0.2+fortran
2.0.0-dev3 12.18.1 4.0.2+fortran
2.0.0-dev2 12.18.1 4.0.0+fortran+15e6ed59
Expand All @@ -40,30 +55,29 @@ In :ref:`the version table above <version_table>`, the ``+fortran`` suffix for
SWIG indicates `the SWIG-Fortran fork <https://github.com/swig-fortran/swig>`.
``+sha`` refers to a specific Git commit that comes after the given version.

The versioning scheme is based on `SemVer 2.0`_:

- Major version numbers with Trilinos and minor versions of SWIG-Fortran can
result in major version number changes for ForTrilinos.
- New features in Trilinos, and new support by ForTrilinos, can result in minor
version number changes.
- Minor changes to the SWIG-Fortran implementation (which don't affect the
interface in the .F90 files) result in a patch version.

Basically, the versioning will be driven by what the Fortran-only users see in the committed version of the generated wrappers.

The original implementation of the ForTrilinos was developed prior to 2012.
That code is no longer developed and maintained, and is available using the
``trilinos-release-12-8-1`` tag and the corresponding Trilinos 12.8.1 version.
``trilinos-release-12-8-1`` tag in the ForTrilinos repository and the
corresponding Trilinos 12.8.1 version.

E4S
---

As of this writing, ForTrilinos is distributed as part of the `E4S Project
<https://e4s-project.github.io/index.html>` and should be available as a
pre-built binary on a variety of user and HPC systems.

Spack
-----

To install ForTrilinos version ``2.0.0`` through an existing Spack
installation (v0.16 or higher, or the ``develop`` branch):
To install ForTrilinos version ``2.0.1`` through an existing Spack
installation (v0.18 or higher, or the ``develop`` branch):

.. code:: console
$ spack install fortrilinos@2.0.0 ^trilinos+nox+stratimikos
$ spack install fortrilinos
Manual
------
Expand Down
5 changes: 3 additions & 2 deletions scripts/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ spack:
- ninja
- openmpi
- swig@4.1.0-fortran
- trilinos +amesos2 +anasazi +belos +teuchos +kokkos +ifpack2 +muelu +nox +tpetra
- trilinos@13.0.0:13.1 +amesos2 +anasazi +belos +kokkos +ifpack2 +muelu +nox +tpetra
+stratimikos +mpi gotype=long_long
view: true
concretization: together
concretizer:
unify: true
packages:
trilinos:
variants: ~adios2 ~alloptpkgs ~boost ~cgns ~chaco ~complex ~debug ~dtk ~exodus
Expand Down
65 changes: 39 additions & 26 deletions src/forbelos/generated/forbelosFORTRAN_wrap.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,6 @@
#define SWIGFORTRAN
#endif


#ifdef __cplusplus
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
struct SwigMovePointer {
T *ptr;
SwigMovePointer(T *p) : ptr(p) { }
~SwigMovePointer() { delete ptr; }
SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
} pointer;
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
SwigValueWrapper() : pointer(0) { }
SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
operator T&() const { return *pointer.ptr; }
T *operator&() { return pointer.ptr; }
};

template <typename T> T SwigValueInit() {
return T();
}
#endif

/* -----------------------------------------------------------------------------
* This section contains generic SWIG labels for method/variable
* declarations/attributes, and other compiler dependent labels.
Expand Down Expand Up @@ -170,6 +146,44 @@ template <typename T> T SwigValueInit() {
#endif


#ifdef __cplusplus
#include <utility>
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
struct SwigSmartPointer {
T *ptr;
SwigSmartPointer(T *p) : ptr(p) { }
~SwigSmartPointer() { delete ptr; }
SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
} pointer;
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
SwigValueWrapper() : pointer(0) { }
SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; }
#if __cplusplus >=201103L
SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; }
operator T&&() const { return std::move(*pointer.ptr); }
#else
operator T&() const { return *pointer.ptr; }
#endif
T *operator&() const { return pointer.ptr; }
};

template <typename T> T SwigValueInit() {
return T();
}


#if __cplusplus >=201103L
# define SWIG_STD_MOVE(OBJ) std::move(OBJ)
#else
# define SWIG_STD_MOVE(OBJ) OBJ
#endif

#endif


#ifndef SWIGEXTERN
# ifdef __cplusplus
# define SWIGEXTERN extern
Expand Down Expand Up @@ -197,7 +211,7 @@ SWIGEXPORT void SWIG_store_exception(const char* decl, int errcode, const char *
#define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \
SWIG_store_exception(DECL, CODE, MSG); RETURNNULL;

/* Errors in SWIG */
/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
#define SWIG_UnknownError -1
#define SWIG_IOError -2
#define SWIG_RuntimeError -3
Expand All @@ -214,7 +228,6 @@ SWIGEXPORT void SWIG_store_exception(const char* decl, int errcode, const char *




enum SwigMemFlags {
SWIG_MEM_OWN = 0x01,
SWIG_MEM_RVALUE = 0x02,
Expand Down
67 changes: 40 additions & 27 deletions src/forerror/generated/forerrorFORTRAN_wrap.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,6 @@
#define SWIGFORTRAN
#endif


#ifdef __cplusplus
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
struct SwigMovePointer {
T *ptr;
SwigMovePointer(T *p) : ptr(p) { }
~SwigMovePointer() { delete ptr; }
SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
} pointer;
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
SwigValueWrapper() : pointer(0) { }
SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
operator T&() const { return *pointer.ptr; }
T *operator&() { return pointer.ptr; }
};

template <typename T> T SwigValueInit() {
return T();
}
#endif

/* -----------------------------------------------------------------------------
* This section contains generic SWIG labels for method/variable
* declarations/attributes, and other compiler dependent labels.
Expand Down Expand Up @@ -170,6 +146,44 @@ template <typename T> T SwigValueInit() {
#endif


#ifdef __cplusplus
#include <utility>
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
struct SwigSmartPointer {
T *ptr;
SwigSmartPointer(T *p) : ptr(p) { }
~SwigSmartPointer() { delete ptr; }
SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
} pointer;
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
SwigValueWrapper() : pointer(0) { }
SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; }
#if __cplusplus >=201103L
SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; }
operator T&&() const { return std::move(*pointer.ptr); }
#else
operator T&() const { return *pointer.ptr; }
#endif
T *operator&() const { return pointer.ptr; }
};

template <typename T> T SwigValueInit() {
return T();
}


#if __cplusplus >=201103L
# define SWIG_STD_MOVE(OBJ) std::move(OBJ)
#else
# define SWIG_STD_MOVE(OBJ) OBJ
#endif

#endif


#ifndef SWIGEXTERN
# ifdef __cplusplus
# define SWIGEXTERN extern
Expand All @@ -182,7 +196,7 @@ template <typename T> T SwigValueInit() {
#define SWIG_exception_impl(DECL, CODE, MSG, RETURNNULL) \
{ throw std::logic_error("In " DECL ": " MSG); }

/* Errors in SWIG */
/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
#define SWIG_UnknownError -1
#define SWIG_IOError -2
#define SWIG_RuntimeError -3
Expand All @@ -199,7 +213,6 @@ template <typename T> T SwigValueInit() {




#ifdef __cplusplus
extern "C" {
#endif
Expand Down Expand Up @@ -289,7 +302,7 @@ SWIGEXPORT const char* fortrilinos_get_serr() {

extern "C" {


#include <cctype>

// Call this function before any new action
SWIGEXPORT void SWIG_check_unhandled_exception_impl(const char* decl) {
Expand Down
Loading

0 comments on commit 60323bd

Please sign in to comment.