CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Error will loading makeAxialMesh utility in openFOAM-1.6 (https://www.cfd-online.com/Forums/openfoam/73030-error-will-loading-makeaxialmesh-utility-openfoam-1-6-a.html)

will_avoid_comm_solvers February 24, 2010 20:57

Error will loading makeAxialMesh utility in openFOAM-1.6
 
Greetings group members

I was trying to compile the makeAxialMesh utility and use it for generating an axi-symmetric mesh. I untarred the .gz file at this location
$HOME/OpenFOAM-1.6/applications/utilities/mesh//manipulation

Then i typed wmake in the command prompt. I am getting the following error

SOURCE=makeAxialMesh.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/patrick/OpenFOAM/OpenFOAM-1.6/src/dynamicMesh/lnInclude -I/home/patrick/OpenFOAM/OpenFOAM-1.6/src/cfdTools/lnInclude -I/home/patrick/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -IlnInclude -I. -I/home/patrick/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/patrick/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/makeAxialMesh.o
mkdir: cannot create directory `/home/patrick/OpenFOAM/patrick-1.6/applications': Permission denied
make: *** [/home/patrick/OpenFOAM/patrick-1.6/applications/bin/linuxGccDPOpt/makeAxialMesh] Error 1
++ echo -ne '\033]0;patrick@patrick-laptop: ~/OpenFOAM/OpenFOAM-1.6/applications/utilities/mesh/manipulation/makeAxialMesh\007'

I am pretty sure I am doing something wrong. Your help will be greatly appreciated. Also, is there any other way for creating axi-sym meshes in OpenFOAM or importing them from Gambit ?

gschaider February 25, 2010 09:09

Quote:

Originally Posted by will_avoid_comm_solvers (Post 247285)
Greetings group members

I was trying to compile the makeAxialMesh utility and use it for generating an axi-symmetric mesh. I untarred the .gz file at this location
$HOME/OpenFOAM-1.6/applications/utilities/mesh//manipulation

Then i typed wmake in the command prompt. I am getting the following error

SOURCE=makeAxialMesh.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/patrick/OpenFOAM/OpenFOAM-1.6/src/dynamicMesh/lnInclude -I/home/patrick/OpenFOAM/OpenFOAM-1.6/src/cfdTools/lnInclude -I/home/patrick/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -IlnInclude -I. -I/home/patrick/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/patrick/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/makeAxialMesh.o
mkdir: cannot create directory `/home/patrick/OpenFOAM/patrick-1.6/applications': Permission denied
make: *** [/home/patrick/OpenFOAM/patrick-1.6/applications/bin/linuxGccDPOpt/makeAxialMesh] Error 1
++ echo -ne '\033]0;patrick@patrick-laptop: ~/OpenFOAM/OpenFOAM-1.6/applications/utilities/mesh/manipulation/makeAxialMesh\007'

I am pretty sure I am doing something wrong. Your help will be greatly appreciated. Also, is there any other way for creating axi-sym meshes in OpenFOAM or importing them from Gambit ?

You havn't compiled any utilities on that installation, have you (because that problem should occur with all of them). The problem is not with makeAxialMesh but with the permissions on your machine. You're not allowed to create the directory /home/patrick/OpenFOAM/patrick-1.6/applications (where the binary will be stored).
Bernhard

will_avoid_comm_solvers February 25, 2010 11:33

Thanks Bernhard

I tried compiling few of existing utilities in /manipulation folder like attachMesh, subsetMesh etc. It works fine. One thing i noticed is that in the error message
mkdir: cannot create directory `/home/patrick/OpenFOAM/patrick-1.6/applications': Permission denied

All my openFOAM fiels are in /home/patrick/openFOAM/OpenFOAM-1.6/ directory, not in OpenFOAM/patrick-1.6 directory.

I do not know why it is trying to create folders in a different path. Do I have to change any environment variables?

gschaider February 25, 2010 12:44

Quote:

Originally Posted by will_avoid_comm_solvers (Post 247456)
Thanks Bernhard

I tried compiling few of existing utilities in /manipulation folder like attachMesh, subsetMesh etc. It works fine. One thing i noticed is that in the error message
mkdir: cannot create directory `/home/patrick/OpenFOAM/patrick-1.6/applications': Permission denied

All my openFOAM fiels are in /home/patrick/openFOAM/OpenFOAM-1.6/ directory, not in OpenFOAM/patrick-1.6 directory.

I do not know why it is trying to create folders in a different path. Do I have to change any environment variables?

All the utilities you mentioned got to $FOAM_APPBIN (because they're part of the distro) whilst makeAxialMesh goes to $FOAM_USER_APPBIN. The fact that you can write $FOAM_APPBIN but not $FOAM_USER_APPBIN ist strange (usually it's supposed to be the other way round - only a privileged user should be able to write to $FOAM_APPBIN). Try "mkdir $FOAM_USER_APPBIN" and see why you're not allowed to create this. Probably you're not allowed to create $WM_PROJECT_USER_DIR, try to get that fixed otherwise you won't have much fun with non-distribution stuff
Bernhard

will_avoid_comm_solvers March 1, 2010 13:44

Thanks Bernhard
I was able to compile the makeAxialMesh utility. But I am getting a "floating point exception error" while running it. Here is the geometry i created using blockMesh

vertices
(
(0 0 -0.05)
(1 0 -0.05)
(1 1 -0.05)
(0 1 -0.05)
(0 0 0.05)
(1 0 0.05)
(1 1 0.05)
(0 1 0.05)
);

blocks
(
hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1)
);

edges
(
);

patches
(
wall side_wall
(
(3 7 6 2)
)
patch inlet
(
(0 4 7 3)
)
patch outlet
(
(2 6 5 1)
)
empty center_ax
(
(1 5 4 0)
)
empty frontAndBack
(
(0 3 2 1)
(4 5 6 7)
)
);

mergePatchPairs
(
);

Mesh was created succesfully. checkMesh gives no error. Here is the copy of the Boundary file.

5
(
side_wall
{
type wall;
nFaces 20;
startFace 760;
}
inlet
{
type patch;
nFaces 20;
startFace 780;
}
outlet
{
type patch;
nFaces 20;
startFace 800;
}
center_ax
{
type empty;
nFaces 20;
startFace 820;
}
frontAndBack
{
type empty;
nFaces 800;
startFace 840;
}
)

I changed the type for FrontAndBack from "Empty" to "Wedge". Then i ran the makeAxialMesh ("makeAxialMesh center_ax frontAndBack") I get this error

Build : 1.6-f802ff2d6c5a
Exec : makeAxialMesh center_ax frontAndBack
Date : Mar 01 2010
Time : 13:42:18
Host : crop-l.dese-lab.fda.gov
PID : 23132
Case : /home/pyh8/OpenFOAM/pyh8-1.6/cavity
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0
#0 Foam::error::printStack(Foam::Ostream&) in "/home/pyh8/OpenFOAM/OpenFOAM-1.6
/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/pyh8/OpenFOAM/OpenFOAM-1.6/lib/li
nux64GccDPOpt/libOpenFOAM.so"
#2 __restore_rt at sigaction.c:0
#3 Foam::wedgePolyPatch::initTransforms() in "/home/pyh8/OpenFOAM/OpenFOAM-1.6/
lib/linux64GccDPOpt/libOpenFOAM.so"
#4 Foam::wedgePolyPatch::wedgePolyPatch(Foam::word const&, Foam::dictionary con
st&, int, Foam::polyBoundaryMesh const&) in "/home/pyh8/OpenFOAM/OpenFOAM-1.6/li
b/linux64GccDPOpt/libOpenFOAM.so"
#5 Foam::polyPatch::adddictionaryConstructorToTable<F oam::wedgePolyPatch>::New(
Foam::word const&, Foam::dictionary const&, int, Foam::polyBoundaryMesh const&)
in "/home/pyh8/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#6 Foam::polyPatch::New(Foam::word const&, Foam::dictionary const&, int, Foam::
polyBoundaryMesh const&) in "/home/pyh8/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOp
t/libOpenFOAM.so"
#7 Foam::polyBoundaryMesh::polyBoundaryMesh(Foam::IOo bject const&, Foam::polyMe
sh const&) in "/home/pyh8/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.
so"
#8 Foam::polyMesh::polyMesh(Foam::IOobject const&) in "/home/pyh8/OpenFOAM/Open
FOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#9 main in "/home/pyh8/OpenFOAM/pyh8-1.6/applications/bin/linux64GccDPOpt/makeA
xialMesh"
#10 __libc_start_main in "/lib64/libc.so.6"
#11 __gxx_personality_v0 in "/home/pyh8/OpenFOAM/pyh8-1.6/applications/bin/linu
x64GccDPOpt/makeAxialMesh"
Floating point exception



I am not sure what this means

Thanks
Patrick


gschaider March 2, 2010 12:57

Quote:

Originally Posted by will_avoid_comm_solvers (Post 247970)
Thanks Bernhard
I was able to compile the makeAxialMesh utility. But I am getting a &quot;floating point exception error&quot; while running it. Here is the geometry i created using blockMesh

I changed the type for FrontAndBack from &quot;Empty&quot; to &quot;Wedge&quot;. Then i ran the makeAxialMesh (&quot;makeAxialMesh center_ax frontAndBack&quot;) I get this error

You don't have to change that. The utility does that for you. Try again without changing (haven't got the time to reproduce the error, but I think this might be the problem)
Bernhard

bruxellois4 July 14, 2010 23:24

Dear Bernhard,

I untarred the .gz file at this location

/opt/openfoam170/applications/utilities/mesh/manipulation

and when i try wmake i have this message

akeAxialMesh/makeAxialMesh$ wmake
mkdir: ne peut créer le répertoire `linuxGccDPOpt': Permission non accordée
/bin/sh: cannot create linuxGccDPOpt/options: Directory nonexistent
make: *** [linuxGccDPOpt/options] Erreur 2
/opt/openfoam170/wmake/MakefileFiles:39: linuxGccDPOpt/options: Aucun fichier ou dossier de ce type
make: *** Pas de règle pour fabriquer la cible « linuxGccDPOpt/options ». Arrêt.
wmake error: file 'Make/linuxGccDPOpt/objectFiles' could not be created.

Can you help me please!

Thanks!

Abdel

gschaider July 15, 2010 03:43

Quote:

Originally Posted by bruxellois4 (Post 267343)
Dear Bernhard,

I untarred the .gz file at this location

/opt/openfoam170/applications/utilities/mesh/manipulation

and when i try wmake i have this message

akeAxialMesh/makeAxialMesh$ wmake
mkdir: ne peut créer le répertoire `linuxGccDPOpt': Permission non accordée
/bin/sh: cannot create linuxGccDPOpt/options: Directory nonexistent
make: *** [linuxGccDPOpt/options] Erreur 2
/opt/openfoam170/wmake/MakefileFiles:39: linuxGccDPOpt/options: Aucun fichier ou dossier de ce type
make: *** Pas de règle pour fabriquer la cible « linuxGccDPOpt/options ». Arrêt.
wmake error: file 'Make/linuxGccDPOpt/objectFiles' could not be created.

Can you help me please!

Thanks!

Abdel

This is neither a problem with makeAxialMesh nor with OpenFOAM. You're trying to compile MAM in a place where you don't have write permissions.

I havn't tried MAM on 1.7 yet, but as it works with 1.6 I don't see why it shouldn't work

Bernhard

bruxellois4 July 15, 2010 10:09

Quote:

Originally Posted by gschaider (Post 267372)
This is neither a problem with makeAxialMesh nor with OpenFOAM. You're trying to compile MAM in a place where you don't have write permissions.

I havn't tried MAM on 1.7 yet, but as it works with 1.6 I don't see why it shouldn't work

Bernhard

If you don!t mind i've uploaded my case here http://www.4shared.com/file/Q3iXd22B/testtar.html
and i did as it is mentioned in openfoamwiki for makeAxialMesh, could you please apply the makeAxialMesh to it i really need that.

thanks

Abdel

bruxellois4 July 15, 2010 16:26

Dear Bernhard,

i've tried the same thing with openFoam1.6 but if i usde

./Allwmake

i got this message : ./Allwmake : 1: wmake not found

Any idea please.

gschaider July 16, 2010 05:13

Quote:

Originally Posted by bruxellois4 (Post 267531)
Dear Bernhard,

i've tried the same thing with openFoam1.6 but if i usde

./Allwmake

i got this message : ./Allwmake : 1: wmake not found

Any idea please.

If wmake is not found, then this is a pure problem with your OF-installation

mvoss February 17, 2011 09:05

hi,

what is the FOAM_DEV_OPTION good for?

neewbie

gschaider February 18, 2011 06:56

Quote:

Originally Posted by neewbie (Post 295722)
hi,

what is the FOAM_DEV_OPTION good for?

neewbie

A little bit more context would make it easier to answer such a question. Like "that is defined in Make/options" (I was tempted not to answer because if I need more time to UNDERSTAND the question than it took the asker to research/formulate the question, then I usually don't bother)

That option is needed so that the sources work with the OpenCFD-release as well as with the 1.5-dev/1.6-ext because they differ in the way meshes are manipulated.

mvoss February 18, 2011 07:30

sorry...
you´re right about the context, i should have added that.
the $(FOAM_DEV_OPTION) is in the the sources/Make/options-file of makeAxialMesh

what i did:
-tried to compile it against 1.6-ext
-->fatal error: repatch.H is missing
-against 1.6-ext without the FOAM_DEV_OPTION
--> fatal error: repatchPolyTopoChanger is missing
-give the absolute path to repatchPolyTopoChanger without the FOAM_DEV_OPTION
-->compiled and working without errors.

Since i know now that the FOAM_DEV_OPTION is for making the tool working with the different OF-distr. and i changed paths concerning that exact matter i know that there is smth. wrong on my side ... even if the tool is working now.

btw. echo $FOAM_DEV is giving 1 .... ???? that means smth. is wrong with my system/OF-variables ??!!

Thanks for the advice and the explanation of the FOAM_DEV option.

neewbie

gschaider February 18, 2011 09:25

Quote:

Originally Posted by neewbie (Post 295913)
sorry...
you´re right about the context, i should have added that.
the $(FOAM_DEV_OPTION) is in the the sources/Make/options-file of makeAxialMesh

what i did:
-tried to compile it against 1.6-ext
-->fatal error: repatch.H is missing
-against 1.6-ext without the FOAM_DEV_OPTION
--> fatal error: repatchPolyTopoChanger is missing
-give the absolute path to repatchPolyTopoChanger without the FOAM_DEV_OPTION
-->compiled and working without errors.

Since i know now that the FOAM_DEV_OPTION is for making the tool working with the different OF-distr. and i changed paths concerning that exact matter i know that there is smth. wrong on my side ... even if the tool is working now.

btw. echo $FOAM_DEV is giving 1 .... ???? that means smth. is wrong with my system/OF-variables ??!!

Thanks for the advice and the explanation of the FOAM_DEV option.

neewbie

I THINK (can't verify that right now) the problem is that I havn't compiled it with 1.6-ext yet and in 1.6-ext some stuff concerning mesh-motion was moved to a different directory

Bernhard

schmidt_d November 8, 2011 10:19

changes compilation with OF1.6-ext
 
All:

I haven't looked at the source code for makeAxialMesh in a long time, but it looks like the issue is with the names (not just locations) of the header files changing. I just did a git pull this morning (Nov. 8th) of 1.6-ext and there is no repatch.H anywhere that I can see.

Here are the changes to makeAxialMesh/ that allow compilation (as generated by svn diff). Note that I turned off the FOAM_DEV option.

Index: makeAxialMesh.C
================================================== =================
--- makeAxialMesh.C (revision 1921)
+++ makeAxialMesh.C (working copy)
@@ -51,7 +51,7 @@
#include "argList.H"
#include "Time.H"
#ifdef FOAM_DEV
-#include "repatch.H"
+#include "repatchPolyTopoChanger.H"
#else
#include "repatchPolyTopoChanger.H"
#endif
Index: Make/options
================================================== =================
--- Make/options (revision 1921)
+++ Make/options (working copy)
@@ -1,12 +1,13 @@
-ifdef FOAM_DEV
-FOAM_DEV_OPTION = -DFOAM_DEV
-endif
+//ifdef FOAM_DEV
+//FOAM_DEV_OPTION = -DFOAM_DEV
+//endif

EXE_INC = \
$(FOAM_DEV_OPTION) \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/cfdTools/lnInclude\
- -I$(LIB_SRC)/meshTools/lnInclude
+ -I$(LIB_SRC)/meshTools/lnInclude\
+ -I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude

EXE_LIBS = \
-ldynamicMesh \

With those changes, it worked for me.
-David

Masgar October 20, 2014 11:20

Problem with installation of makeAxialMesh on OF 1.6 ext
 
Dear foamers,

I tried to install makeAxialMesh on OF-1.6-ext to have axisymmetric mesh, but there is an error in the process of making "makeAxialMesh":

user-1.6-ext//applications/bin/linux64GccDPOpt/makeAxialMesh/usr/bin/ld: cannot find -liberty

Could you please guide me if you have any experience with such an error?

Thanks and Best,
Mahdi

gschaider October 20, 2014 13:10

Quote:

Originally Posted by Masgar (Post 515190)
Dear foamers,

I tried to install makeAxialMesh on OF-1.6-ext to have axisymmetric mesh, but there is an error in the process of making "makeAxialMesh":

user-1.6-ext//applications/bin/linux64GccDPOpt/makeAxialMesh/usr/bin/ld: cannot find -liberty

Could you please guide me if you have any experience with such an error?

Thanks and Best,
Mahdi

Your system is missing a library called libiberty.so
Don't know which package installs that. Google for it and then install that package

Masgar October 20, 2014 17:49

Quote:

Originally Posted by gschaider (Post 515201)
Your system is missing a library called libiberty.so
Don't know which package installs that. Google for it and then install that package


Thanks a lot Bernhard for the reply.
I checked for the package, it is mentioned to be "benutlis-dev" or "gcc", but when I tried to install them, it turned out they are both already installed!

I am using Ubuntu 14.04, if it affects the installation procedure.

I would be grateful to have your opinion in this regard,
Best,
Mahdi

gschaider October 21, 2014 04:40

Quote:

Originally Posted by Masgar (Post 515245)
Thanks a lot Bernhard for the reply.
I checked for the package, it is mentioned to be "benutlis-dev" or "gcc", but when I tried to install them, it turned out they are both already installed!

I am using Ubuntu 14.04, if it affects the installation procedure.

I would be grateful to have your opinion in this regard,
Best,
Mahdi

I HAVE an opinion concerning Ubuntu but you won't be grateful to hear it ;)

Seriously: I have no Ubuntu so I can't help you there. Wonder how anything got compiled on your machine without that library


All times are GMT -4. The time now is 12:44.