Obviously, I've seen this before, which is why I programmed in the re-connection attempt.
What you are seeing is 2 different types of inter-process communication. First you get the messages
Opening NIML socket 'tcp:localhost:53213' to AFNI. Connected!
++ NIML connection opened from 127.0.0.1 (tcp:host:53213,AFNI_GroupInCorr_NIML)
The first one is from 3dGIC, saying it is opening a connection to AFNI (think of it as making a telephone call -- AFNI is listening, 3dGIC is calling). The second message is from AFNI, saying it just got an incoming connection.
Later you get the messages
++ GIC: Reconnecting to AFNI with shared memory channel shm:GrpInCorr_53213:1M+4K
+ GIC: SHM reconnection *ACTIVE* smiling smiley !!!
Which says that 3dGIC has dropped the TCP/IP connection in favor of a SHM (shared memory) connection -- which is much faster, but should only work on the same computer.
At this point I'm confused, because you said this was a remote session.
Even later you get the messages
*+ WARNING: GIC: Connection to AFNI broken - trying to restart
++ NIML connection closed from shm:GrpInCorr_53213:1M+4K (shm:GrpInCorr_53213:1M+4K,ZERO)
+ GIC: TCP/IP restart is good smiling smiley
++ NIML connection opened from 127.0.0.1 (tcp:host:53213,AFNI_GroupInCorr_NIML)
These indicate that the SHM connection went bad -- I've certainly seen this happen before, and spent a great deal of time trying to figure out why -- and gave up. At this point, the 3dGIC program re-opens the TCP/IP connection and will use that for the rest of the session.
If it continues to work for you, then I'd just ignore this problem. I suppose it is a little annoying, but in my experience it all happens pretty quickly and so has no real downside. If you want to avoid the annoyance, then use the
-NOshm option with 3dGroupInCorr and then it will only use TCP/IP -- which seems to be more reliable.
By the way, the reason TCP/IP is slower when two programs on the same computer are talking is that the data must pass through the operating system, so it gets touched by more "hands". With shared memory, the data passes directly from one program to another, which is 3-4 times faster
for large amounts of data -- which is often the case when passing entire datasets around. But computers are pretty fast these days, so the extra overhead from using TCP/IP may not be noticeable for most users.