CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Loading/running OpenFOAM - not sourcing properly

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 27, 2017, 07:04
Default Loading/running OpenFOAM - not sourcing properly
  #1
New Member
 
R Kyle
Join Date: Feb 2017
Location: Scotland
Posts: 11
Rep Power: 10
RKyle is on a distinguished road
Hi guys,

First off: I'm no Linux master yet so please forgive my lack of understanding with the terms...

I'm trying to run OpenFOAM 4.1 on my University's cluster with no success so far; it cannot load OpenFOAM. I can source it but the commands do not work ('blockMesh -help' for example).

On my desktop I have blueCFD-Core installed to run OpenFOAM which seems to have it's own MinGW environment that sets up on loading, this all works perfectly. I installed a separate Linux console (called Cmder) on my desktop to try source and run OpenFOAM too, to see if I could work out why it might not be working on the cluster (as well as get some practice!), but it's having the same problem of sourcing but not running commands. I get the attached error message when sourcing it, which is probably the cause of the problem; apparently my "MSYS_NT-6.1-WOW operating system is not supported", but I know that this version of OpenFOAM can run on my computer since the blueCFD one works. I guess that changing the shell from this to MinGW could help or something?

I've also attached the environment variables for my blueCFD-Core set-up (which works) and the Cmder ones (which doesn't) to help pinpoint the problem. Both consoles are on my desktop, not the cluster yet.

Is anyone able to help me get Cmder to run OpenFOAM? If I was a Linux guru I'm sure I'd find the problem very easily but sadly I'm not. Any help is most certainly appreciated!


Kind regards,

Ryan
Attached Images
File Type: png Capture1.PNG (60.8 KB, 12 views)
Attached Files
File Type: txt Cmder_env.txt (7.6 KB, 2 views)
File Type: txt blueCFD_env.txt (6.7 KB, 1 views)
RKyle is offline   Reply With Quote

Old   December 31, 2017, 14:15
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 129
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Ryan,

I'm a bit late to answer your questions, but first a quick disclaimer: I'm the main developer of blueCFD-Core.

As for your questions: I am curious why you want to use Cmder instead of Mintty that comes with MSys2 (packaged with blueCFD-Core), for the terminal-like command line... wait, I re-read your post again:
Quote:
Originally Posted by RKyle View Post
I installed a separate Linux console (called Cmder) on my desktop to try source and run OpenFOAM too, to see if I could work out why it might not be working on the cluster (as well as get some practice!), but it's having the same problem of sourcing but not running commands. I get the attached error message when sourcing it, which is probably the cause of the problem; apparently my "MSYS_NT-6.1-WOW operating system is not supported", but I know that this version of OpenFOAM can run on my computer since the blueCFD one works. I guess that changing the shell from this to MinGW could help or something?
Yes, the issue is that it's in the file "etc/prefs-mingw_w64.sh" in the OpenFOAM package provided with blueCFD-Core, that there are specific settings for defining the MinGW environment to be used, as you can see here: https://github.com/blueCFD/OpenFOAM-...s-mingw_w64.sh


The proper solution is that you need to configure Cmder to start up Bash the same was that is done in MSys2, so that it loads in Bash with MinGW-w64 loaded in for the initial environment.
A quick Google-search and I found this report on the Cmder development project: https://github.com/cmderdev/cmder/issues/1493 - from which you need to follow this information:
Quote:
create a new task and use:
Code:
set MSYSTEM=MINGW64 & "C:\msys64\usr\bin\bash.exe" --login -i
The other detail is that you need to use the same home folder that blueCFD-Core provides, namely the one at "blueCFD-Core-2016/msys64/home/ofuser". This is because the ".bashrc" file and other files in that folder provide the necessary settings for ensuring that everything is set-up properly. Unfortunately I haven't had the time to provide a repository that has these files from the user folder that is provided with blueCFD-Core, but if you study the script code in the file ".bashrc", you should see each extra step and which scripts it needs in order to properly load in the correct environment.

From what I can deduce, it should as simple as creating said task in Cmder with the following code:
Code:
set MSYSTEM=MINGW64 & set USER=ofuser & set USERNAME=ofuser & "C:\blueCFD-Core-2016\msys64\usr\bin\bash.exe" --login -i
It should do everything else automatically on its own, since it's loading in this specific MSys2 installation and the necessary environment files needed to use this MSys2 installation that blueCFD-Core provides.



Now, going back to the problem in the University cluster and loading OpenFOAM, I would instead suggest that you study this page: https://openfoamwiki.net/index.php/I...with_the_Shell - at least to get you started with understanding how to use OpenFOAM on Linux. Beyond this, do the administrators of the cluster provide specific instructions on how to use OpenFOAM or did you have to build it from source code?

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Getting Started with OpenFOAM wyldckat OpenFOAM 26 June 21, 2024 07:54
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 16:54
openFoam in jupyter Notebook-Howto configure properly? jf_vt OpenFOAM Running, Solving & CFD 1 May 22, 2017 09:27
OpenFOAM Training Jan-Apr 2017, Virtual, London, Houston, Berlin cfd.direct OpenFOAM Announcements from Other Sources 0 September 21, 2016 12:50
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 15:25


All times are GMT -4. The time now is 20:53.