precice icon indicating copy to clipboard operation
precice copied to clipboard

Move IntraComm into Participant

Open fsimonis opened this issue 6 years ago • 1 comments

To fully support multiple instances of the Participant in one executable, we need to get rid of some static state.

The communicator internal to the participant utils::IntraComm should become member of the participant itself. And passed as context to all components relying on it.

This design decision will make our components easier to test too.

Moving it would also be a good opportunity to give it a more expressive name.

Related to #378 and #385

fsimonis avatar Nov 13 '19 12:11 fsimonis

Can give ugly problems at destruction when one participant uses a master and the other one not and trace logging for com is switched on.

#11  0x7f0e97587eb7 in _ZN7precice7logging6Logger5traceENS0_11LogLocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
	at /home/uekerman/Repos/precice/src/logging/Logger.cpp:105
#12  0x7f0e974a9898 in _ZN7precice3com22MPIDirectCommunicationD2Ev
	at /home/uekerman/Repos/precice/src/com/MPIDirectCommunication.cpp:20
#13  0x7f0e974f7894 in _ZN9__gnu_cxx13new_allocatorIN7precice3com22MPIDirectCommunicationEE7destroyIS3_EEvPT_
	at /usr/include/c++/7/ext/new_allocator.h:140

uekerman avatar Nov 29 '19 10:11 uekerman