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

Unable to run allrun scripts

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By rdajohansson

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 12, 2019, 13:12
Default Unable to run allrun scripts
  #1
New Member
 
Sujay
Join Date: Oct 2018
Posts: 12
Rep Power: 7
sujay3101 is on a distinguished road
I have some allrun scripts that work completely fine on windows subsystem for linux.
I'm however unable to run them on a virtual machine running on linux.

some info:
the main allrun script calls other allrun scripts in subdriectories.
The allrun scripts were copied and edited from a random tutorial directory.
Both - the windows subsystem for linux as well as the virtual machine are running the same version: OF1906

I have tried the following:
chmod -R a+rX * on each directory with the allrun scripts.

now I get the message :
Can't open /bin/tools/RunFunctions

However, if I run a copy of an existing tutorial in the same directory, it runs.

Any suggestions about what might be going wrong and how it can be fixed?
sujay3101 is offline   Reply With Quote

Old   September 13, 2019, 07:52
Default
  #2
Senior Member
 
Carlo_P
Join Date: May 2019
Location: Italy
Posts: 176
Rep Power: 7
Carlo_P is on a distinguished road
...maybe can be \ instead of / ?
Carlo_P is offline   Reply With Quote

Old   September 13, 2019, 07:56
Default
  #3
New Member
 
Sujay
Join Date: Oct 2018
Posts: 12
Rep Power: 7
sujay3101 is on a distinguished road
I don't think so.
Cant see any difference in the content of the script that is working and the ones that are not.
sujay3101 is offline   Reply With Quote

Old   September 13, 2019, 11:33
Default
  #4
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 17
peterhess is on a distinguished road
open a terminal and type:

simpleFoam -help

If the system is giving such an output (must not be identical), then that means that openfoam is installed correctly and the problem is in the script...

if not then type:

gedit ~/.bashrc

at the ende of the file you opened type:

source /opt/openfoam7/etc/bashrc

then save and restart the terminal and retest.

Regards

Peter
peterhess is offline   Reply With Quote

Old   January 25, 2020, 16:49
Default
  #5
New Member
 
Sverige
Join Date: May 2016
Posts: 2
Rep Power: 0
rdajohansson is on a distinguished road
Maybe it's the line termination.
Test by writing
file "filename" ex file Allrun and you will see
"filename": POSIX shell script, ASCII text executable, with CRLF line terminators

linux doesn't use CRLF (windows) of CR (mac), you can remove them by
sed -i 's/\r$//g' "filename"
ex sed -i 's/\r$//g' Allrun
njdyck likes this.
rdajohansson is offline   Reply With Quote

Reply

Tags
allrun script, bash on ubuntu on windows, openfoam


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
Scripts to run fluent in Linux cluster via windows sanjaykummar2810 FLUENT 1 September 19, 2018 16:23
[OpenFOAM] Unable to run paraview vaibhavkhare ParaView 1 July 23, 2018 14:44
Unable to run the case parallel using foam-extend in the cluster farahaqilah OpenFOAM 0 July 27, 2016 23:49
[snappyHexMesh] Able to run snappyHexMesh in parallel on local machine but unable to run on linux clu abhinav2601 OpenFOAM Meshing & Mesh Conversion 1 January 26, 2015 05:42
[OpenFOAM] Unable to run pvserver in parallel md_lieber ParaView 3 November 18, 2010 07:12


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