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

IO Error while using PotentialFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 6, 2012, 01:39
Exclamation IO Error while using PotentialFOAM
  #1
Member
 
Shreyas Ragavan
Join Date: Feb 2012
Location: India
Posts: 37
Rep Power: 14
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, 02:42
Default
  #2
Member
 
Shreyas Ragavan
Join Date: Feb 2012
Location: India
Posts: 37
Rep Power: 14
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: 13
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
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 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: 13
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
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
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: 13
Grimoli is on a distinguished road
Thanks guys!!Now it worked =D
Grimoli is offline   Reply With Quote

Old   October 24, 2013, 04:33
Unhappy Help me
  #8
New Member
 
Minh-VietNam
Join Date: Oct 2013
Posts: 7
Rep Power: 13
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, 06:29
Default
  #9
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
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, 06:42
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
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 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, 11:42
Exclamation new error
  #11
New Member
 
upender singh
Join Date: Jul 2014
Location: new delhi, india
Posts: 11
Rep Power: 12
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 offline   Reply With Quote

Old   August 16, 2014, 13:30
Default
  #12
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
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 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
ruikeradity1 likes this.
__________________
wyldckat is offline   Reply With Quote

Reply

Tags
io error, openfoam, potentialfoam


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
Pressure distributions in potentialFoam JoeLindsey OpenFOAM Running, Solving & CFD 3 November 23, 2015 08:23
Using potentialFoam with simpleBuoyantFoam lasb OpenFOAM Running, Solving & CFD 5 August 28, 2015 13:32
simple geometry and potentialFoam? Tobi OpenFOAM 0 June 21, 2012 17:39
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 10:43


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