Multicontact Model Issues

Submitted by amgroen on Wed, 07/31/2019 - 18:48

Is the multicontact model supposed to work with MPI?
I have not had any luck getting the example program in.hydrogel_multicontact to run on Windows.

Due to this error:
Fatal error in MPI_Wait: Message truncated, error stack:
MPI_Wait(request=0x000000EDE92FF220, status0x000000EDE92FF228) failed
Message from rank 1 and tag 0 truncated; 209176 bytes received but buffer size is 117120

What I've found by trying to fix the code myself is that this specific MPI_Wait is at line 1198 in comm.cpp
The code fails because the count of the previous MPI_Irecv is too low.
The workaround for this issue that I did was simply to multiply nrecv*size_border by 4 in a few spots.

However, the sample program still crashes for another reason during the second run command.
Strangely, in memory.cpp the call to realloc directly causes a crash instead of producing a NULL pointer like expected.
I think maybe it is trying to realloc into a smaller size then is possible?
The call to grow is in comm.cpp in the exchange() function

I believe that how nrecv is determined needs to be adjusted somehow for the multicontact model to work.
I don't know all of the details about it so it is unclear to me how to fix this

Thanks
Alex