Skip to content

Commit 74ec43a

Browse files
authored
Merge pull request #281 from sethrj/trilinos-13
Update wrappers for Trilinos v13.0
2 parents 3f5ff6d + a98189c commit 74ec43a

File tree

9 files changed

+179
-154
lines changed

9 files changed

+179
-154
lines changed

CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ set(CMAKE_CXX_EXTENSIONS OFF)
9292
# Derive options from Trilinos configuration where possible.
9393
#-----------------------------------------------------------------------------#
9494

95-
find_package(Trilinos 12.17 REQUIRED MODULE
95+
set(Kokkos_FIND_QUIETLY ON)
96+
find_package(Trilinos 13.0 REQUIRED MODULE
9697
COMPONENTS
9798
TeuchosCore TeuchosComm TeuchosNumerics TeuchosParameterList
9899
OPTIONAL_COMPONENTS
@@ -146,7 +147,7 @@ else()
146147
endif()
147148

148149
if(ForTrilinos_USE_SWIG_Fortran)
149-
find_package(SWIG REQUIRED COMPONENTS fortran)
150+
find_package(SWIG 4.0.2 REQUIRED COMPONENTS fortran)
150151
include(UseSWIG)
151152

152153
if(NOT ForTrilinos_USE_MPI)

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ ForTrilinos
99

1010
This is the new effort to provide Fortran interfaces to Trilinos through
1111
automatic code generation using SWIG. The previous effort (ca. 2008-2012) can
12-
be obtained by downloading Trilinos releases prior to 12.12.
12+
be obtained by downloading Trilinos releases prior to 12.12. See [the
13+
documentation](https://fortrilinos.readthedocs.io/en/latest/install.html#version-compatibility) for details on version compatibility.
1314

1415
Provided functionality
1516
----------------------
@@ -22,9 +23,9 @@ ForTrilinos provides Fortran interfaces for the following capabilities:
2223
Documentation
2324
-------------
2425

25-
* [Website](https://trilinos.github.io/ForTrilinos/)
26+
* [Documentation](https://fortrilinos.readthedocs.org)
2627

27-
* [Documentation](http://fortrilinos.readthedocs.org)
28+
* [Summary](https://trilinos.github.io/ForTrilinos/)
2829

2930
Installing ForTrilinos
3031
----------------------

doc/install.rst

+34
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,40 @@ its only dependency. ForTrilinos can be installed through `the Spack HPC
99
package manager <https://spack.readthedocs.io/en/latest/>`_ or
1010
independently from your local installation of Trilinos.
1111

12+
.. _version:
13+
14+
Version compatibility
15+
---------------------
16+
17+
ForTrilinos wrappers are tightly coupled to the Trilinos API, so upstream
18+
changes require new releases of ForTrilinos. Since the wrapper generation is
19+
dependent on SWIG-Fortran capabilities, changes there will also affect the
20+
ability to rebuild ForTrilinos wrappers. (Note that SWIG is always optional;
21+
the version here simply denotes the version used to generate the included
22+
wrappers.)
23+
24+
.. _version_table:
25+
26+
.. table:: Version compatibility table for ForTrilinos.
27+
28+
=========== ============== ======================
29+
ForTrilinos Trilinos SWIG
30+
=========== ============== ======================
31+
2.0.0 13.0 4.0.2+fortran
32+
2.0.0-dev3 12.18.1 4.0.2+fortran
33+
2.0.0-dev2 12.18.1 4.0.0+fortran+15e6ed59
34+
2.0.0-dev1 12.17+8a82b322 4.0.0+fortran+15e6ed59
35+
1.0 12.8.1 ---
36+
=========== ============== ======================
37+
38+
In :ref:`the version table above <version_table>`, the ``+fortran`` suffix for
39+
SWIG indicates `the SWIG-Fortran fork <https://github.com/swig-fortran/swig>`.
40+
``+sha`` refers to a specific Git commit that comes after the given version.
41+
42+
The original implementation of the ForTrilinos was developed prior to 2012.
43+
That code is no longer developed and maintained, and is available using the
44+
``trilinos-release-12-8-1`` tag and the corresponding Trilinos 12.8.1 version.
45+
1246
Spack
1347
-----
1448

doc/overview.rst

+2-7
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@ Overview
66

77
`ForTrilinos <https://github.com/trilinos/ForTrilinos>`_ is an
88
open-source software library providing object-oriented Fortran interfaces to
9-
`Trilinos <https://trilinos.org>`_ C++
10-
packages.
11-
12-
The original implementation of the ForTrilinos was developed prior to 2012.
13-
That code is no longer developed and maintained, and is available using the
14-
``trilinos-release-12-8-1`` tag and the corresponding Trilinos 12.8.1 version.
9+
`Trilinos <https://trilinos.org>`_ C++ packages.
1510

1611
The new implementation using SWIG code generation started in late 2016 and is
1712
currently under active development. As of version 2.0.0, the documented
1813
ForTrilinos module interfaces are stable and available for downstream
19-
consumption.
14+
consumption. See :ref:`version` for details on Trilinos version compatibility.
2015

2116
ForTrilinos Development Team
2217
----------------------------

docker/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ RUN OPENMPI_VERSION=4.0.3 && \
6565
rm -rf ${SCRATCH_DIR}
6666
ENV PATH=${OPENMPI_DIR}/bin:$PATH
6767

68-
# Install Trilinos (12.18.1)
68+
# Install Trilinos (13.0.0)
6969
ENV TRILINOS_DIR=/opt/trilinos
70-
RUN export TRILINOS_HASH=55a75997332636a28afc9db1aee4ae46fe8d93e7 && \
70+
RUN export TRILINOS_HASH=9fec35276d846a667bc668ff4cbdfd8be0dfea08 && \
7171
export TRILINOS_URL=https://github.com/trilinos/Trilinos/archive/${TRILINOS_HASH}.tar.gz && \
7272
export TRILINOS_ARCHIVE=trilinos-${TRILINOS_HASH}.tar.gz && \
7373
SCRATCH_DIR=/scratch && mkdir -p ${SCRATCH_DIR} && cd ${SCRATCH_DIR} && \

docker/trilinos_version

-1
This file was deleted.

src/fortpetra/generated/fortpetra.F90

+28-31
Original file line numberDiff line numberDiff line change
@@ -400,10 +400,10 @@ module fortpetra
400400
procedure :: release => swigf_TpetraCrsMatrix_release
401401
procedure :: insertGlobalValues => swigf_TpetraCrsMatrix_insertGlobalValues
402402
procedure :: insertLocalValues => swigf_TpetraCrsMatrix_insertLocalValues
403-
procedure :: replaceGlobalValues => swigf_TpetraCrsMatrix_replaceGlobalValues
403+
procedure, private :: swigf_TpetraCrsMatrix_replaceGlobalValues__SWIG_1
404404
procedure, private :: swigf_TpetraCrsMatrix_replaceLocalValues__SWIG_1
405405
procedure, private :: swigf_TpetraCrsMatrix_sumIntoGlobalValues__SWIG_0
406-
procedure, private :: swigf_TpetraCrsMatrix_sumIntoLocalValues__SWIG_0
406+
procedure, private :: swigf_TpetraCrsMatrix_sumIntoLocalValues__SWIG_2
407407
procedure :: setAllToScalar => swigf_TpetraCrsMatrix_setAllToScalar
408408
procedure :: scale => swigf_TpetraCrsMatrix_scale
409409
procedure, private :: swigf_TpetraCrsMatrix_setAllValues__SWIG_1
@@ -480,9 +480,10 @@ module fortpetra
480480
generic :: resumeFill => swigf_TpetraCrsMatrix_resumeFill__SWIG_0, swigf_TpetraCrsMatrix_resumeFill__SWIG_1
481481
generic :: localApply => swigf_TpetraCrsMatrix_localApply__SWIG_0, swigf_TpetraCrsMatrix_localApply__SWIG_1, &
482482
swigf_TpetraCrsMatrix_localApply__SWIG_2, swigf_TpetraCrsMatrix_localApply__SWIG_3
483+
generic :: replaceGlobalValues => swigf_TpetraCrsMatrix_replaceGlobalValues__SWIG_1
483484
generic :: replaceLocalValues => swigf_TpetraCrsMatrix_replaceLocalValues__SWIG_1
484485
generic :: sumIntoGlobalValues => swigf_TpetraCrsMatrix_sumIntoGlobalValues__SWIG_0
485-
generic :: sumIntoLocalValues => swigf_TpetraCrsMatrix_sumIntoLocalValues__SWIG_0
486+
generic :: sumIntoLocalValues => swigf_TpetraCrsMatrix_sumIntoLocalValues__SWIG_2
486487
generic :: setAllValues => swigf_TpetraCrsMatrix_setAllValues__SWIG_1
487488
generic :: fillComplete => swigf_TpetraCrsMatrix_fillComplete__SWIG_0, swigf_TpetraCrsMatrix_fillComplete__SWIG_1, &
488489
swigf_TpetraCrsMatrix_fillComplete__SWIG_2, swigf_TpetraCrsMatrix_fillComplete__SWIG_3
@@ -550,7 +551,7 @@ module fortpetra
550551
end interface
551552
interface TpetraMap
552553
module procedure swigf_new_TpetraMap__SWIG_0, swigf_new_TpetraMap__SWIG_1, swigf_new_TpetraMap__SWIG_2, &
553-
swigf_new_TpetraMap__SWIG_4, swigf_new_TpetraMap__SWIG_5, swigf_new_TpetraMap__SWIG_6
554+
swigf_new_TpetraMap__SWIG_5, swigf_new_TpetraMap__SWIG_6, swigf_new_TpetraMap__SWIG_7
554555
end interface
555556
interface TpetraMultiVector
556557
module procedure swigf_new_TpetraMultiVector__SWIG_0, swigf_new_TpetraMultiVector__SWIG_1, &
@@ -646,8 +647,8 @@ function swigc_new_TpetraMap__SWIG_2(farg1, farg2, farg4) &
646647
type(SwigClassWrapper) :: fresult
647648
end function
648649

649-
function swigc_new_TpetraMap__SWIG_4(farg1, farg2, farg4) &
650-
bind(C, name="_wrap_new_TpetraMap__SWIG_4") &
650+
function swigc_new_TpetraMap__SWIG_5(farg1, farg2, farg4) &
651+
bind(C, name="_wrap_new_TpetraMap__SWIG_5") &
651652
result(fresult)
652653
use, intrinsic :: ISO_C_BINDING
653654
import :: swigclasswrapper
@@ -658,16 +659,16 @@ function swigc_new_TpetraMap__SWIG_4(farg1, farg2, farg4) &
658659
type(SwigClassWrapper) :: fresult
659660
end function
660661

661-
function swigc_new_TpetraMap__SWIG_5() &
662-
bind(C, name="_wrap_new_TpetraMap__SWIG_5") &
662+
function swigc_new_TpetraMap__SWIG_6() &
663+
bind(C, name="_wrap_new_TpetraMap__SWIG_6") &
663664
result(fresult)
664665
use, intrinsic :: ISO_C_BINDING
665666
import :: swigclasswrapper
666667
type(SwigClassWrapper) :: fresult
667668
end function
668669

669-
function swigc_new_TpetraMap__SWIG_6(farg1) &
670-
bind(C, name="_wrap_new_TpetraMap__SWIG_6") &
670+
function swigc_new_TpetraMap__SWIG_7(farg1) &
671+
bind(C, name="_wrap_new_TpetraMap__SWIG_7") &
671672
result(fresult)
672673
use, intrinsic :: ISO_C_BINDING
673674
import :: swigclasswrapper
@@ -2734,12 +2735,11 @@ function swigc_TpetraCrsGraph_haveGlobalConstants(farg1) &
27342735
integer(C_INT) :: fresult
27352736
end function
27362737

2737-
subroutine swigc_TpetraCrsGraph_computeGlobalConstants(farg1, farg2) &
2738+
subroutine swigc_TpetraCrsGraph_computeGlobalConstants(farg1) &
27382739
bind(C, name="_wrap_TpetraCrsGraph_computeGlobalConstants")
27392740
use, intrinsic :: ISO_C_BINDING
27402741
import :: swigclasswrapper
27412742
type(SwigClassWrapper), intent(in) :: farg1
2742-
integer(C_INT), intent(in) :: farg2
27432743
end subroutine
27442744

27452745
subroutine swigc_TpetraCrsGraph_getNodeRowPtrs(farg1, farg2) &
@@ -3048,8 +3048,8 @@ subroutine swigc_TpetraCrsMatrix_insertLocalValues(farg1, farg2, farg3, farg4) &
30483048
type(SwigArrayWrapper) :: farg4
30493049
end subroutine
30503050

3051-
function swigc_TpetraCrsMatrix_replaceGlobalValues(farg1, farg2, farg3, farg4) &
3052-
bind(C, name="_wrap_TpetraCrsMatrix_replaceGlobalValues") &
3051+
function swigc_TpetraCrsMatrix_replaceGlobalValues__SWIG_1(farg1, farg2, farg3, farg4) &
3052+
bind(C, name="_wrap_TpetraCrsMatrix_replaceGlobalValues__SWIG_1") &
30533053
result(fresult)
30543054
use, intrinsic :: ISO_C_BINDING
30553055
import :: swigclasswrapper
@@ -3087,8 +3087,8 @@ function swigc_TpetraCrsMatrix_sumIntoGlobalValues__SWIG_0(farg1, farg2, farg3,
30873087
integer(C_INT) :: fresult
30883088
end function
30893089

3090-
function swigc_TpetraCrsMatrix_sumIntoLocalValues__SWIG_0(farg1, farg2, farg3, farg4) &
3091-
bind(C, name="_wrap_TpetraCrsMatrix_sumIntoLocalValues__SWIG_0") &
3090+
function swigc_TpetraCrsMatrix_sumIntoLocalValues__SWIG_2(farg1, farg2, farg3, farg4) &
3091+
bind(C, name="_wrap_TpetraCrsMatrix_sumIntoLocalValues__SWIG_2") &
30923092
result(fresult)
30933093
use, intrinsic :: ISO_C_BINDING
30943094
import :: swigclasswrapper
@@ -4248,7 +4248,7 @@ subroutine SWIGTM_fin_long_SS_long_Sb__SB_(finp, iminp)
42484248
end if
42494249
iminp%size = sz
42504250
end subroutine
4251-
function swigf_new_TpetraMap__SWIG_4(numglobalelements, indexlist, comm) &
4251+
function swigf_new_TpetraMap__SWIG_5(numglobalelements, indexlist, comm) &
42524252
result(self)
42534253
use, intrinsic :: ISO_C_BINDING
42544254
type(TpetraMap) :: self
@@ -4263,21 +4263,21 @@ function swigf_new_TpetraMap__SWIG_4(numglobalelements, indexlist, comm) &
42634263
farg1 = numglobalelements
42644264
call SWIGTM_fin_long_SS_long_Sb__SB_(indexlist, farg2)
42654265
farg4 = comm%swigdata
4266-
fresult = swigc_new_TpetraMap__SWIG_4(farg1, farg2, farg4)
4266+
fresult = swigc_new_TpetraMap__SWIG_5(farg1, farg2, farg4)
42674267
self%swigdata = fresult
42684268
end function
42694269

4270-
function swigf_new_TpetraMap__SWIG_5() &
4270+
function swigf_new_TpetraMap__SWIG_6() &
42714271
result(self)
42724272
use, intrinsic :: ISO_C_BINDING
42734273
type(TpetraMap) :: self
42744274
type(SwigClassWrapper) :: fresult
42754275

4276-
fresult = swigc_new_TpetraMap__SWIG_5()
4276+
fresult = swigc_new_TpetraMap__SWIG_6()
42774277
self%swigdata = fresult
42784278
end function
42794279

4280-
function swigf_new_TpetraMap__SWIG_6(arg0) &
4280+
function swigf_new_TpetraMap__SWIG_7(arg0) &
42814281
result(self)
42824282
use, intrinsic :: ISO_C_BINDING
42834283
type(TpetraMap) :: self
@@ -4286,7 +4286,7 @@ function swigf_new_TpetraMap__SWIG_6(arg0) &
42864286
type(SwigClassWrapper) :: farg1
42874287

42884288
farg1 = arg0%swigdata
4289-
fresult = swigc_new_TpetraMap__SWIG_6(farg1)
4289+
fresult = swigc_new_TpetraMap__SWIG_7(farg1)
42904290
self%swigdata = fresult
42914291
end function
42924292

@@ -7758,16 +7758,13 @@ function swigf_TpetraCrsGraph_haveGlobalConstants(self) &
77587758
call SWIGTM_fout_bool(fresult, swig_result)
77597759
end function
77607760

7761-
subroutine swigf_TpetraCrsGraph_computeGlobalConstants(self, computelocaltriangularconstants)
7761+
subroutine swigf_TpetraCrsGraph_computeGlobalConstants(self)
77627762
use, intrinsic :: ISO_C_BINDING
77637763
class(TpetraCrsGraph), intent(in) :: self
7764-
logical, intent(in) :: computelocaltriangularconstants
77657764
type(SwigClassWrapper) :: farg1
7766-
integer(C_INT) :: farg2
77677765

77687766
farg1 = self%swigdata
7769-
call SWIGTM_fin_bool(computelocaltriangularconstants, farg2)
7770-
call swigc_TpetraCrsGraph_computeGlobalConstants(farg1, farg2)
7767+
call swigc_TpetraCrsGraph_computeGlobalConstants(farg1)
77717768
end subroutine
77727769

77737770
subroutine swigf_TpetraCrsGraph_getNodeRowPtrs(self, rowpointers)
@@ -8286,7 +8283,7 @@ subroutine swigf_TpetraCrsMatrix_insertLocalValues(self, localrow, cols, vals)
82868283
call swigc_TpetraCrsMatrix_insertLocalValues(farg1, farg2, farg3, farg4)
82878284
end subroutine
82888285

8289-
function swigf_TpetraCrsMatrix_replaceGlobalValues(self, globalrow, cols, vals) &
8286+
function swigf_TpetraCrsMatrix_replaceGlobalValues__SWIG_1(self, globalrow, cols, vals) &
82908287
result(swig_result)
82918288
use, intrinsic :: ISO_C_BINDING
82928289
integer :: swig_result
@@ -8304,7 +8301,7 @@ function swigf_TpetraCrsMatrix_replaceGlobalValues(self, globalrow, cols, vals)
83048301
farg2 = globalrow
83058302
call SWIGTM_fin_long_SS_long_Sb__SB_(cols, farg3)
83068303
call SWIGTM_fin_double_Sb__SB_(vals, farg4)
8307-
fresult = swigc_TpetraCrsMatrix_replaceGlobalValues(farg1, farg2, farg3, farg4)
8304+
fresult = swigc_TpetraCrsMatrix_replaceGlobalValues__SWIG_1(farg1, farg2, farg3, farg4)
83088305
swig_result = int(fresult)
83098306
end function
83108307

@@ -8352,7 +8349,7 @@ function swigf_TpetraCrsMatrix_sumIntoGlobalValues__SWIG_0(self, globalrow, cols
83528349
swig_result = int(fresult)
83538350
end function
83548351

8355-
function swigf_TpetraCrsMatrix_sumIntoLocalValues__SWIG_0(self, localrow, cols, vals) &
8352+
function swigf_TpetraCrsMatrix_sumIntoLocalValues__SWIG_2(self, localrow, cols, vals) &
83568353
result(swig_result)
83578354
use, intrinsic :: ISO_C_BINDING
83588355
integer :: swig_result
@@ -8370,7 +8367,7 @@ function swigf_TpetraCrsMatrix_sumIntoLocalValues__SWIG_0(self, localrow, cols,
83708367
farg2 = int(localrow, C_INT)
83718368
call SWIGTM_fin_int_Sb__SB_(cols, farg3)
83728369
call SWIGTM_fin_double_Sb__SB_(vals, farg4)
8373-
fresult = swigc_TpetraCrsMatrix_sumIntoLocalValues__SWIG_0(farg1, farg2, farg3, farg4)
8370+
fresult = swigc_TpetraCrsMatrix_sumIntoLocalValues__SWIG_2(farg1, farg2, farg3, farg4)
83748371
swig_result = int(fresult)
83758372
end function
83768373

0 commit comments

Comments
 (0)