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

mpirun trouble

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 21, 2010, 06:01
Default mpirun trouble
  #1
Senior Member
 
Join Date: Feb 2010
Posts: 213
Rep Power: 8
vaina74 is on a distinguished road
Hi everybody. Yesterday I made a fresh installation of OpenFOAM-1.7 and today I ran a tested case. I had a mpirun problem:
Code:
foamJob -p -s simpleFoam
Parallel processing using SYSTEMOPENMPI with 2 processors
Executing: mpirun -np 2 /opt/openfoam170/bin/foamExec simpleFoam -parallel | tee log
Error : bashrc file could not be found for OpenFOAM-
Error : bashrc file could not be found for OpenFOAM-
How can I fix it?
My o.s. is Ubuntu 10.04.
vaina74 is offline   Reply With Quote

Old   July 21, 2010, 06:32
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Maurizio,

nice catch! That's another bug So feel free to report it

The quickest fix is this:
Code:
sudo ln -s openfoam170 /opt/OpenFOAM-1.7.0
Or this one also works:
Code:
sudo ln -s /opt/openfoam170 /opt/OpenFOAM-1.7.0
The script foamExec assumes this premise:
Quote:
Originally Posted by foamExec
# This script should exist in <foamInstall>/OpenFOAM-<VERSION>/bin/
# extract the <foamInstall> and <version> elements
# using a function preserves the command args
In other words, the script does not take into account the folder format that the debian package installs. I.e., the nomenclature openfoam170 isn't compatible with the script's search mechanism! OpenFOAM-1.7.0 on the other hand is compatible

Best regards,
Bruno

PS: I've hit 500 posts with this post

Last edited by wyldckat; July 21, 2010 at 06:33. Reason: Another possibility for symbolic linking...
wyldckat is offline   Reply With Quote

Old   July 21, 2010, 06:55
Default
  #3
Senior Member
 
Join Date: Feb 2010
Posts: 213
Rep Power: 8
vaina74 is on a distinguished road
Hi, Bruno.

I hoped you were around here :-)
I ran in the terminal your second hint and - I'm not so expert - it means that a folder named OpenFOAM-1.7.0 is created, linking to openfoam170. But something doesn't work and I still have the same output when launching foamJob. Have I to make any trivial thing (I already opened a new terminal), like rebooting the computer or create again a 'run' folder (I already had HOME/OpenFOAM/user-1.7.0/run)?

Thanks for your help.
vaina74 is offline   Reply With Quote

Old   July 21, 2010, 07:05
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Maurizio,

Oops, I forgot one thing... You will have to edit your file "~/.bashrc" and change the line:
Code:
. /opt/openfoam170/etc/bashrc
To:
Code:
. /opt/OpenFOAM-1.7.0/etc/bashrc
I didn't remember the script needs to be executed from the pertinent folder...

As for using the symbolic link: I think it's the best option, since this way when OpenCFD updates the debian package, you'll have your installed version automatically updated too

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   July 21, 2010, 07:26
Default
  #5
Senior Member
 
Join Date: Feb 2010
Posts: 213
Rep Power: 8
vaina74 is on a distinguished road
I edited the ~/.bashrc file and inserted
Code:
# OpenFOAM
. /opt/OpenFOAM-1.7.0/etc/bashrc
but it still doesn't work :-(

Last edited by vaina74; July 21, 2010 at 07:58.
vaina74 is offline   Reply With Quote

Old   July 21, 2010, 08:45
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Ooook... I had to install it and test it for myself. The fixes above apparently are worthless

The fix that worked for me right now was to edit the file /opt/openfoam170/bin/foamJob:
Code:
gksu gedit /opt/openfoam170/bin/foamJob
Then go to the end of the file and where you find:
Code:
mpirun $mpiopts $APPLICATION $@ -parallel
Remove the "$APPLICATION" part and save and close.


You better report this, because this is on annoying bug I tried to fix the file foamExec, but it never wanted to work

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   July 21, 2010, 09:50
Default
  #7
Senior Member
 
Join Date: Feb 2010
Posts: 213
Rep Power: 8
vaina74 is on a distinguished road
Bruno,

thank you very much for your temporary fix trick. I need OpenFOAM now, I couldn't wait for a definitve solution. I already posted a thread in the OF bugs section of the forum, just a link to this forum.
Thanks again for your quick help. Best regards.
vaina74 is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
mpirun problems vaina74 OpenFOAM Installation 13 June 6, 2011 16:09
Problem with mpirun with OpenFOAM jiejie OpenFOAM 3 July 7, 2010 19:30
Naca0012 k-e mpirun gives fpe whereas simpleFoam not Pierpaolo OpenFOAM 1 May 8, 2010 03:08
MPIRUN fails lfbarcelo OpenFOAM 3 March 29, 2010 07:41
what is wrong with the mpirun parameter -mca ? donno OpenFOAM 6 March 24, 2010 17:00


All times are GMT -4. The time now is 18:15.