CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > ANSYS Meshing & Geometry

[GAMBIT] Gambit works on Windows, but not in Linux

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

Like Tree2Likes
  • 1 Post By villager
  • 1 Post By Mojtaba.a

Reply
 
LinkBack Thread Tools Display Modes
Old   November 3, 2011, 07:54
Default Gambit works on Windows, but not in Linux
  #1
New Member
 
Join Date: Sep 2011
Posts: 17
Rep Power: 5
victorz is on a distinguished road
Hi all,

I installed Gambit on both Windows 7 and Linux (Red Hat 5.7) machines, with the Linux being the license server. When running Gambit on Windows, it starts and works perfectly. But when I'm starting it on the Linux machine, I get the following message:

-------------------------------------------
LANG en_US.UTF-8 changed temporarily to C for gambit use.
Starting /ansys_inc/v130/Gambit/Fluent.Inc/gambit2.4.6/lnx86/gambit ...
Gambit build SP2007051420.

Received exception: SIGSEGV (segmentation violation)

Please send the GAMBIT.20053/jou and GAMBIT.20053/trn files to your local
Fluent office or distributor. Also send a message including any
relevant errors or warnings you see above in this window. You may
wish to delete the temporary directory GAMBIT.20053 after sending the
above files.
ERROR: Please retain a copy of the GAMBIT.20053/jou, GAMBIT.20053/trn, and
GAMBIT.20053/*.dbs files, any imported geometry and any relevant
errors or warnings you see above in this window and contact
support at your local Fluent office or distributor.
Segmentation fault
---------------------------------------------

It's not an issue of the *.lok file, as I haven't worked on any geometry, but only started Gambit for the first time.

Any help will be appreciated!!

Victor.
victorz is offline   Reply With Quote

Old   November 20, 2011, 16:18
Default belowed((
  #2
Member
 
John M.
Join Date: Jul 2011
Posts: 57
Rep Power: 6
villager is on a distinguished road
I has such problem (the same error on trying to mesh the model) on every computer with Ubuntu too, except my home computer... It's a kind of magic no special things was done, except one: I have many-miles of packages installed on my home computer.

Many people asked similar question, but never found the answer, i guess.
for example, here
gambit fatal error
and, maybe, here, because author didn't report any further acknowledgment.
Fatal error in GAMBIT

It would be great, if somebody got it through.
villager is offline   Reply With Quote

Old   November 21, 2011, 02:15
Default
  #3
New Member
 
Join Date: Sep 2011
Posts: 17
Rep Power: 5
victorz is on a distinguished road
I solved the problem by installing a library that was missing (libXm.so.3 which is a part of openmotif) on my RedHat Linux machine. However, my issue was that I couldn't run Gambit at all, rather than having trouble during meshing or geometry changes.

I think that the Gambit (or ANSYS) experts are so "quiet" about these problems because they do not provide support any more, and suggest using other meshing programs, such as ICEM or ANSYS meshing.
victorz is offline   Reply With Quote

Old   March 23, 2013, 07:50
Default
  #4
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Zanjan, Iran
Posts: 233
Rep Power: 7
Mojtaba.a is on a distinguished road
Send a message via Yahoo to Mojtaba.a
Quote:
Originally Posted by victorz View Post
Hi all,

I installed Gambit on both Windows 7 and Linux (Red Hat 5.7) machines, with the Linux being the license server. When running Gambit on Windows, it starts and works perfectly. But when I'm starting it on the Linux machine, I get the following message:

-------------------------------------------
LANG en_US.UTF-8 changed temporarily to C for gambit use.
Starting /ansys_inc/v130/Gambit/Fluent.Inc/gambit2.4.6/lnx86/gambit ...
Gambit build SP2007051420.

Received exception: SIGSEGV (segmentation violation)

Please send the GAMBIT.20053/jou and GAMBIT.20053/trn files to your local
Fluent office or distributor. Also send a message including any
relevant errors or warnings you see above in this window. You may
wish to delete the temporary directory GAMBIT.20053 after sending the
above files.
ERROR: Please retain a copy of the GAMBIT.20053/jou, GAMBIT.20053/trn, and
GAMBIT.20053/*.dbs files, any imported geometry and any relevant
errors or warnings you see above in this window and contact
support at your local Fluent office or distributor.
Segmentation fault
---------------------------------------------

It's not an issue of the *.lok file, as I haven't worked on any geometry, but only started Gambit for the first time.

Any help will be appreciated!!

Victor.
Hi victor,
any luck solving this problem? I am facing the same issue. I can't mesh face or volume.
any suggestions will be appreciated !
Mojtaba.a is offline   Reply With Quote

Old   March 24, 2013, 06:25
Smile Detailed Suggestion
  #5
Member
 
John M.
Join Date: Jul 2011
Posts: 57
Rep Power: 6
villager is on a distinguished road
Good day. It seems like the problem is solved.
Part1.
Read this
gambit 2.3.16 on ubuntu 10.04

Still crashing?
Part2.
on Debian-like:
Code:
sudo apt-get install libc6-dev-i386
to get gnu/stubs-32.h
Different Linux? Reference to: Choose yours package with stubs-32

Create file memcpy_preload.c
Code:
/* Copyright (C) 2011, Aurelien Jarno <aurelien woof-woof aurel32 dot net>

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, write to the Free
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   02111-1307 USA.  */

#include <dlfcn.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <sys/time.h>

void *memcpy(void *dst, const void *src, size_t n)
{
#ifndef NOLOG
    uintptr_t usrc, udst;

    /* Convert to unsigned as arithmetic on pointer is undefined */ 
    udst = (uintptr_t) dst;
    usrc = (uintptr_t) src;

    /* Check if source and destination overlap */
    if (((udst < usrc) && ((udst + n) > usrc)) ||
        ((usrc < udst) && ((usrc + n) > udst))) {

        static time_t lastlog = -1;
        struct timeval tv;

        /* gettimeofday() is not expensive for the conditions we target in 
         * the Debian package (kernel >= 2.6.26, x86-64 architecture), this
         * might need to be changed if this wrapper is later needed with 
         * different conditions */
        gettimeofday(&tv, NULL);

        /* Don't spam syslog, limit to (roughly) one log entry per second. */
        if (tv.tv_sec > lastlog) {
            lastlog = tv.tv_sec;
            syslog(LOG_WARNING | LOG_USER, 
                   "source and destination overlap in memcpy() at ip %p",
           __builtin_return_address(0));
        }
    }
#endif 

    /* Call memmove() instead of memcpy() */
    return memmove(dst, src, n);
}
Compile memcpy_preload.c to .so with -m32:
Code:
gcc -D_GNU_SOURCE -DNOLOG -O2 -Wall -fPIC -shared -m32 -o memcpy_preload.so memcpy_preload.c
Of course, gcc, C compiler, must be installed on your Linux)

Run with
Code:
LD_PRELOAD=......../memcpy_preload.so ......../gambit -dev X11
you should write your paths to memcpy_preload.so (where you have compiled it) and to gambit (where it is located, e.g. ~/Fluent.Inc/bin/gambit)
Don't mind these lines during run
ERROR: ld.so: object '....../memcpy-preload.so' from LD_PRELOAD cannot be preloaded: ignored.

Originally this part of solution was provided on FedoraForum:
http://forums.fedoraforum.org/archiv.../t-256522.html
It perfectly works for me.
Mojtaba.a likes this.

Last edited by villager; March 27, 2013 at 04:59.
villager is offline   Reply With Quote

Old   March 24, 2013, 07:27
Default
  #6
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Zanjan, Iran
Posts: 233
Rep Power: 7
Mojtaba.a is on a distinguished road
Send a message via Yahoo to Mojtaba.a
Quote:
Originally Posted by villager View Post
Good day. It seems like the problem is solved.
...
Problem Solved Victor !
Complete procedure and awesome
Thank you very much.
victorz likes this.
Mojtaba.a is offline   Reply With Quote

Old   April 14, 2013, 12:50
Default hi
  #7
New Member
 
Sad Debbahi
Join Date: Oct 2010
Posts: 24
Rep Power: 6
QBeast is on a distinguished road
Send a message via Yahoo to QBeast
hi guys

you're all lucky guys having that rare linux 64/32 version of gambit I'm switching all the time between windows(meshing with gambit 2.3.16 win version) then loading the mesh in fluent 6.3.26 on linux since fluent runs smoothly on linux 64.... I wish I had a linux version of gambit for my final project, help please.

best regards,
QBeast is offline   Reply With Quote

Old   April 14, 2013, 18:32
Default hi
  #8
New Member
 
Sad Debbahi
Join Date: Oct 2010
Posts: 24
Rep Power: 6
QBeast is on a distinguished road
Send a message via Yahoo to QBeast
hi guys

I followed the fix brought to us by Villager, but no way to get it working on gentoo 64 bit, actually I did compile the memcpy_source.c and added the LD_preload directive, it still cash with that ver same error message displaying a popup message box on say that gambit cannot continue.... here is the terminal's output:

$ gambit -dev x11
LANG en_US.UTF-8 changed temporarily to en_US for gambit use.
Starting /home/unleashed/Fluent.Inc/gambit2.4.6/lnamd64/gambit -device x11...
ERROR: ld.so: object 'memcpy-preload-64.so' from LD_PRELOAD cannot be preloaded: ignored.
Gambit build SP2007051420.
Using X_DEVICE_DRIVER with standard visual.
Received X Intrinsics Warning <Cannot convert string "-adobe-helvetica-medium-r-normal-*-*-120-75-75-*-*-*" to type FontStruct>.
Received X Intrinsics Warning <Cannot convert string "-adobe-helvetica-bold-r-normal-*-*-120-75-75-*-*-*" to type FontStruct>.
Received X Intrinsics Warning <Cannot convert string "-adobe-helvetica-bold-r-normal-*-*-120-*-*-*-*-*" to type FontStruct>.
Received X Intrinsics Warning <Cannot convert string "-adobe-courier-medium-r-normal-*-*-120-*-*-*-*-*" to type FontStruct>.
Received X Intrinsics Warning <Cannot convert string "-adobe-courier-medium-r-normal-*-*-120-75-75-*-*-*" to type FontStruct>.
Received X Intrinsics Warning <Cannot convert string "-adobe-helvetica-medium-r-normal-*-*-120-*-*-*-*-*" to type FontStruct>.

Received exception: SIGSEGV (segmentation violation)

Please send the GAMBIT.32409/jou and GAMBIT.32409/trn files to your local
Fluent office or distributor. Also send a message including any
relevant errors or warnings you see above in this window. You may
wish to delete the temporary directory GAMBIT.32409 after sending the
above files.


this error occurs in a systematic way when I try to mesh geometry or import a mesh file

I compiled the memcpy source once with the -m32 flag and then without since I have 64 bit one, I taught it was an architecture issue???

please help me out, this's what I call a CFD nightmare

Last edited by QBeast; April 14, 2013 at 20:32.
QBeast is offline   Reply With Quote

Old   April 14, 2013, 20:40
Default It finally worked
  #9
New Member
 
Sad Debbahi
Join Date: Oct 2010
Posts: 24
Rep Power: 6
QBeast is on a distinguished road
Send a message via Yahoo to QBeast
the fix works on gentoo 64 bit, it needs some fonts as with ubuntu
for gentoo it's adobe 75dpi and 100dpi :

compiled the source memcpy-preload.c given by villager without the -m32 flag. it works, gentoo is likely to include prerequisite headers, they were already there on mine:

Code:
$gcc -D_GNU_SOURCE -DNOLOG -O2 -Wall -fPIC -shared -o memcpy-preload-64.so memcpy-preload.c
Code:
#emerge x11-libs/motif
#ln -s /usr/lib/libXm.so.4 /usr/lib/libXm.so.3
#cp memcpy-preload-64.so /usr/lib64
# emerge media-fonts/font-adobe-75dpi media-fonts/font-adobe-100dpi

then went here:

http://en.gentoo-wiki.com/wiki/X.Org/Fonts

and got the files settings section pasted in /etc/X11/xorg.conf file :

Code:
# **********************************************************************
# Files section.  This allows default font and rgb paths to be set
# **********************************************************************

Section "Files"

# The location of the RGB database.  Note, this is the name of the
# file minus the extension (like ".txt" or ".db").  There is normally
# no need to change the default.

#    RgbPath	"/usr/share/X11/rgb"

# Multiple FontPath entries are allowed (which are concatenated together),
# as well as specifying multiple comma-separated entries in one FontPath
# command (or a combination of both methods)
# 
# 

    FontPath   "/usr/share/fonts/misc/"
#    FontPath   "/usr/share/fonts/TTF/"
#    FontPath   "/usr/share/fonts/OTF"
     FontPath   "/usr/share/fonts/Type1/"
     FontPath   "/usr/share/fonts/100dpi/"
     FontPath   "/usr/share/fonts/75dpi/"
#    FontPath   "/usr/lib/X11/fonts/local/"
#    FontPath   "/usr/lib/X11/fonts/misc/"
#    FontPath   "/usr/lib/X11/fonts/75dpi/:unscaled"
#    FontPath   "/usr/lib/X11/fonts/100dpi/:unscaled"
#    FontPath   "/usr/lib/X11/fonts/Speedo/"
#    FontPath   "/usr/lib/X11/fonts/Type1/"
#    FontPath   "/usr/lib/X11/fonts/TrueType/"
#    FontPath   "/usr/lib/X11/fonts/freefont/"
#    FontPath   "/usr/lib/X11/fonts/75dpi/"
#    FontPath   "/usr/lib/X11/fonts/100dpi/"

# The module search path.  The default path is shown here.

#    ModulePath "/usr/lib/modules"

EndSection
created the /etc/profile.d/gambit.sh

Quote:
export FLUENT_ARCH=lnamd64
export PATH=$PATH:/home/user/Fluent.Inc/bin
export LD_PRELOAD=memcpy-preload-64.so
export LD_LIBRARY_PATH=/usr/lib64



then su:

Code:
#env-update
#source /etc/profile
restart the system

Quote:
$gambit

LANG en_US.UTF-8 changed temporarily to en_US for gambit use.
Starting /home/unleashed/Fluent.Inc/gambit2.4.6/lnamd64/gambit ...
ERROR: ld.so: object 'memcpy-preload-64.so' from LD_PRELOAD cannot be preloaded: ignored.
Gambit build SP2007051420.
VisualID: 39
class: 4
depth: 24
bits_per_rbg: 8
map_entries: 256
Using OPENGL_DEVICE_DRIVER with no standard visual.
Starting exec /home/unleashed/Fluent.Inc/utility/fe2ram4.3/lnamd64/fe2ram.4.3.17 -m1e-06 -d3 -tRAMPANT -oFIDAP7 /home/unleashed/msh/ppf360k.msh

RAMPANT file to FIDAP7 file

Read 376326 nodes, 360000 elements, 7 groups.
360000 hex elements

merged 0 nodes (376326 remain)Total of 175.44 cpu second(s), 3145325856 maximum memory.
used all 3gb memory for 9216000 cells poiseuille channel

Great thanks to all of you, special thanks to Mojtaba.a, thanks Villager.
QBeast is offline   Reply With Quote

Reply

Tags
gambit, linux, meshing, windows

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
Windows to Linux => END problems... zboud CFX 4 February 4, 2010 17:53
Cross-compiling OpenFOAM 1.6 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 7 January 19, 2010 16:39
Is the fluent mesh generate in windows can be used in linux? panda60 OpenFOAM 7 October 19, 2009 11:51
UDF error from Windows to Linux manu FLUENT 3 January 10, 2008 05:02
loading FLUENT 6.2 and GAMBIT on Red Hat LINUX Kiran FLUENT 1 October 16, 2007 09:12


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