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

IO Error while using PotentialFOAM

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 6, 2012, 00:39
Exclamation IO Error while using PotentialFOAM
  #1
Member
 
Shreyas Ragavan
Join Date: Feb 2012
Location: India
Posts: 35
Rep Power: 5
shreyasr is on a distinguished road
While running blockMesh for the 2D potential flow tutorial , over a cylinder , in the Programmer's guide, I get the error posted below :

I tried modifying the controldict file of this case, as suggested in the error message, but still get the same error. I'd be grateful for solutions to this problem.

Some questions :
Why has this error occured ?
Which library is being loaded that is shared ?
Why does this fall under the category of a security issue ?

Error message :

--> FOAM FATAL IO ERROR:
Loading a shared library using case-supplied code is not enabled by default
because of security issues. If you trust the code you can enable this
facility be adding to the InfoSwitches setting in the system controlDict:

allowSystemOperations 1

The system controlDict is either

~/.OpenFOAM/$WM_PROJECT_VERSION/controlDict

or

$WM_PROJECT_DIR/etc/controlDict
shreyasr is offline   Reply With Quote

Old   July 6, 2012, 01:42
Default
  #2
Member
 
Shreyas Ragavan
Join Date: Feb 2012
Location: India
Posts: 35
Rep Power: 5
shreyasr is on a distinguished road
Solution : Basically involves reading the error message carefully.

Using the terminal, type in
'cd $ WM_PROJECT_DIR/etc'

This is the source code directory. Type 'ls' to see the files available. There will be a file called controlDict.

Using your preferred text editor, edit this file as a root user
'sudo medit controlDict'

Under the category of infoswitches, you can see the option 'allowSystemOperations' , set the option to '1' . Navigate back to the case file and run blockMesh and potentialFoam.
shreyasr is offline   Reply With Quote

Old   March 1, 2013, 17:05
Default
  #3
Member
 
Gabriel de PInho RImoli
Join Date: Mar 2013
Posts: 49
Rep Power: 4
Grimoli is on a distinguished road
hey bro i havent found any "allow" option on the blockDict of the system folder.What I'm doing wrong??Please someone help me
Grimoli is offline   Reply With Quote

Old   March 2, 2013, 07:01
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,318
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Gabriel and welcome to the forum!
Quote:
Originally Posted by Grimoli View Post
hey bro i havent found any "allow" option on the blockDict of the system folder.What I'm doing wrong??Please someone help me
shreyasr is referring the file "$WM_PROJECT_DIR/etc/controlDict", which you can see online for reference: https://github.com/OpenFOAM/OpenFOAM...ontrolDict#L36

But as the message provided in the first post indicates, what you can do is detailed on the following wiki page, section "2.1 Additional tuning ": http://openfoamwiki.net/index.php/Ti...itional_tuning

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   March 2, 2013, 21:33
Default
  #5
Member
 
Gabriel de PInho RImoli
Join Date: Mar 2013
Posts: 49
Rep Power: 4
Grimoli is on a distinguished road
guys i dont what to do.I still got the error after hours trying to fix it.All time I open the controlDict file ,there's nothing written there,its all blank.I reinstalled it over and over,and it's blank.

These are the commands Im using :

IM opening the terminal ,and on the home folder i type :

mkdir -p ~/.OpenFOAM/$WM_PROJECT_VERSION
cp $WM_PROJECT_DIR/etc/controlDict ~/.OpenFOAM/$WM_PROJECT_VERSION/
sudo medit controlDict

the controlDict is blank =/.WHat should I do??
Grimoli is offline   Reply With Quote

Old   March 3, 2013, 07:20
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,318
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Gabriel,

Do not use sudo and you should be editing the file with the full path:
Code:
medit ~/.OpenFOAM/$WM_PROJECT_VERSION/controlDict
If it is still empty, then check if the mentioned variables are properly defined:
Code:
echo $WM_PROJECT_VERSION
echo $WM_PROJECT_DIR
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   March 3, 2013, 08:42
Default
  #7
Member
 
Gabriel de PInho RImoli
Join Date: Mar 2013
Posts: 49
Rep Power: 4
Grimoli is on a distinguished road
Thanks guys!!Now it worked =D
Grimoli is offline   Reply With Quote

Old   October 24, 2013, 03:33
Unhappy Help me
  #8
New Member
 
Minh-VietNam
Join Date: Oct 2013
Posts: 7
Rep Power: 3
mingbn is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Gabriel,

Do not use sudo and you should be editing the file with the full path:
Code:
medit ~/.OpenFOAM/$WM_PROJECT_VERSION/controlDict
If it is still empty, then check if the mentioned variables are properly defined:
Code:
echo $WM_PROJECT_VERSION
echo $WM_PROJECT_DIR
Best regards,
Bruno

Hi. i have a problem, too.
I can open file controlDict, i can change value of "allowSystemOperations " to 1 but i can't save this change.
Should I do? Please, help me! ThankS
mingbn is offline   Reply With Quote

Old   October 24, 2013, 05:29
Default
  #9
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,089
Blog Entries: 6
Rep Power: 19
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

it seems that you have no rights on that file.

Code:
 
sudo vim "yourfile"
sudo gedit "yourfile"
.
.
.
Regards Tobi
Tobi is offline   Reply With Quote

Old   October 26, 2013, 05:42
Default
  #10
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,318
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings to all!

@mingbn:
Quote:
Originally Posted by mingbn View Post
I can open file controlDict, i can change value of "allowSystemOperations " to 1 but i can't save this change.
Should I do?
Try these instructions: http://openfoamwiki.net/index.php/Ho...in_debug_flags

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   July 30, 2014, 10:42
Exclamation new error
  #11
New Member
 
upender singh
Join Date: Jul 2014
Location: new delhi, india
Posts: 7
Rep Power: 3
upender is on a distinguished road
i did gedit the above issue but now there is a new one
it says....
--> FOAM FATAL ERROR:
The parent directory does not allow write permission to the process,
or one of the directories in "/opt/openfoam211/tutorials/basic/potentialFoam/cylinder/dynamicCode" did not allow search (execute) permission.

From function Foam::mkDir(const fileName&, mode_t)
in file POSIX.C at line 462.

FOAM exiting
upender is online now   Reply With Quote

Old   August 16, 2014, 12:30
Default
  #12
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,318
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings upender and welcome to the forum!

Well, that's what happens when you don't carefully read the User Guide: http://www.openfoam.org/docs/user/tutorials.php - in the introduction part of chapter 2, it states the following commands:
Code:
mkdir -p $FOAM_RUN 
cp -r $FOAM_TUTORIALS $FOAM_RUN
And if you continue reading the next section, it starts off with this command:
Code:
cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity
Problem is that you're working in the folder "$FOAM_TUTORIALS", which is in your case "/opt/openfoam211/tutorials", which is a read-only location for normal users.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Reply

Tags
io error, openfoam, potentialfoam

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
simple geometry and potentialFoam? Tobi OpenFOAM 0 June 21, 2012 16:39
Pressure distributions in potentialFoam JoeLindsey OpenFOAM Running, Solving & CFD 2 November 8, 2011 13:08
potentialFoam around a sphere ; mesh by Gmsh eliam OpenFOAM Running, Solving & CFD 12 January 26, 2011 04:02
PotentialFoam fails bastil OpenFOAM Running, Solving & CFD 0 April 17, 2009 09:43
Using potentialFoam with simpleBuoyantFoam lasb OpenFOAM Running, Solving & CFD 4 August 10, 2007 08:31


All times are GMT -4. The time now is 09:13.