I am currently trying to set up a simulation using openFOAM and MaMiCo. Thereby, MaMiCo should run on a compute node of a slurm cluster and openFOAM should run on my local computer. I am locally port forwarding from my computer to the cluster login node and then to the compute node. The exchange directory is set up using sshfs and has the necessary permissions. Once I run the MaMiCo simulation preCICE returns an error that says that the specified port is already in use. However, before I started the simulation, the port was free and if run a simple python socket on this port I am able to connect easily. This problem also occurs for any port that I have tried so far. When I run the two simulations both locally, i.e., both on the cluster or both on my computer, the simulation works fine. Only the above described setup does not work.
Does anyone have an idea what the issue might be?
Thank you in advance!
Mistakenly, I was using remote port forwarding when I took the screenshots from above.
When I use local forwarding, a primary rank connection is established. However, a secondary rank connection is refused because the port is already in use. I think this could have two reasons. One could be that the primary connection still exists on the port that is forwarded. The other could be that the primary connection is closed but, because of lingering, the port remains occupied. Yet, I am no expert on preCICE and I am not sure here. Maybe you have a solution for this problem.