[Gfs-users] Gerris with hypre

232 views
Skip to first unread message

Marie-Jean Thoraval

unread,
Oct 4, 2011, 4:42:22 AM10/4/11
to GFS users discussion list
Dear all,

I have some problems to get Gerris with hypre.
I am on Fedora 11. If I try to search for hypre in the software manager, it doesn't find anything. Therefore, I am installing from the tarball.
I have installed hypre locally in the same folder as gerris (/home/thoravml/local).
However, when I do the configure for Gerris, it cannot find hypre:
"Configuration summary

  System            = x86_64-unknown-linux-gnu
  C   Compiler      = mpicc
  C   Flags         = -g -O2 -Wall -Werror-implicit-function-declaration -Wmissing-prototypes -Wmissing-declarations -pipe -std=c99 -D_XOPEN_SOURCE=500
  MPI enabled       = yes
  GModule support   = yes
  pkg-config        = yes
  gawk              = yes
  m4                = yes

Modules

  map               = yes
  tide              = yes
  stokes            = yes
  wavewatch         = no
  hypre             = no
  lis               = no
  agmg              = no
  ode               = yes
  bubbles           = yes
  fft               = yes"

Is it a problem with the installation of hypre or with Gerris to find hypre?
I saw that Jose had some problems also with the tarball installation (https://groups.google.com/group/gerris-users/browse_thread/thread/61850dacd4981d5/7a01f434f2f964d4?hl=en&lnk=gst&q=hypre#7a01f434f2f964d4).

I would like to install it also on a cluster. It is possible to load the module hypre, but Gerris cannot find it. Should I add something so that Gerris can find hypre?

Thanks and regards,
Marie-Jean.

--
Marie-Jean Thoraval
PhD student, Physical Sciences and Engineering
King Abdullah University of Science and Technology
Jeddah, Saudi Arabia
+966 2 808 21 61
+966 5 67 79 08 33
http://www.carva.org/marie-jean.thoraval

Stephane Popinet

unread,
Oct 4, 2011, 5:22:09 AM10/4/11
to GFS users discussion list
Hi Marie-Jean,

Try to have a look in config.log for more details on why hypre cannot
be found (look for the 'hypre' string within the file).

I suspect this is because hypre is not dynamically linked by default
when using the tarballs. This is complicated to fix if you don't know
what you are doing. You should ask for help on the hypre mailing
lists.

cheers

Stephane

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Gfs-users mailing list
Gfs-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gfs-users

Jose M. López-Herrera Sánchez

unread,
Oct 4, 2011, 6:09:52 AM10/4/11
to GFS users discussion list
Hi Marie-Jean,

I had the same problem with Ubuntu. I do not know your system but in the case of Ubuntu, Daniel Fuster gave me the good tip to solve it: to use the synaptic package manager (libhypre-dev) rather than the sources.

In Ubuntu, installing using synaptic has no problem as you pointed out except that together with libhypre-dev it installs a crappy version of mpi that causes in turn a crappy Gerris installation. To avoid problems I have found it is better to follow this order:

1.-  sudo apt-get install openmpi-bin openmpi-dev
2.- using synaptic install libhypre-dev

and then as Daniel suggested:

make clean
./configure ... (or sh autogen ...)
make && make install


Cheers

Jose

2011/10/4 Stephane Popinet <s.po...@niwa.co.nz>

Marie-Jean Thoraval

unread,
Oct 5, 2011, 5:28:38 AM10/5/11
to GFS users discussion list
Dear all,

Thank you for your advices.
@Jose: I have tried to use some automatic installation for hypre instead of the sources, but the software manager in Fedora 11 cannot find anything when I look for hypre.
I would like to get it on the cluster, therefore I need to understand what is wrong.

@Stéphane: I have the following result when I look for the string hypre:
"$ grep HYPRE config.log
configure:19466: checking for HYPRE_IJMatrixCreate in -lHYPRE
configure:19491: mpicc -o conftest -g -O2 -Wall -Werror-implicit-function-declaration -Wmissing-prototypes -Wmissing-declarations -pipe -std=c99 -D_XOPEN_SOURCE=500   conftest.c -lHYPRE -lm  >&5
/usr/bin/ld: cannot find -lHYPRE
| char HYPRE_IJMatrixCreate ();
| return HYPRE_IJMatrixCreate ();
configure:19525: WARNING: HYPRE not found. hypre Module won't be available.
ac_cv_lib_HYPRE_HYPRE_IJMatrixCreate=no
BUILD_HYPRE_FALSE=''
BUILD_HYPRE_TRUE='#'"
[Only one of the lines above for hypre instead of HYPRE.]
I will try on the hypre mailing lists and ask the IT people of the university.

Thanks and regards,
Marie-Jean.


2011/10/4 Jose M. López-Herrera Sánchez <jose.lopez...@gmail.com>

Stephane Popinet

unread,
Oct 5, 2011, 3:56:49 PM10/5/11
to GFS users discussion list
> @Jose: I have tried to use some automatic installation for hypre instead of
> the sources, but the software manager in Fedora 11 cannot find anything when
> I look for hypre.

Yes, this is why you should use a better distribution than
Fedora/CentOS/RHEL, any rpm/based distro. Nothing beats Debian...

> /usr/bin/ld: cannot find -lHYPRE

Where did you install HYPRE? Did you properly set LD_LIBRARY_PATH or ld.so.conf?

This is a general library installation issue. I don't think it's
specific to either Gerris or HYPRE.

Marie-Jean Thoraval

unread,
Oct 6, 2011, 4:09:15 AM10/6/11
to GFS users discussion list
Yes, this is why you should use a better distribution than
Fedora/CentOS/RHEL, any rpm/based distro. Nothing beats Debian...

Fedora 11 is the only linux supported on campus.

> /usr/bin/ld: cannot find -lHYPRE

Where did you install HYPRE? Did you properly set LD_LIBRARY_PATH or ld.so.conf?

I have installed HYPRE locally: "$ ./configure --prefix=/home/thoravml/local".
Then I have made "make" and "make install".
I have done the same for Gerris, and get the result explained before.

I have modified the .bash_profile:
"$ cat ~/.bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$HOME/local/bin:$PATH
LD_LIBRARY_PATH=$HOME/local/lib:$LD_LIBRARY_PATH
GTS_CONFIG=$HOME/local/bin/gts-config
PKG_CONFIG_PATH=$HOME/local/lib/pkgconfig:$PKG_CONFIG_PATH

export PATH LD_LIBRARY_PATH GTS_CONFIG PKG_CONFIG_PATH"

"ld.so.conf" does not contain information about HYPRE:
"$ cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
$ ls /etc/ld.so.conf.d/
atlas-x86_64.conf             cernlib-2006-x86_64.conf        kernel-2.6.29.4-167.fc11.x86_64.conf  mysql-x86_64.conf   qt-x86_64.conf   wine-64.conf
cernlib-2006-g77-x86_64.conf  freetype-freeworld-x86_64.conf  kernel-2.6.30.9-90.fc11.x86_64.conf   octave-x86_64.conf  tix-x86_64.conf  xulrunner-64.conf"

The PATH are:
"$ echo $LD_LIBRARY_PATH
/home/thoravml/local/lib:/usr/lib64/mpich2/lib
$ echo $PATH
/home/thoravml/local/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/mpich2/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"

Best regards,
Marie-Jean.

Marie-Jean Thoraval

unread,
Oct 9, 2011, 10:02:15 AM10/9/11
to GFS users discussion list
Dear All,
Hypre version 2.4.0b is installed. Both sttic and dynamic libraries are available.
But Gerris does not recognize it with still the messages in config.log
(/usr/bin/ld: cannot find -lHYPRE)
How to force the configure script to find hypre ?
Is there an environment variable to set other than LD_LIBRARY_PATH ?
Thanks
Alain


2011/10/6 Marie-Jean Thoraval <mariejean...@kaust.edu.sa>

Stephane Popinet

unread,
Oct 9, 2011, 5:52:18 PM10/9/11
to GFS users discussion list
Hi Marie-Jean,

> Hypre version 2.4.0b is installed. Both sttic and dynamic libraries are
> available.
> But Gerris does not recognize it with still the messages in config.log
> (/usr/bin/ld: cannot find -lHYPRE)

In which directory is HYPRE installed?

Let's say it's in $HOME/local/lib, try doing

% LDFLAGS=-L$HOME/local/lib ./configure --prefix=....

cheers

Stephane

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2

Marie-Jean Thoraval

unread,
Oct 10, 2011, 4:50:42 AM10/10/11
to GFS users discussion list
Dear Stephane,

Thank you very much for your help. With your help and the help of Alain and the IT team here, I have managed to complete the installation with HYPRE, both on Fedora 11 and on the cluster.

Here are some details of the installation:
* On the cluster:
- I am loading the modules gcc/4.4.4 and mpi/openmpi/1.4.2-gcc-44.
- I have installed a local GLIB.
- I have installed hypre-2.4.0b locally with the option: "$ ./configure --prefix=... --enable-shared". During the installation of HYPRE, there was one error asking to recompile one file in "FEI_mv/SuperLU/SRC/". I have recompiled it manually by going in the folder and doing: "$ mpicc -c -fPIC  superlu_timer.c". I have then done the make and make install again.
- I have installed gts locally.
- Before making the ./configure for Gerris, I have loaded "$ export CPPFLAGS="-I$HYPRE/include"" and "$ export LDFLAGS="-L$HYPRE/lib  -lmpi_cxx"". Then I have made the configure with prefix to the local folder. The configure summary now says yes for hypre.
- I have removed the CPPFLAGS and LDFLAGS by opening a new terminal with the correct settings. Then I have run the make and make install.
- The environment settings are:
    module load gcc
    module load mpi/openmpi
    export GERRIS_GCC_PATH=$(dirname `which gcc`)
    export LOCAL_GLIB=/home/thoravml/noor-gerris-111010/GLIB
    export GERRISDIR=/home/thoravml/noor-gerris-111010
    export HYPRE=/home/thoravml/noor-gerris-111010/hypre-2.4.0b
    export PATH=${GERRISDIR}/bin:$PATH
    export LD_LIBRARY_PATH=${HYPRE}/lib:${LOCAL_GLIB}/lib:${GERRISDIR}/lib:${GERRISDIR}/lib/gerris:$LD_LIBRARY_PATH
    export PKG_CONFIG_PATH=${LOCAL_GLIB}/lib/pkgconfig:${GERRISDIR}/lib/pkgconfig:$PKG_CONFIG_PATH

* On Fedora 11: The process is similar.
- I have installed hypre-2.7.0b with the option: "$ ./configure --prefix=... --enable-shared". I didn't receive any error during the installation.
- I install gts locally.
- Before making the ./configure for Gerris, I have loaded "$ export CPPFLAGS="-I$HYPRE/include"" and "$ export LDFLAGS="-L$HYPRE/lib"" (no "-lmpi_cxx"). Then I have made the configure with prefix to the local folder. The configure summary now says yes for hypre.
- I have removed the CPPFLAGS and LDFLAGS by opening a new terminal with the correct settings. Then I have run the make and make install.

Everything seem to work fine.

Best regards,
Marie-Jean.



2011/10/10 Stephane Popinet <s.po...@gmail.com>
Reply all
Reply to author
Forward
0 new messages