[Trilinos-Users] MPI split in Epetra

SungHwan Choi sunghwanchoi91 at gmail.com
Wed Apr 8 03:11:27 MDT 2015


Dear all,
I wan to do mpi split. As far as I know, there is no API to do split mpi.
in order to do so, I need MPI_Comm. but in my program only main function
has comm object. in other function, it is called through Epetra_Map.
Initially, I thought that bellow code work properly.

MPI_Comm original_comm =
dynacic_cast<Epetra_MpiComm>(map.Comm())->GetMpiComm();
MPI_Comm_split(original_comm,id_t,id_z,&bare_comm_t);
RCP<Epetra_Comm> comm_t = rcp( new Epetra_MpiComm(bare_comm_t));

in order to run above code, the first line return error.
since Comm() function of Epetra_Map returns constant object, I can cast the
type of the object to Epetra_MpiComm to call GetMpiComm. I used const_cast
but it did not work bacuse Epetra_Comm is pure virtual class.
Are there good ways to split mpi?

Thanks.
Sunghwan Choi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://software.sandia.gov/pipermail/trilinos-users/attachments/20150408/c7382c3b/attachment.html>


More information about the Trilinos-Users mailing list