CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

OpenFoam stops when there is no internet

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By floquation
  • 2 Post By GerhardHolzinger

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 31, 2017, 07:59
Default OpenFoam stops when there is no internet
  #1
Member
 
Lenzo
Join Date: Feb 2014
Posts: 33
Rep Power: 12
lenzo is on a distinguished road
Hello there,

my terminal process of openfoam stops after a minute since I unpluged the ethernet cable, and so, i left my computer without internet.

So: I unplug, 1 minute or two and then the simulation stops.

Anyone knows why this happens? How could I solve this problem? I would like to continue the simulation during the weekends without wondering if it is still running.


I attach the picture if you want to see the last report that i see on the screen.


Thank you very much!!
Attached Images
File Type: jpg captura 1.jpg (147.8 KB, 41 views)
lenzo is offline   Reply With Quote

Old   July 31, 2017, 09:39
Default
  #2
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 20
floquation will become famous soon enough
OpenFOAM does not need ethernet/internet connection.

Therefore, I assume that you are running OpenFOAM in a terminal which requires ethernet connection, because either (perhaps I forgot a possibility):
  1. You ssh-ed to some location that you can only reach with ethernet.
  2. The location OF is reading/writing from is a remote location that can only be accessed with ethernet (e.g. a mounted fileserver).
  3. You are on some corporate/university machine that uses a log-in server. When your ethernet connection disappears, your computer freezes.
The solutions are respectively:
  1. This is not a problem, unless you run OpenFOAM directly in the terminal and the terminal hangs up. Then, make sure to run OpenFOAM with nohup (=no hangup):
    Code:
    nohup interFoam
  2. Either make sure your machine retains ethernet connection, or make sure OF is running using a case stored on your hard drive (/data). Using "nohup" you can keep OF running even if you log-out. (Although the computer must remain turned on, obviously.)
  3. I don't think you can do anything in this specific case... Try "nohup", because your processor is probably still active, although your UI froze. Other than that, just make sure you don't unplug your ethernet.
lenzo likes this.
floquation is offline   Reply With Quote

Old   August 1, 2017, 03:33
Default
  #3
Member
 
Lenzo
Join Date: Feb 2014
Posts: 33
Rep Power: 12
lenzo is on a distinguished road
Thank you Kevin!!

I have considered all the 3 options, but it is not any of them. My machine has a local log-in, and my ssh is definitelly local as well. So i don't have to reach it with ethernet, and i write and read also from this ssh local.
It truly doesn't make any sense!

So, today i have been testing different options.
When I unplug the ethernet cable, after a while, it stops. But then, If I run again the case (while offline), apparently, i doesn't stop!

So, for the moment I will just directly unplug it and use the nohub command.

I will let you know if it results!

Thanks
lenzo is offline   Reply With Quote

Old   August 4, 2017, 04:54
Default
  #4
Member
 
Lenzo
Join Date: Feb 2014
Posts: 33
Rep Power: 12
lenzo is on a distinguished road
Let me report how is it going on.

As i explained, everytime I disconnect my ethernet cable, after a little while (can be 30 sec or 3 min) openFoam stops running simulations. Without error message, simply stops.

But, once I am disconnected, if I reRun the case, it just continues, and it doesn't stop anymore...

So, I can't understand why the deuce openFoam has to stop just because I disconnect ethernet, but, at least, i found out that if I rerun while disconnected, it just works fine.

Thank you.

If anyone might have an idea why it stops would be wonderful. I work with OpenFoam 4.1 (of openfoam foundation)
lenzo is offline   Reply With Quote

Old   August 11, 2017, 03:37
Default
  #5
Member
 
Lenzo
Join Date: Feb 2014
Posts: 33
Rep Power: 12
lenzo is on a distinguished road
Hello there,

so let me update this problem.
I have discovered that if I run the case without decompose it for parallel solution (so It means only using one CPU) and I disconnect the ethernet cable, it doesn't stop at all!

It is only when it's working the parallel method.

Thus, it means that the problem with the ethernet necessity is from the MPI tool.

Someone can figure out why and how to solve it?


Thank you!
lenzo is offline   Reply With Quote

Old   April 4, 2018, 20:52
Default
  #6
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
This behaviour has been reported to OpenFOAM's bug tracking, and has been closed as this behaviour is caused by MPI an not OpenFOAM.

I noticed similar behaviour on my laptop, which is connected to a fragile wireless. I was running local jobs with 2 processes. As the wireless network is fragile, the connection fails frequently.
I noticed my parallel runs stopping without any error message whatsoever.

After some searching on the interwebs, I found this thread and the bug report I linked.


Thus, the solution to the original question: do not unplug your machine. I know, this really sounds like stupid advice.

As with fragile wireless connections, I need to figure out a way to tell MPI to ignore any interconnections.

Here is how to tell MPI not to use the wifi, which is named wlp3s0 on my system. This needs two statements, one for BTL and one for OOB.
Disabling wifi only for BTL and omitting the statement for OOB, or vice versa, will not work.

Code:
mpirun --mca oob_tcp_if_exclude wlp3s0 --mca btl_tcp_if_exclude wlp3s0 -np 2 myFoamSolver -parallel > foam.log &

BTL: MPI point-to-point Byte Transfer Layer, used for MPI point-to-point messages on some types of networks
OOB: Out of band messaging

See this, and this questions.
wyldckat and Nostradamus like this.

Last edited by GerhardHolzinger; April 4, 2018 at 21:42. Reason: expanded answer with how to tell mpi not to use wifi
GerhardHolzinger is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 05:29
OpenFOAM Training Jan-Jul 2017, Virtual, London, Houston, Berlin CFDFoundation OpenFOAM Announcements from Other Sources 0 January 4, 2017 06:15
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 05:56
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07
OpenFOAM Training and Workshop Zagreb 2628Jan2006 hjasak OpenFOAM 1 February 2, 2006 21:07


All times are GMT -4. The time now is 19:35.