Skip to content

Commit

Permalink
Merge Pull Request #12682 from trilinos/Trilinos/master_merge_2024011…
Browse files Browse the repository at this point in the history
…9_175914

Automatically Merged using Trilinos Master Merge AutoTester
PR Title: b'Trilinos Master Merge PR Generator: Auto PR created to promote from master_merge_20240119_175914 branch to master'
PR Author: trilinos-autotester
  • Loading branch information
trilinos-autotester authored Jan 20, 2024
2 parents 9665b8e + 02c0a94 commit 233edda
Show file tree
Hide file tree
Showing 225 changed files with 40,166 additions and 41,838 deletions.
4 changes: 3 additions & 1 deletion .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# first run of clang-format over MueLu
1b1b032cf67a001d7c7595e3ccea653d5bcd1277
27387a814f72487f5a3fbb634cd5d1b298dfe4c5
27387a814f72487f5a3fbb634cd5d1b298dfe4c5
# clang-format for Tempus
586c87a8f1d21a837401aed54973689ac1177fba
21 changes: 11 additions & 10 deletions .github/workflows/clang_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,36 @@ jobs:
- uses: actions/checkout@v3
- uses: DoozyX/[email protected]
with:
source: './packages/muelu ./packages/tempus'
source: './packages/muelu ./packages/tempus ./packages/xpetra'
exclude: './packages/tempus/examples'
extensions: 'cpp,hpp'
clangFormatVersion: 14
inplace: true
- run: git diff HEAD > format_patch.txt
- run: if [ "$(cat format_patch.txt)" == "" ] ; then rm format_patch.txt ; fi
- run: if [ "$(cat format_patch.txt)" == "" ] ; then rm format_patch.txt ; else cat format_patch.txt; fi

- uses: actions/upload-artifact@v4
id: upload-artf
if: ${{ hashFiles('format_patch.txt') != '' }}
with:
name: MueLu format patch
name: clang format patch
path: format_patch.txt

- name: Artifact ID test
run: |
echo "Artifact ID is ${{ steps.upload-artf.outputs.artifact-id }}"
echo "Link: https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/artifacts/${{ steps.upload-artf.outputs.artifact-id }}"
echo "Link: ${{ steps.upload-artf.outputs.artifact-url }}"
# This does not work for PRs from forks.
- name: Post artifact in issue comment
uses: mshick/[email protected]
if: ${{ hashFiles('format_patch.txt') != '' }}
if: ${{ (hashFiles('format_patch.txt') != '') && (github.event.pull_request.head.repo.full_name == github.repository) }}
with:
message: |
Your PR updated files that did not respect package clang formatting settings. Please apply the patch found [here](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.upload-artf.outputs.artifact-id }})
Your PR updated files that did not respect package clang formatting settings. Please apply the patch found [here](${{ steps.upload-artf.outputs.artifact-url }})
- uses: actions/github-script@v3
if: ${{ hashFiles('format_patch.txt') != '' }}
with:
script: |
core.setFailed('Please download and apply the formatting patch! It is located at the bottom of the summary tab for this workflow.')
core.setFailed('Your PR updated files that did not respect package clang formatting settings. Please download and apply the formatting patch! It is located at the bottom of the summary tab for this workflow and at this link: ${{ steps.upload-artf.outputs.artifact-url }}')
3 changes: 2 additions & 1 deletion packages/amesos2/test/solvers/MUMPS_test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
<ParameterList name="run3">
<Parameter name="Scalar" type="string" value="float"/>
<Parameter name="LocalOrdinal" type="string" value="int"/>
<Parameter name="GlobalOrdinal" type="strig" value="int"/>
<Parameter name="GlobalOrdinal" type="string" value="int"/>
<!-- The Node parameter is not yet supported -->
</ParameterList>
</ParameterList>

</ParameterList> <!-- end MUMPS -->
Expand Down
4 changes: 4 additions & 0 deletions packages/ifpack2/src/Ifpack2_Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ void getValidParameters(Teuchos::ParameterList& params)
Teuchos::ParameterList dummyListSubdomain;
params.set("subdomain solver parameters",dummyListSubdomain);
params.sublist("subdomain solver parameters").disableRecursiveValidation();
Teuchos::ParameterList dummyListReordering;
params.set("schwarz: reordering list",dummyListReordering);
// Ifpack2 doesn't attempt to validate options for Zoltan2
params.sublist("schwarz: reordering list").disableRecursiveValidation();

// Ifpack2_BlockRelaxation.hpp
// params.set("relaxation: type", "Jacobi"); // already set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,7 @@ namespace Intrepid2 {
virtual
const char*
getName() const override {
if constexpr (serendipity)
return "Intrepid2_HGRAD_HEX_I2_FEM";
else
return "Intrepid2_HGRAD_HEX_C2_FEM";
return serendipity ? "Intrepid2_HGRAD_HEX_I2_FEM" : "Intrepid2_HGRAD_HEX_C2_FEM";
}

/** \brief returns the basis associated to a subCell.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,7 @@ namespace Intrepid2 {
virtual
const char*
getName() const override {
if constexpr (serendipity)
return "Intrepid2_HGRAD_QUAD_I2_FEM";
else
return "Intrepid2_HGRAD_QUAD_C2_FEM";
return serendipity ? "Intrepid2_HGRAD_QUAD_I2_FEM" : "Intrepid2_HGRAD_QUAD_C2_FEM";
}

/** \brief returns the basis associated to a subCell.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,7 @@ namespace Intrepid2 {
virtual
const char*
getName() const override {
if constexpr (serendipity)
return "Intrepid2_HGRAD_WEDGE_I2_FEM";
else
return "Intrepid2_HGRAD_WEDGE_C2_FEM";
return serendipity ? "Intrepid2_HGRAD_WEDGE_I2_FEM" : "Intrepid2_HGRAD_WEDGE_C2_FEM";
}

/** \brief returns the basis associated to a subCell.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,7 @@ class LagrangianTools {
);
};

// temporary fix to allow applications keep using the Experimental namespace. It will be removed soon.
namespace Experimental {
template<typename DeviceType>
class LagrangianInterpolation: public Intrepid2::LagrangianInterpolation<DeviceType>{};
}

}
} // Intrepid2 namespace

// include templated function definitions
#include "Intrepid2_LagrangianInterpolationDef.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -526,12 +526,6 @@ class ProjectionStruct {
ordinal_type maxNumTargetDerivEvalPoints;
};

//Temporary fix, to allow application keep using the Experimental namespace. It will be removed soon.
namespace Experimental {
template<typename DeviceType, typename ValueType>
class ProjectionStruct: public Intrepid2::ProjectionStruct<DeviceType, ValueType>{};
}

} // Intrepid2 namespace
#include "Intrepid2_ProjectionStructDef.hpp"
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -802,12 +802,6 @@ class ProjectionTools {

};

//Temporary fix to allow application keep using the Experimental namespace. It will be removed soon.
namespace Experimental {
template<typename DeviceType>
class ProjectionTools: public Intrepid2::ProjectionTools<DeviceType>{};
}

} //Intrepid2


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -943,10 +943,6 @@ namespace Intrepid2 {
using FT23FF = FunctorArrayTools::F_matvecProduct<Output,Left,Right,2,3, false, false>;
using FT22FF = FunctorArrayTools::F_matvecProduct<Output,Left,Right,2,2, false, false>;

typedef Kokkos::DynRankView<outputValueType, outputProperties...> OutputViewType;
typedef const Kokkos::DynRankView<leftInputValueType, leftInputProperties...> leftInputViewType;
typedef const Kokkos::DynRankView<rightInputValueType,rightInputProperties...> rightInputViewType;

const ordinal_type l = leftInput.rank();
const ordinal_type r = rightInput.rank();

Expand Down
4 changes: 2 additions & 2 deletions packages/kokkos-kernels/lapack/tpls/KokkosLapack_magma.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ struct MagmaSingleton {
};

} // namespace Impl
} // namespace KokkosBlas
} // namespace KokkosLapack
#endif // KOKKOSKERNELS_ENABLE_TPL_MAGMA
#endif // KOKKOSLAPACK_MAGMA_HPP_
#endif // KOKKOSLAPACK_MAGMA_HPP_
9 changes: 8 additions & 1 deletion packages/kokkos/Makefile.kokkos
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ KOKKOS_DEVICES ?= "Threads"
# NVIDIA: Kepler,Kepler30,Kepler32,Kepler35,Kepler37,Maxwell,Maxwell50,Maxwell52,Maxwell53,Pascal60,Pascal61,Volta70,Volta72,Turing75,Ampere80,Ampere86,Ada89,Hopper90
# ARM: ARMv80,ARMv81,ARMv8-ThunderX,ARMv8-TX2,A64FX
# IBM: BGQ,Power7,Power8,Power9
# AMD-GPUS: GFX906,GFX908,GFX90A,GFX942,GFX1030,GFX1100
# AMD-GPUS: GFX906,GFX908,GFX90A,GFX940,GFX942,GFX1030,GFX1100
# AMD-CPUS: AMDAVX,Zen,Zen2,Zen3
# Intel-GPUs: Gen9,Gen11,Gen12LP,DG1,XeHP,PVC
KOKKOS_ARCH ?= ""
Expand Down Expand Up @@ -406,6 +406,8 @@ endif
KOKKOS_INTERNAL_USE_ARCH_AMD_GFX906 := $(or $(call kokkos_has_string,$(KOKKOS_ARCH),VEGA906),$(call kokkos_has_string,$(KOKKOS_ARCH),AMD_GFX906))
KOKKOS_INTERNAL_USE_ARCH_AMD_GFX908 := $(or $(call kokkos_has_string,$(KOKKOS_ARCH),VEGA908),$(call kokkos_has_string,$(KOKKOS_ARCH),AMD_GFX908))
KOKKOS_INTERNAL_USE_ARCH_AMD_GFX90A := $(or $(call kokkos_has_string,$(KOKKOS_ARCH),VEGA90A),$(call kokkos_has_string,$(KOKKOS_ARCH),AMD_GFX90A))
KOKKOS_INTERNAL_USE_ARCH_AMD_GFX940 := $(call kokkos_has_string,$(KOKKOS_ARCH),AMD_GFX940)
KOKKOS_INTERNAL_USE_ARCH_AMD_GFX942 := $(call kokkos_has_string,$(KOKKOS_ARCH),AMD_GFX942)
KOKKOS_INTERNAL_USE_ARCH_AMD_GFX1030 := $(or $(call kokkos_has_string,$(KOKKOS_ARCH),NAVI1030),$(call kokkos_has_string,$(KOKKOS_ARCH),AMD_GFX1030))
KOKKOS_INTERNAL_USE_ARCH_AMD_GFX1100 := $(or $(call kokkos_has_string,$(KOKKOS_ARCH),NAVI1100),$(call kokkos_has_string,$(KOKKOS_ARCH),AMD_GFX1100))

Expand Down Expand Up @@ -1103,6 +1105,11 @@ ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AMD_GFX90A), 1)
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_AMD_GPU")
KOKKOS_INTERNAL_HIP_ARCH_FLAG := --offload-arch=gfx90a
endif
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AMD_GFX940), 1)
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_AMD_GFX940")
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_AMD_GPU")
KOKKOS_INTERNAL_HIP_ARCH_FLAG := --offload-arch=gfx940
endif
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AMD_GFX942), 1)
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_AMD_GFX942")
tmp := $(call kokkos_append_header,"$H""define KOKKOS_ARCH_AMD_GPU")
Expand Down
1 change: 1 addition & 0 deletions packages/kokkos/cmake/KokkosCore_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
#cmakedefine KOKKOS_ARCH_AMD_GFX906
#cmakedefine KOKKOS_ARCH_AMD_GFX908
#cmakedefine KOKKOS_ARCH_AMD_GFX90A
#cmakedefine KOKKOS_ARCH_AMD_GFX940
#cmakedefine KOKKOS_ARCH_AMD_GFX942
#cmakedefine KOKKOS_ARCH_AMD_GFX1030
#cmakedefine KOKKOS_ARCH_AMD_GFX1100
Expand Down
6 changes: 3 additions & 3 deletions packages/kokkos/cmake/kokkos_arch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ IF(Kokkos_ENABLE_HIP OR Kokkos_ENABLE_OPENMPTARGET OR Kokkos_ENABLE_OPENACC OR K
ENDIF()

# AMD archs ordered in decreasing priority of autodetection
LIST(APPEND SUPPORTED_AMD_GPUS MI300)
LIST(APPEND SUPPORTED_AMD_ARCHS AMD_GFX942)
LIST(APPEND CORRESPONDING_AMD_FLAGS gfx942)
LIST(APPEND SUPPORTED_AMD_GPUS MI300 MI300)
LIST(APPEND SUPPORTED_AMD_ARCHS AMD_GFX942 AMD_GFX940)
LIST(APPEND CORRESPONDING_AMD_FLAGS gfx942 gfx940)
LIST(APPEND SUPPORTED_AMD_GPUS MI200 MI200 MI100 MI100)
LIST(APPEND SUPPORTED_AMD_ARCHS VEGA90A AMD_GFX90A VEGA908 AMD_GFX908)
LIST(APPEND CORRESPONDING_AMD_FLAGS gfx90a gfx90a gfx908 gfx908)
Expand Down
3 changes: 2 additions & 1 deletion packages/kokkos/core/src/HIP/Kokkos_HIP_Instance.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ namespace Impl {

struct HIPTraits {
#if defined(KOKKOS_ARCH_AMD_GFX906) || defined(KOKKOS_ARCH_AMD_GFX908) || \
defined(KOKKOS_ARCH_AMD_GFX90A) || defined(KOKKOS_ARCH_AMD_GFX942)
defined(KOKKOS_ARCH_AMD_GFX90A) || defined(KOKKOS_ARCH_AMD_GFX940) || \
defined(KOKKOS_ARCH_AMD_GFX942)
static constexpr int WarpSize = 64;
static constexpr int WarpIndexMask = 0x003f; /* hexadecimal for 63 */
static constexpr int WarpIndexShift = 6; /* WarpSize == 1 << WarpShift*/
Expand Down
1 change: 1 addition & 0 deletions packages/kokkos/generate_makefile.bash
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ display_help_text() {
echo " AMD_GFX906 = AMD GPU MI50/MI60 GFX906"
echo " AMD_GFX908 = AMD GPU MI100 GFX908"
echo " AMD_GFX90A = AMD GPU MI200 GFX90A"
echo " AMD_GFX940 = AMD GPU MI300 GFX940"
echo " AMD_GFX942 = AMD GPU MI300 GFX942"
echo " AMD_GFX1030 = AMD GPU V620/W6800 GFX1030"
echo " AMD_GFX1100 = AMD GPU RX 7900 XT(X) GFX1100"
Expand Down
1 change: 0 additions & 1 deletion packages/rol/example/PDE-OPT/thermal-fluids/input_ex04.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
</ParameterList>
</ParameterList>
</ParameterList>
</ParameterList>


<!-- =========== SIMOPT SOLVER PARAMETER SUBLIST =========== -->
Expand Down
13 changes: 13 additions & 0 deletions packages/xpetra/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#Official Tool: clang-format version 14.0.0
#Kokkos options
BasedOnStyle: google
SortIncludes: false
AlignConsecutiveAssignments: true
AllowShortCaseLabelsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: true
#MueLu-specific options
ColumnLimit: 0
BreakConstructorInitializersBeforeComma: true
BreakConstructorInitializers: BeforeComma
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 2
2 changes: 1 addition & 1 deletion packages/xpetra/doc/Xpetra_DoxygenDocumentation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ Answer your question here.
/* ************************************************************************ */
/* ************************************************************************ */

#endif //ifndef XPETRA_DOXYGEN_DOCUMENTATION_HPP
#endif // ifndef XPETRA_DOXYGEN_DOCUMENTATION_HPP
37 changes: 19 additions & 18 deletions packages/xpetra/example/MueLu_MatrixDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
#include <Teuchos_FancyOStream.hpp>

// Gallery
#define XPETRA_ENABLED // == Gallery have to be build with the support of Xpetra matrices.
#define XPETRA_ENABLED // == Gallery have to be build with the support of Xpetra matrices.
#include <MueLu_GalleryParameters.hpp>
#include <MueLu_MatrixFactory.hpp>

Expand All @@ -78,12 +78,11 @@
Use the "--help" option to get verbose help.
*/

int main(int argc, char* argv[])
{
int main(int argc, char* argv[]) {
using Teuchos::RCP;

Teuchos::oblackholestream blackhole;
Teuchos::GlobalMPISession mpiSession(&argc,&argv,&blackhole);
Teuchos::GlobalMPISession mpiSession(&argc, &argv, &blackhole);
RCP<const Teuchos::Comm<int> > comm = Teuchos::DefaultComm<int>::getComm();

/**********************************************************************************/
Expand All @@ -92,13 +91,13 @@ int main(int argc, char* argv[])
// Note: use --help to list available options.
Teuchos::CommandLineProcessor clp(false);

MueLu::Gallery::Parameters<GO> matrixParameters(clp); // manage parameters of the test case
Xpetra::Parameters xpetraParameters(clp); // manage parameters of xpetra
MueLu::Gallery::Parameters<GO> matrixParameters(clp); // manage parameters of the test case
Xpetra::Parameters xpetraParameters(clp); // manage parameters of xpetra

switch (clp.parse(argc,argv)) {
case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; break;
case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; break;
case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break;
switch (clp.parse(argc, argv)) {
case Teuchos::CommandLineProcessor::PARSE_HELP_PRINTED: return EXIT_SUCCESS; break;
case Teuchos::CommandLineProcessor::PARSE_UNRECOGNIZED_OPTION: return EXIT_FAILURE; break;
case Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL: break;
}

matrixParameters.check();
Expand All @@ -108,14 +107,14 @@ int main(int argc, char* argv[])
std::cout << xpetraParameters << matrixParameters;
}

// std::cout << "#threads = " << numThreads << std::endl;
// std::cout << "problem size = " << nx*ny << std::endl;
// std::cout << "matrix type = " << matrixType << std::endl;
// std::cout << "#threads = " << numThreads << std::endl;
// std::cout << "problem size = " << nx*ny << std::endl;
// std::cout << "matrix type = " << matrixType << std::endl;

// Teuchos::ParameterList pl;
// pl.set("Num Threads",numThreads);
// Teuchos::ParameterList pl;
// pl.set("Num Threads",numThreads);

//typedef Xpetra::MapFactory<LocalOrdinal, GlobalOrdinal, Node> MapFactory;
// typedef Xpetra::MapFactory<LocalOrdinal, GlobalOrdinal, Node> MapFactory;

const RCP<const Map> map = MapFactory::Build(xpetraParameters.GetLib(), matrixParameters.GetNumGlobalElements(), 0, comm);

Expand All @@ -124,13 +123,15 @@ int main(int argc, char* argv[])

RCP<Teuchos::FancyOStream> out = Teuchos::fancyOStream(Teuchos::rcpFromRef(std::cout));
if (comm->getRank() == 0)
std::cout << "\n================ MAP =====================================================\n" << std::endl;
std::cout << "\n================ MAP =====================================================\n"
<< std::endl;
map->describe(*out, Teuchos::VERB_EXTREME);
comm->barrier();
// sleep(1);

if (comm->getRank() == 0)
std::cout << "\n================ MATRIX ==================================================\n" << std::endl;
std::cout << "\n================ MATRIX ==================================================\n"
<< std::endl;
A->describe(*out, Teuchos::VERB_EXTREME);
}

Expand Down
Loading

0 comments on commit 233edda

Please sign in to comment.