{"action":"created","issue":{"url":"https://api.github.com/repos/trilinos/Trilinos/issues/1196","repository_url":"https://api.github.com/repos/trilinos/Trilinos","labels_url":"https://api.github.com/repos/trilinos/Trilinos/issues/1196/labels{/name}","comments_url":"https://api.github.com/repos/trilinos/Trilinos/issues/1196/comments","events_url":"https://api.github.com/repos/trilinos/Trilinos/issues/1196/events","html_url":"https://github.com/trilinos/Trilinos/issues/1196","id":218423937,"number":1196,"title":"Ifpack_SparseContainer can't be used without initializing MPI","user":{"login":"Sbte","id":454803,"avatar_url":"https://avatars0.githubusercontent.com/u/454803?v=3","gravatar_id":"","url":"https://api.github.com/users/Sbte","html_url":"https://github.com/Sbte","followers_url":"https://api.github.com/users/Sbte/followers","following_url":"https://api.github.com/users/Sbte/following{/other_user}","gists_url":"https://api.github.com/users/Sbte/gists{/gist_id}","starred_url":"https://api.github.com/users/Sbte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sbte/subscriptions","organizations_url":"https://api.github.com/users/Sbte/orgs","repos_url":"https://api.github.com/users/Sbte/repos","events_url":"https://api.github.com/users/Sbte/events{/privacy}","received_events_url":"https://api.github.com/users/Sbte/received_events","type":"User","site_admin":false},"labels":[{"id":333831085,"url":"https://api.github.com/repos/trilinos/Trilinos/labels/Ifpack","name":"Ifpack","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-03-31T07:49:48Z","updated_at":"2017-03-31T19:41:28Z","closed_at":null,"body":"`Ifpack_SparseContainer` can't be used when Trilinos is compiled with MPI support but it is used without calling `MPI_Initialize`. This happens because a serial MPI communicator is instantiated in the constructor:\r\n\r\nhttps://github.com/trilinos/Trilinos/blob/master/packages/ifpack/src/Ifpack_SparseContainer.h#L323\r\n\r\nA case where one might want to use this without calling `MPI_Initialize` is when `Epetra_SerialComm` is used for all vectors and matrices. Is there any reason why `Epetra_MpiComm(MPI_COMM_SELF)` is used instead of `Epetra_SerialComm` in `Ifpack_SparseContainer`? If not I can submit a pull request that gets rid of this if you like."},"comment":{"url":"https://api.github.com/repos/trilinos/Trilinos/issues/comments/290810918","html_url":"https://github.com/trilinos/Trilinos/issues/1196#issuecomment-290810918","issue_url":"https://api.github.com/repos/trilinos/Trilinos/issues/1196","id":290810918,"user":{"login":"mhoemmen","id":926747,"avatar_url":"https://avatars3.githubusercontent.com/u/926747?v=3","gravatar_id":"","url":"https://api.github.com/users/mhoemmen","html_url":"https://github.com/mhoemmen","followers_url":"https://api.github.com/users/mhoemmen/followers","following_url":"https://api.github.com/users/mhoemmen/following{/other_user}","gists_url":"https://api.github.com/users/mhoemmen/gists{/gist_id}","starred_url":"https://api.github.com/users/mhoemmen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhoemmen/subscriptions","organizations_url":"https://api.github.com/users/mhoemmen/orgs","repos_url":"https://api.github.com/users/mhoemmen/repos","events_url":"https://api.github.com/users/mhoemmen/events{/privacy}","received_events_url":"https://api.github.com/users/mhoemmen/received_events","type":"User","site_admin":false},"created_at":"2017-03-31T19:41:28Z","updated_at":"2017-03-31T19:41:28Z","body":"@Sbte wrote:\r\n> I was just wondering what the advantage is of using `MPI_COMM_SELF` over Epetra_SerialComm. I suppose that they are at least supposed to do the same thing. If not it might explain some of the errors that I get at the moment :)\r\n\r\nWith respect to Epetra, they are supposed to do the same thing.  However, if your application actually uses MPI, using `Epetra_MpiComm` everywhere (even with `MPI_COMM_SELF`) means that you can always get the `MPI_Comm` out of the `Epetra_Comm` (via `dynamic_cast`) and do MPI things with it -- e.g., `MPI_Intercomm_create`, attach key-value pairs to it, and use it in `MPI_Pack`.  It also means that if you use MPI profiling tools, the tools will capture operations on that `Epetra_Comm`."}}
{"actor":{"display_login":"mhoemmen"}}