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

[snappyHexMesh] Can't use snappyHexMesh

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 20, 2014, 05:08
Default Can't use snappyHexMesh
  #1
New Member
 
WangShuai
Join Date: Apr 2014
Location: Harbin(China)
Posts: 8
Rep Power: 12
npel is on a distinguished road
HI:
I'm new to OpenFOAM, and after installing 2.3.0, I followed the cases listed in the User's Guide, I didn't encounter any problem until trying to use snappyHexMesh, it reports an error:
snappyHexMesh: error while loading shared libraries: libptscotch.so: cannot open shared object file: No such file or directory.
What should I do to solve this problem? Can anyone help me
npel is offline   Reply With Quote

Old   April 20, 2014, 07:11
Default
  #2
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 npel,

Please indicate which installation instructions you've followed and which Linux Distribution you are using.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 20, 2014, 07:56
Default
  #3
New Member
 
WangShuai
Join Date: Apr 2014
Location: Harbin(China)
Posts: 8
Rep Power: 12
npel is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings npel,

Please indicate which installation instructions you've followed and which Linux Distribution you are using.

Best regards,
Bruno
Hi, I use OpenSUSE 13.1 and the instructions i followed is from http://openfoamwiki.net/index.php/In...2.3.0/openSUSE, i think that the installation is ok, it won't report error unless I tried to use snappHexMesh.
npel is offline   Reply With Quote

Old   April 20, 2014, 09:16
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
Mmm... OK, my guess is that you haven't logged out yet (it's explained in step #4 ). Try these commands, before running snappyHexMesh again:
Code:
source /etc/profile.d/mpi-selector.sh
of230
And which tutorial case are you running? More specifically, is snappyHexMesh being launched in parallel?
wyldckat is offline   Reply With Quote

Old   April 20, 2014, 09:35
Default
  #5
New Member
 
WangShuai
Join Date: Apr 2014
Location: Harbin(China)
Posts: 8
Rep Power: 12
npel is on a distinguished road
It seems that it doesn't matter with which case I'm running, each time when I type 'snappyHexMesh' in the terminal, it reported the error, and I tried the methods you have just said, but it doesn't work. I'm wondering why can't it load the shared object file 'libptscotch.so'?
npel is offline   Reply With Quote

Old   April 20, 2014, 14:58
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 npel,

According to the installation I have, which was used for testing those instructions, if you run the following command:
Code:
ldd $(which snappyHexMesh) | grep ptscotch
It should give you something like this:
Code:
    libptscotchDecomp.so => /home/ofuser/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/openmpi-system/libptscotchDecomp.so (0x00007f449bb17000)
    libptscotch.so => /home/ofuser/OpenFOAM/ThirdParty-2.3.0/platforms/linux64GccDPOpt/lib/openmpi-system/libptscotch.so (0x00007f449862d000)
    libptscotcherrexit.so => /home/ofuser/OpenFOAM/ThirdParty-2.3.0/platforms/linux64GccDPOpt/lib/openmpi-system/libptscotcherrexit.so (0x00007f449842a000)
If you run the following commands, they should give you identical outputs:
Code:
echo $HOME/OpenFOAM/ThirdParty-2.3.0/platforms/linux64GccDPOpt/lib/openmpi-system
echo $FOAM_EXT_LIBBIN/$FOAM_MPI
This is assuming you're using the 64 bit version. If the two outputs are identical, then run:
Code:
ls -A1 $FOAM_EXT_LIBBIN/$FOAM_MPI
and it should give you this list:
Code:
libptscotcherrexit.so
libptscotcherr.so
libptscotchparmetis.so
libptscotch.so
libscotcherrexit.so
libscotcherr.so
libscotch.so
If it does not give you that list, then it's because something during the compilation/installation has failed.

By the way, what do the following commands give you?
Code:
which mpicc
echo $FOAM_MPI
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 22, 2014, 01:02
Default
  #7
New Member
 
WangShuai
Join Date: Apr 2014
Location: Harbin(China)
Posts: 8
Rep Power: 12
npel is on a distinguished road
Dear bruno
When i tried to ldd $(which snappyHexMesh) | grep ptscotch, I get nothing. Also there is nothing in directory $FOAM_EXT_LIBBIN/$FOAM_MPI. So I think that I might have done something wrong in my installation, then I recompiled the ThirdParty-2.3.0, after I recompiled the ThirdParty2.3.0, it showed a warning that 'required include file 'ptscotch.h' not found! '.
And then I found where I'm wrong, It's because that I didn't run of230 when I open a new terminal, If I do so, I can use snappyHexMesh normally.
But I added a line

source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc

in the end of file .bashrc too. Why do I have to run of230 each time when I opened a new Termianl? what caused the difference?
I'm still afraid that I might meet some other error since the 'required include file 'ptscotch.h' not found! '.
Thank you very much, you have down me a great favor!
npel is offline   Reply With Quote

Old   April 25, 2014, 19:10
Default
  #8
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 npel,

Ah, when it comes to OpenFOAM, every single detail, no matter how small, is very important!
In this case, the installation instructions on the wiki were designed to be somewhat generic and as bulletproof as possible. At least as long as people strictly follow the instructions.
And since the wiki provides instructions for installing several OpenFOAM versions, the objective has been to make it as easy as possible to have more than just one installation. This is why the alias of230 is indicated in the instructions, in order to allow to have more versions coexist.

In addition, there are a couple more settings you didn't notice, from step #6:
Code:
source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI
The last two code expressions, namely there two:
Code:
WM_NCOMPPROCS=4 WM_MPLIB=SYSTEMOPENMPI
help set-up some additional settings without the need to modify any files. If you add them to the end of the line that you created in your "~/.bashrc" file, things will work properly once again.


But I can understand what you mean. I gotta give some more thought into this, before changing the instructions once again.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 1, 2014, 06:03
Default Can't use snappyHexMesh
  #9
New Member
 
Víctor García Peñas
Join Date: May 2014
Posts: 3
Rep Power: 12
victor.garcia is on a distinguished road
Greeting Bruno and npel

I'm on a Ubuntu 14.04 installing OpenFOAM. I've followed this tutorial

http://www.openfoam.org/download/source.php

I set the environment variables with this line on $HOME/.bashrc

Code:
source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc
Also I can't use snappyHexMesh.

When I run the command:
Code:
ldd $(which snappyHexMesh) | grep ptscotch
I get:
Code:
    libptscotchDecomp.so => /home/victor/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/openmpi-1.6.5/libptscotchDecomp.so (0x00007fe80c722000)
    libptscotch.so => not found
    libptscotcherrexit.so => not found
If I run :
Code:
echo $FOAM_EXT_LIBBIN/$FOAM_MPI
I get:
Code:
/home/victor/OpenFOAM/ThirdParty-2.3.0/platforms/linux64GccDPOpt/lib/openmpi-1.6.5
When I run:
Code:
ls -A1 $FOAM_EXT_LIBBIN/$FOAM_MPI
I get:
Code:
ls: no se puede acceder a /home/victor/OpenFOAM/ThirdParty-2.3.0/platforms/linux64GccDPOpt/lib/openmpi-1.6.5: No existe el archivo o el directorio
The folder doesn't exist.

But If I run:
Code:
ls -A1 /home/victor/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/openmpi-1.6.5/
I get only:
Code:
libPstream.so
libptscotchDecomp.so
The same if I list the folder openmpi-system.

I don't know what I'm doing wrong! Last week I installed it on my laptop whitout problems.
victor.garcia is offline   Reply With Quote

Old   July 1, 2014, 08:38
Default
  #10
New Member
 
Víctor García Peñas
Join Date: May 2014
Posts: 3
Rep Power: 12
victor.garcia is on a distinguished road
I got it!

I add the lines:

source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc

alias of230='source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc WM_NCOMPPROCS=2 WM_MPLIB=SYSTEMOPENMPI'

to my $HOME/.bashrc and compiling OpenFOAM with Allwmake.

I hope this will be usefull!
victor.garcia is offline   Reply With Quote

Old   September 12, 2014, 10:45
Default
  #11
New Member
 
RM1358
Join Date: Sep 2014
Posts: 4
Rep Power: 0
roozbehmousavi is on a distinguished road
Quote:
Originally Posted by victor.garcia View Post
I got it!

I add the lines:

source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc

alias of230='source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc WM_NCOMPPROCS=2 WM_MPLIB=SYSTEMOPENMPI'

to my $HOME/.bashrc and compiling OpenFOAM with Allwmake.

I hope this will be usefull!
Hi victor.garcia,

I am rather beginner in Linux (UBUNTU 14). I have installed OpenFOAM and HELYX-OS successfully, but I received the same inconsistency error mentioned in the above discussions when I wanted to use SnappyHexaMesh in HELYX-OS, although I could run that cavity flow tutorial in OpenFOAM (not in HELYX-OS) successfully.

It seems that you have solved the problem. I could find that bashrc file in etc directory, but I do not know if I should add the lines,

source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc
alias of230='source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc WM_NCOMPPROCS=2 WM_MPLIB=SYSTEMOPENMPI'

at the end of this file, or I should write it in Linux terminal?! If in Linux Terminal, then in which directory I should be?

Thank you so much in advance.

P.S. What would be the best Linux for OpenFOAM calculations? I see people in discussing this error, always ask about the Linux type and it seems that UBUNTU is not the best. Am I right?
roozbehmousavi is offline   Reply With Quote

Old   September 14, 2014, 07:57
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 roozbehmousavi and welcome to the forum!

Please detail which installation instructions you've followed for installing OpenFOAM and Helyx-OS.
In addition, also indicate what more related steps have you done after installing those two, so that we can diagnose what might have gone wrong.

As for which Linux Distribution: the best distribution is usually the one you feel better with. In other words, it's a matter of taste and also depends for how long you're planning on using the installation.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   September 15, 2014, 06:10
Default
  #13
New Member
 
Víctor García Peñas
Join Date: May 2014
Posts: 3
Rep Power: 12
victor.garcia is on a distinguished road
Quote:
Originally Posted by roozbehmousavi View Post
Hi victor.garcia,

I am rather beginner in Linux (UBUNTU 14). I have installed OpenFOAM and HELYX-OS successfully, but I received the same inconsistency error mentioned in the above discussions when I wanted to use SnappyHexaMesh in HELYX-OS, although I could run that cavity flow tutorial in OpenFOAM (not in HELYX-OS) successfully.

It seems that you have solved the problem. I could find that bashrc file in etc directory, but I do not know if I should add the lines,

source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc
alias of230='source $HOME/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc WM_NCOMPPROCS=2 WM_MPLIB=SYSTEMOPENMPI'

at the end of this file, or I should write it in Linux terminal?! If in Linux Terminal, then in which directory I should be?

Thank you so much in advance.

P.S. What would be the best Linux for OpenFOAM calculations? I see people in discussing this error, always ask about the Linux type and it seems that UBUNTU is not the best. Am I right?

I put it at th en of this hidden file
Code:
/home/victor/.bashrc
victor.garcia is offline   Reply With Quote

Old   January 26, 2015, 06:04
Default helyx-os snappyhexmesh error
  #14
New Member
 
Rogaland
Join Date: Mar 2014
Posts: 4
Rep Power: 12
Javell is on a distinguished road
Hi!

I downloaded a scientific linux 6.6 package delievered by my university. The package includes openFoam 2.3.0. I installed helyx-os 2.2.0. When trying to run the "create mesh" command I get the error:

snappyHexMesh: error while loading shared libraries: libptscotch.so: cannot open shared object file: No such file or directory.

Any thoughts on how I can solve the given problem?
Javell is offline   Reply With Quote

Old   January 26, 2015, 16:38
Default
  #15
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
Quote:
Originally Posted by Javell View Post
Any thoughts on how I can solve the given problem?
Quick answer - Run the following command:
Code:
ls -A1 $FOAM_EXT_LIBBIN/*
and let us know what this gives you. Because it should list the files that have been built for using Scotch.
__________________
wyldckat is offline   Reply With Quote

Old   January 27, 2015, 07:40
Default
  #16
New Member
 
Rogaland
Join Date: Mar 2014
Posts: 4
Rep Power: 12
Javell is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer - Run the following command:
Code:
ls -A1 $FOAM_EXT_LIBBIN/*
and let us know what this gives you. Because it should list the files that have been built for using Scotch.
Thanks for quick reply. This is what I get.
Attached Files
File Type: txt text.txt (9.7 KB, 25 views)
Javell is offline   Reply With Quote

Old   January 27, 2015, 15:54
Default
  #17
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 Javell,

The bad news is that the output you've gotten indicates that you do not have OpenFOAM's custom "ptscotch" library available.

Were you able to decompose the case, namely by using decomposePar?
And if so, which decomposition method did you use?
Because if you used "scotch", then this means that your OpenFOAM installation is using a system based "libscotch.so" library, but the "libptscotch.so" version is not available.

Either way, the quickest solution is to use some other decomposition method, such as "simple" or "hierarchical".

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[CAD formats] Creating waterproof STL using snappyHexMesh or salome Tobi OpenFOAM Meshing & Mesh Conversion 58 May 13, 2020 07:01
[snappyHexMesh] Running snappyHexMesh in parallel - optimizing peterhess OpenFOAM Meshing & Mesh Conversion 2 January 3, 2018 03:54
[snappyHexMesh] Tutorial crashes: snappyHexMesh floating point exception. jasv OpenFOAM Meshing & Mesh Conversion 4 May 10, 2016 03:55
[snappyHexMesh] snappyhexmesh doesn't creat mesh in parallel issue? klausb OpenFOAM Meshing & Mesh Conversion 1 March 7, 2015 12:55
[snappyHexMesh] stitchMesh and snappyHexMesh gdbaldw OpenFOAM Meshing & Mesh Conversion 0 December 23, 2009 03:09


All times are GMT -4. The time now is 21:40.