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

ParMETIS and gcc-4.4

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 8, 2009, 17:05
Default ParMETIS and gcc-4.4
  #1
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 185
Rep Power: 8
podallaire is on a distinguished road
HI,

does anybody is having issue withParMETIS and gcc-4.4 / I'm getting this when
trying to compile the lib :

node_refine.c: In function 'KWayNodeRefine__':
node_refine.c:355: warning: implicit declaration of function 'GKfree__'
cc1(36085) malloc: *** error for object 0x140d52750: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
node_refine.c:114: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

I know that some fixes were pushed to 1.6.x in order to use gcc-4.4 / I'm just not sure if the problem is with the compiler or the lib

Thanks

PO
podallaire is offline   Reply With Quote

Old   December 10, 2009, 05:03
Default
  #2
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
This looks like a problem in your compiler. I do not see any problems compiling with either 4.4 or 4.3. (the 'implicit declaration' warning I do get though)
mattijs is offline   Reply With Quote

Old   December 11, 2009, 10:13
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,318
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings,

Could also have been a problem with the downloaded ThirdParty package or bad unpacking... it tends to happen often enough
Do:
Code:
md5sum ThirdParty-1.6.General.gtgz
And compare with the value indicated on OpenCFD's download page.

By the way, Mattijs can you (or someone else at OpenCFD) add the md5sum instructions to the download page, just prior to the tar instructions? It could help reduce some of these false positives!

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   December 11, 2009, 13:45
Default
  #4
Senior Member
 
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 185
Rep Power: 8
podallaire is on a distinguished road
Thanks for your suggestions / I checked and my package is fine.

Well, for some reason, my gcc 4.4 and 4.5 don't build the lib properly while 4.3 does not complaint about it. I guess I will stick to 4.3 for now.

Regards,

PO
podallaire is offline   Reply With Quote

Old   December 11, 2009, 14:10
Default
  #5
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,318
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Uhm... now that I've re-read the first post, it reminded me that I also have had one of those issues. The two solutions I've used are:
  1. As for the implicit declaration, try this: edit the files "$WM_THIRD_PARTY_DIR/ParMetis-3.1/ParMETISLib/proto.h" and "$WM_THIRD_PARTY_DIR/ParMetis-3.1/METISLib/proto.h" and remove the comments from
    Code:
    /*void GKfree(void **,...); */
    I had to do this months ago to get it to cross-compile with MinGW.
  2. If the other issue persists, try downloading this package and retrieve the gcc folder from it; it has gcc-4.4.2 pre-release. It's from the MinGW-w64 project and has worked well for me, both in compiling for Linux (32 and 64bit) as well as creating the cross-compiler Mingw-w32/64 Linux to Windows.

The script I use for building the gcc-4.4.2 (and gcc-4.5.0), modified from the makeGcc that comes with the ThirdParty package, is this:
Code:
#---------------------------------*- sh -*-------------------------------------
# =========                 |
# \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
#  \\    /   O peration     |
#   \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
#    \\/     M anipulation  |
#------------------------------------------------------------------------------
# License
#     This file is part of OpenFOAM.
#
#     OpenFOAM is free software; you can redistribute it and/or modify it
#     under the terms of the GNU General Public License as published by the
#     Free Software Foundation; either version 2 of the License, or (at your
#     option) any later version.
#
#     OpenFOAM 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 General Public License
#     for more details.
#
#     You should have received a copy of the GNU General Public License
#     along with OpenFOAM; if not, write to the Free Software Foundation,
#     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# Script
#     makeGcc44
#
# Description
#     Build script for gmp, mpfr and gcc-4.3.? and gcc-4.4.?
#
#------------------------------------------------------------------------------
usage() {
    while [ "$#" -ge 1 ]; do echo "$1"; shift; done
    cat<<USAGE

usage: ${0##*/} <gcc-4.?.?> ...

* build gmp, mpfr and gcc-4.3.? and gcc-4.4.?

USAGE
    exit 1
}

if [ $# -ne 1 ]
then
    usage "gcc version not provided"
fi


#
# Set the number of cores to build on
#
WM_NCOMPPROCS=1

if [ -r /proc/cpuinfo ]
then
    WM_NCOMPPROCS=$(egrep "^processor" /proc/cpuinfo | wc -l)
    [ $WM_NCOMPPROCS -le 8 ] || WM_NCOMPPROCS=8
fi

echo "Building on " $WM_NCOMPPROCS " cores"

GCC_DIR=$WM_THIRD_PARTY_DIR/$1

GCCROOT=${GCC_DIR}/platforms/$WM_ARCH$WM_COMPILER$WM_COMPILER_ARCH

#
# Build GCC
#
if [ ! -d $GCCROOT ]
then
    (
       if [ ! -d "$GCC_DIR/build" ]; then mkdir $GCC_DIR/build; fi \
    && cd $GCC_DIR/build \
    && if [ -e Makefile ]; then make distclean; fi \
    && ../configure --enable-languages=c,c++ --with-pkgversion='OpenFOAM' \
      --enable-__cxa_atexit --enable-libstdcxx-allocator=new \
      --prefix=$GCCROOT \
    && make -j $WM_NCOMPPROCS \
    && make install
    )
    echo "    Finished building gcc."
else
    echo "    gcc already built."
fi

# ----------------------------------------------------------------- end-of-file
Sorry for not attaching it in a file, but I didn't feel like tar.gz'ing it.

Good luck! Hope it works.
Bruno
wyldckat is offline   Reply With Quote

Reply

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



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