CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   IO Error while using PotentialFOAM (http://www.cfd-online.com/Forums/openfoam/104279-io-error-while-using-potentialfoam.html)

shreyasr July 6, 2012 00:39

IO Error while using PotentialFOAM
 
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 July 6, 2012 01:42

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.

Grimoli March 1, 2013 17:05

hey bro i havent found any "allow" option on the blockDict of the system folder.What I'm doing wrong??Please someone help me

wyldckat March 2, 2013 07:01

Greetings Gabriel and welcome to the forum!
Quote:

Originally Posted by Grimoli (Post 410948)
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

Grimoli March 2, 2013 21:33

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??

wyldckat March 3, 2013 07:20

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

Grimoli March 3, 2013 08:42

Thanks guys!!Now it worked =D

mingbn October 24, 2013 03:33

Help me
 
Quote:

Originally Posted by wyldckat (Post 411156)
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

Tobi October 24, 2013 05:29

Hi,

it seems that you have no rights on that file.

Code:


sudo vim "yourfile"
sudo gedit "yourfile"
.
.
.

Regards Tobi

wyldckat October 26, 2013 05:42

Greetings to all!

@mingbn:
Quote:

Originally Posted by mingbn (Post 458683)
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

upender July 30, 2014 10:42

new error
 
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
:confused:

wyldckat August 16, 2014 12:30

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


All times are GMT -4. The time now is 23:14.