-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update trilinos container tags #32
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -49,7 +49,7 @@ | |
#ifndef PRESSIOOPS_TYPE_TRAITS_NATIVE_EPETRA_VECTOR_HPP_ | ||
#define PRESSIOOPS_TYPE_TRAITS_NATIVE_EPETRA_VECTOR_HPP_ | ||
|
||
#ifdef PRESSIO_ENABLE_TPL_EPETRA | ||
#ifdef PRESSIO_ENABLE_EPETRA | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the actual fix for the CI failures |
||
#include "Epetra_Vector.h" | ||
#include "Epetra_MultiVector.h" | ||
#endif | ||
|
@@ -59,7 +59,7 @@ namespace pressio{ | |
template <typename T, typename enable = void> | ||
struct is_vector_epetra : std::false_type {}; | ||
|
||
#ifdef PRESSIO_ENABLE_TPL_EPETRA | ||
#ifdef PRESSIO_ENABLE_EPETRA | ||
template <typename T> | ||
struct is_vector_epetra<T, | ||
typename | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
|
||
#ifndef CONTAINERS_FIXTURES_EPETRA_ONLY_FIXTURES_HPP_ | ||
#define CONTAINERS_FIXTURES_EPETRA_ONLY_FIXTURES_HPP_ | ||
|
||
#include <gtest/gtest.h> | ||
#include "Epetra_MpiComm.h" | ||
#include "Epetra_Vector.h" | ||
#include "Epetra_MultiVector.h" | ||
#include "Epetra_Import.h" | ||
|
||
struct epetraVectorGlobSize15Fixture | ||
: public ::testing::Test{ | ||
|
||
public: | ||
std::shared_ptr<Epetra_MpiComm> comm_; | ||
int rank_; | ||
int numProc_; | ||
const int localSize_ = 5; | ||
int numGlobalEntries_; | ||
std::shared_ptr<Epetra_Map> contigMap_; | ||
std::shared_ptr<Epetra_Vector> myVector_; | ||
|
||
virtual void SetUp(){ | ||
MPI_Comm_rank(MPI_COMM_WORLD, &rank_); | ||
comm_ = std::make_shared<Epetra_MpiComm>(MPI_COMM_WORLD); | ||
rank_ = comm_->MyPID(); | ||
numProc_ = comm_->NumProc(); | ||
EXPECT_EQ(numProc_,3); | ||
|
||
numGlobalEntries_ = numProc_ * localSize_; | ||
contigMap_ = std::make_shared<Epetra_Map>(numGlobalEntries_, 0, *comm_); | ||
myVector_ = std::make_shared<Epetra_Vector>(*contigMap_); | ||
} | ||
|
||
virtual void TearDown(){} | ||
}; | ||
//----------------------------------------------------------- | ||
|
||
|
||
struct epetraMultiVectorGlobSize15Fixture | ||
: public ::testing::Test{ | ||
|
||
public: | ||
std::shared_ptr<Epetra_MpiComm> comm_; | ||
int rank_; | ||
int numProc_; | ||
const int numVecs_ = 4; | ||
const int localSize_ = 5; | ||
int numGlobalEntries_; | ||
std::shared_ptr<Epetra_Map> contigMap_; | ||
std::shared_ptr<Epetra_Map> map_to_all_; | ||
std::shared_ptr<Epetra_Import> importer_; | ||
std::shared_ptr<Epetra_MultiVector> myMv_; | ||
std::shared_ptr<Epetra_Vector> x_epetra; | ||
std::shared_ptr<Epetra_Vector> y_epetra; | ||
|
||
virtual void SetUp(){ | ||
MPI_Comm_rank(MPI_COMM_WORLD, &rank_); | ||
comm_ = std::make_shared<Epetra_MpiComm>(MPI_COMM_WORLD); | ||
rank_ = comm_->MyPID(); | ||
numProc_ = comm_->NumProc(); | ||
EXPECT_EQ(numProc_,3); | ||
|
||
numGlobalEntries_ = numProc_ * localSize_; | ||
contigMap_ = std::make_shared<Epetra_Map>(numGlobalEntries_, 0, *comm_); | ||
// Note: this importer sends whole object to all ranks | ||
map_to_all_ = std::make_shared<Epetra_Map>(numGlobalEntries_, numGlobalEntries_, 0, *comm_); | ||
importer_ = std::make_shared<Epetra_Import>(*map_to_all_, *contigMap_); | ||
|
||
myMv_ = std::make_shared<Epetra_MultiVector>(*contigMap_, numVecs_); | ||
myMv_->PutScalar(1.); | ||
for (int i = 0; i < localSize_; ++i) { | ||
for (int j = 0; j < numVecs_; ++j) { | ||
// generate rank-unique int values | ||
(*myMv_)[j][i] = (double)((rank_ * localSize_ + i) * numVecs_ + j + 1.); | ||
} | ||
} | ||
x_epetra = std::make_shared<Epetra_Vector>(*contigMap_); | ||
for (int j = 0; j < localSize_; ++j) { | ||
// generate rank-unique int values | ||
(*x_epetra)[j] = (double)(rank_ * localSize_ + j + 1.); | ||
} | ||
y_epetra = std::make_shared<Epetra_Vector>(*contigMap_); | ||
y_epetra->PutScalar(3.); | ||
} | ||
|
||
virtual void TearDown(){} | ||
}; | ||
//----------------------------------------------------------- | ||
|
||
|
||
|
||
struct epetraMultiVectorR9C4VecS9Fixture | ||
: public ::testing::Test{ | ||
|
||
public: | ||
int rank_; | ||
std::shared_ptr<Epetra_MpiComm> comm_; | ||
int numProc_; | ||
const int localSize_ = 3; | ||
const int numVectors_ = 4; | ||
int numGlobalEntries_; | ||
std::shared_ptr<Epetra_Map> dataMap_; | ||
std::shared_ptr<Epetra_MultiVector> myMv_; | ||
std::shared_ptr<Epetra_Vector> myVector_; | ||
|
||
virtual void SetUp(){ | ||
MPI_Comm_rank(MPI_COMM_WORLD, &rank_); | ||
comm_ = std::make_shared<Epetra_MpiComm>(MPI_COMM_WORLD); | ||
rank_ = comm_->MyPID(); | ||
numProc_ = comm_->NumProc(); | ||
EXPECT_EQ(numProc_,3); | ||
|
||
numGlobalEntries_ = numProc_ * localSize_; | ||
dataMap_ = std::make_shared<Epetra_Map>(numGlobalEntries_, 0, *comm_); | ||
myMv_ = std::make_shared<Epetra_MultiVector>(*dataMap_, numVectors_); | ||
myVector_ = std::make_shared<Epetra_Vector>(*dataMap_); | ||
} | ||
|
||
virtual void TearDown(){} | ||
}; | ||
|
||
#endif /* CONTAINERS_FIXTURES_EPETRA_ONLY_FIXTURES_HPP_ */ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is necessary because Trilinos has deprecated Epetra, resulting in a bunch of warnings: