[Trilinos-Users] Ifpack2: GlobalMPISession Error
V M Krushnarao Kotteda
kvmkrao at gmail.com
Tue Jul 26 10:16:10 EDT 2016
I replaced " *mpiSession (NULL, NULL, NULL);*" with "*mpiSession ()*;" to
get rid of the *GlobalMPISession* error.
Thanks
V M Krushnarao Kotteda
On Mon, Jul 25, 2016 at 8:02 PM, V M Krushnarao Kotteda <kvmkrao at gmail.com>
wrote:
> Hi,
>
> I initialized MPI in my program and calling a program (Test.cpp)
> in the following directory to solve the linear system of equations:
>
> src/packages/ifpack2/test/belos/AdditiveSchwarzRILUK
>
> I am able to compile my program with Ifpack2 test program.
> However, I got GlobalMPISession Error when I ran the executable using the
> following command:
>
> mpirun -np 2 ./example
>
> I am new to Trilinos and could you please tell me how to fix this error.
>
>
> *>> Modified Test.cpp program callled from my program *
>
> #include <Teuchos_GlobalMPISession.hpp>
> #include <Teuchos_oblackholestream.hpp>
> #include <Tpetra_DefaultPlatform.hpp>
> #include <Tpetra_Version.hpp>
> #include "Solve.hpp"
>
>
> int* ifpack2(double** Ao, double* bo, double* x_vec ,int rows)
> {
>
> typedef Ifpack2::Test::ST ST;
> typedef Tpetra::Vector<>::local_ordinal_type local_ordinal_type;
> typedef Tpetra::Vector<>::global_ordinal_type global_ordinal_type;
> typedef Ifpack2::Test::GO GO;
> typedef Ifpack2::Test::STS STS;
> typedef Ifpack2::Test::map_type map_type;
> typedef Ifpack2::Test::multivector_type multivector_type;
> typedef Ifpack2::Test::sparse_mat_type sparse_mat_type;
>
> using Tpetra::global_size_t;
> using Teuchos::Array;
> using Teuchos::ArrayView;
> using Teuchos::ArrayRCP;
> using Teuchos::arcp;
> using Teuchos::RCP;
> using Teuchos::rcp;
> using Teuchos::tuple;
> using std::cerr;
>
> Teuchos::oblackholestream blackHole;
> //Teuchos::GlobalMPISession mpiSession (&argc, &argv, &blackHole);
> Teuchos::GlobalMPISession mpiSession (NULL, NULL, NULL);
> RCP<const Teuchos::Comm<int> > comm =
> Tpetra::DefaultPlatform::getDefaultPlatform ().getComm ();
> const int myRank = comm->getRank ();
> const int numProcs = comm->getSize ();
>
> std::ostream &out = std::cout;
>
> // The number of rows and columns in the matrix.
> const global_size_t numGlobalElements = 12;
>
> .............................
> }
>
> *Error: *
> rank 0
> GlobalMPISession(): Error, MPI_Intialized() return true, calling
> std::terminate()!
> rank 1
> GlobalMPISession(): Error, MPI_Intialized() return true, calling
> std::terminate()!
> terminate called without an active exception
>
> Program received signal SIGABRT: Process abort signal.
>
> Backtrace for this error:
> terminate called without an active exception
>
> Program received signal SIGABRT: Process abort signal.
>
> Backtrace for this error:
> #0 0x7ff405c53f07 in ???
> #1 0x7ff405c5314d in ???
> #8 0x10fd097 in _ZN7Teuchos16GlobalMPISessionC2EPiPPPcPSo
> at
> /home/muralik/soft/tri12p6/packages/teuchos/core/src/Teuchos_GlobalMPISession.cpp:86
> #8 0x10fd097 in _ZN7Teuchos16GlobalMPISessionC2EPiPPPcPSo
> at
> /home/muralik/soft/tri12p6/packages/teuchos/core/src/Teuchos_GlobalMPISession.cpp:86
>
>
> Thank you.
>
> Best regards,
> V M Krushnarao Kotteda
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://trilinos.org/pipermail/trilinos-users/attachments/20160726/3c4fe9e3/attachment.html>
More information about the Trilinos-Users
mailing list