Welcome to the forums. Please post in English or French.

You are not logged in.

#1 2015-10-15 14:29:44

m_golbs
Member
From: Germany
Registered: 2009-11-09
Posts: 126

./waf configure >>> with mpicc.openmpi-gcc no with mpicc on a cluster

Hello,

I want test code-aster on a cluster. How can I configure waf to use followings mpicc=mpicc.openmpi-gcc  and mpif90=mpif90.openmpi-gcc?

cl-fe:/apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0 $
./waf configure --use-config-dir=$ASTER_ROOT/12.3/share/aster --use-config=Ubuntu_gnu_mpi --prefix=$ASTER_ROOT/PAR12.3
Setting top to                           : /apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0
Setting out to                           : /apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0/build
Checking for custom configuration        : Ubuntu_gnu_mpi
Getting Code_Aster version               : [(12, 3, 0), '5d6e49793beb', 'default', '10/12/2014', 'default', 0]
Checking for 'mpicc'                     : not found

under ./waf --help I found:
..
..
Environment variables:
  CC             : C compiler
  FC             : Fortran compiler
  CXX            : C++ compiler
  INCLUDES       : extra include paths
  DEFINES        : extra preprocessor defines
  LINKFLAGS      : extra linker options
  LIBPATH        : extra paths where to find libraries
  LIB            : extra libraries to link with
  STLIB          : extra static libraries to link with
  OPTLIB_FLAGS   : extra linker flags appended at the end of link commands (for example when -Wl,start-group options are necessary). OPTLIB_FLAGS will be added for all links. Usually, you should prefer to define more specific variable as OPTLIB_FLAGS_MATH (or OPTLIB_FLAGS_HDF5...)
  CFLAGS         : extra C compilation options
  FCFLAGS        : extra Fortran compilation options
  PREFIX         : default installation prefix to be used, if no --prefix option is given.
  BLAS_INT_SIZE  : kind of integers to use in the fortran blas/lapack calls (4 or 8, default is 4)
  MUMPS_INT_SIZE : kind of integers to use in the fortran mumps calls  (4 or 8, default is 4)
  CATALO_CMD     : command line used to build the elements catalog. It is just inserted before the executable (may define additional environment variables or a wrapper that takes all arguments, see catalo/wscript)

How can I set Environment variables for C compiler, Fortran compiler and C++ compiler?

./waf configure --check-cxx-compiler=mpicc.openmpi-gcc not work.

compiler_c.py is this the way?


About informations I'm very happy.

Thanks and greeting Markus

Last edited by m_golbs (2015-10-16 08:53:29)


The superfluous chase, is to miss the essential.
Jules Saliège

Offline

#2 2015-10-20 12:33:29

mathieu.courtois
Administrator
From: France
Registered: 2007-11-21
Posts: 1,178

Re: ./waf configure >>> with mpicc.openmpi-gcc no with mpicc on a cluster

Hello,

Simply export environment variables:
CC=path/to/your/mpicc CXX=... F90=... ./waf configure --parallel ...

MC


Code_Aster release : last unstable on Ubuntu 16.04 64 bits - GNU Compilers

Please do not forget to tag your first post as *SOLVED* when it is!

Offline

#3 2015-10-26 09:37:30

m_golbs
Member
From: Germany
Registered: 2009-11-09
Posts: 126

Re: ./waf configure >>> with mpicc.openmpi-gcc no with mpicc on a cluster

Hello MC,

very thanks! I will try it.

Thanks and greeting Markus


Hello,

I try followings:
....
export CC=/usr/lib/openmpi/1.8.4/gcc/
export CXX=/usr/lib/openmpi/1.8.4/gcc/
export F90=/usr/lib/openmpi/1.8.4/gcc/
....
....
./waf configure --use-config-dir=$ASTER_ROOT/12.3/share/aster --use-config=Ubuntu_gnu_mpi --prefix=$ASTER_ROOT/PAR12.3
Setting top to                           : /apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0
Setting out to                           : /apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0/build
Checking for custom configuration        : Ubuntu_gnu_mpi
Getting Code_Aster version               : [(12, 3, 0), '5d6e49793beb', 'default', '10/12/2014', 'default', 0]
Checking for '/usr/lib/openmpi/1.8.4/gcc/' : not found
Unable to configure the parallel environment
(complete log in /apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0/build/config.log)
1  cl-fe:/apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0 $
...
...
...
...

ls -l /usr/lib/openmpi/1.8.4/gcc/
total 12
drwxr-xr-x 1 root root 4096 Oct  2 13:21 bin
lrwxrwxrwx 1 root root   18 Dec 24  2014 etc -> /etc/openmpi/1.8.4
lrwxrwxrwx 1 root root   17 Dec 24  2014 include -> ../common/include
drwxr-xr-x 1 root root 4096 Oct  2 13:21 lib
drwxr-xr-x 1 root root 4096 Oct  2 13:21 share
0  cl-fe:/apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0 $

The name of the compilers are different to the standard gcc.

ls -l /usr/lib/openmpi/1.8.4/gcc/bin
total 100
lrwxrwxrwx 1 root root    12 Dec 24  2014 mpiCC -> opal_wrapper
lrwxrwxrwx 1 root root    12 Dec 24  2014 mpic++ -> opal_wrapper
lrwxrwxrwx 1 root root    12 Dec 24  2014 mpicc -> opal_wrapper
lrwxrwxrwx 1 root root    12 Dec 24  2014 mpicxx -> opal_wrapper
lrwxrwxrwx 1 root root     7 Dec 24  2014 mpif77 -> mpifort
lrwxrwxrwx 1 root root     7 Dec 24  2014 mpif90 -> mpifort
lrwxrwxrwx 1 root root    12 Dec 24  2014 mpifort -> opal_wrapper
-rwxr-xr-x 1 root root 21048 Dec 24  2014 ompi_info
-rwxr-xr-x 1 root root 19416 Dec 24  2014 opal_wrapper
lrwxrwxrwx 1 root root    12 Dec 24  2014 opalc++ -> opal_wrapper
lrwxrwxrwx 1 root root    12 Dec 24  2014 opalcc -> opal_wrapper
-rwxr-xr-x 1 root root 29448 Dec 24  2014 orte-info
lrwxrwxrwx 1 root root    12 Dec 24  2014 ortecc -> opal_wrapper
lrwxrwxrwx 1 root root    22 Dec 24  2014 orted -> ../../common/bin/orted
lrwxrwxrwx 1 root root     5 Dec 24  2014 oshcc -> mpicc
lrwxrwxrwx 1 root root     7 Dec 24  2014 oshfort -> mpifort
-rwxr-xr-x 1 root root 20848 Dec 24  2014 oshmem_info
lrwxrwxrwx 1 root root     6 Dec 24  2014 oshrun -> mpirun
lrwxrwxrwx 1 root root     5 Dec 24  2014 shmemcc -> mpicc
lrwxrwxrwx 1 root root     7 Dec 24  2014 shmemfort -> mpifort
lrwxrwxrwx 1 root root     6 Dec 24  2014 shmemrun -> mpirun
0  cl-fe:/apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0 $

What is my mistake? About informations I'm very happy.


Thanks and greting Markus

Last edited by m_golbs (2015-10-28 08:53:22)


The superfluous chase, is to miss the essential.
Jules Saliège

Offline

#4 2015-10-28 11:40:37

reiteres
Member
Registered: 2013-06-03
Posts: 560

Re: ./waf configure >>> with mpicc.openmpi-gcc no with mpicc on a cluster

Hi!

I alsways use the following exports in the shell (i.e. I add it to .bashrc) to run/install aster with MPI:

export PATH=/opt/OpenMPI/bin:$PATH
export LD_LIBRARY_PATH=/opt/OpenMPI/lib:$LD_LIBRARY_PATH

You have to change to the correct paths of course.
This may be quite brutal, but I avoid trouble with these settings.

And Just a remark: I see that your MPI version is 1.8.4.
To use Aster to it's full potential you have to use a version prior
to 1.7.4. (see this forum entry: http://www.code-aster.org/forum2/viewto … 210#p48210)

Last edited by reiteres (2015-10-28 11:44:30)

Offline

#5 2015-10-28 13:25:38

m_golbs
Member
From: Germany
Registered: 2009-11-09
Posts: 126

Re: ./waf configure >>> with mpicc.openmpi-gcc no with mpicc on a cluster

Hello,

very thanks! It is hard to install Code-Aster on a debian based cluster... Thanks for the important tip of version prior to 1.7.4. I will test only the installation "system" first. So I try to use for this the 1.8.4 version. If I win the installation I will take a openmpi version prior to 1.7.4.

./waf configure --use-config-dir=$ASTER_ROOT/12.3/share/aster --use-config=Ubuntu_gnu_mpi --prefix=$ASTER_ROOT/PAR12.3mc
Setting top to                           : /apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0 
Setting out to                           : /apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0/build 
Checking for custom configuration        : Ubuntu_gnu_mpi 
Getting Code_Aster version               : [(12, 3, 0), '5d6e49793beb', 'default', '10/12/2014', 'default', 0] 
Checking for '/usr/lib/openmpi/1.8.4/gcc/bin/mpicc' : yes 
Checking for 'mpicc'                     : not found 
Unable to configure the parallel environment

One step forward. I don't understand:

Checking for '/usr/lib/openmpi/1.8.4/gcc/bin/mpicc' : yes 
Checking for 'mpicc'                     : not found 

???

Must I edit waf scripts to set compilers and Co.?

I have use alias for mapping mpicc but isn't work.

mpicc
gcc-4.7: fatal error: no input files
compilation terminated.
 4  cl-fe:/apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0 $
./waf configure --use-config-dir=$ASTER_ROOT/12.3/share/aster --use-config=Ubuntu_gnu_mpi --prefix=$ASTER_ROOT/PAR12.3mc
Setting top to                           : /apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0 
Setting out to                           : /apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0/build 
Checking for custom configuration        : Ubuntu_gnu_mpi 
Getting Code_Aster version               : [(12, 3, 0), '5d6e49793beb', 'default', '10/12/2014', 'default', 0] 
Checking for '/usr/bin/mpicc.openmpi-gcc' : yes 
Checking for 'mpicc'                     : not found 
Unable to configure the parallel environment
(complete log in /apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0/build/config.log)
 1  cl-fe:/apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0 $

Thanks and greeting Markus

Last edited by m_golbs (2015-10-29 17:21:07)


The superfluous chase, is to miss the essential.
Jules Saliège

Offline

#6 2015-10-30 09:58:24

reiteres
Member
Registered: 2013-06-03
Posts: 560

Re: ./waf configure >>> with mpicc.openmpi-gcc no with mpicc on a cluster

Hi again!

This looks indeed strange

Checking for '/usr/lib/openmpi/1.8.4/gcc/bin/mpicc' : yes 
Checking for 'mpicc'                     : not found

is OpenMPI in your PATH?
This loos like:
Check for mpicc on the given path: yes
Check for the program mpicc in PATH: no

what does typing

mpicc

returns?
If you get unknown command or similar, try adding it to the path like I did above.

If this doesn't work either it may be better to install OpenMPI from source. I experienced recently a badly installed OpenMPI debian package recently in Ubuntu.

Offline

#7 2015-10-30 12:39:32

m_golbs
Member
From: Germany
Registered: 2009-11-09
Posts: 126

Re: ./waf configure >>> with mpicc.openmpi-gcc no with mpicc on a cluster

Hello,

thanks for the replay.

 1  cl-fe:/apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0 $ mpicc
gcc-4.7: fatal error: no input files
compilation terminated.

 4  cl-fe:/apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0 $ mpicc.openmpi-gcc
gcc-4.7: fatal error: no input files
compilation terminated.

 4  cl-fe:/apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0 $

I think it works correct.

So I dont understand

Checking for 'mpicc'                     : not found

Install openmpi from source is for me not possible. It's a debian7/Ubuntu 14.04 cluster with complex strcture, nodes, chroot & Co.. So I must use the complete cluster system. I  choose debian7 version.

Thanks and greeting
Markus

Last edited by m_golbs (2015-10-30 12:40:42)


The superfluous chase, is to miss the essential.
Jules Saliège

Offline

#8 2015-10-30 13:27:11

reiteres
Member
Registered: 2013-06-03
Posts: 560

Re: ./waf configure >>> with mpicc.openmpi-gcc no with mpicc on a cluster

You are right this is very strange. Seeing this means your path should be set correctly.

How does your Ubuntu_gnu_mpi.py look like?
You should also  look into the /path/to/aster/src/build/config.log file, since it often contains more details about what is exactly missing, which is often not indicated by the shell output.

Some things you may want to try:
There is a small chance that the following may help:

import aster_full_config

def configure(self):
    #from Options import options as opts
    #auto_config.configure(self)
    aster_full_config.configure(self) # <- use the configuration script of the aster full package
    opts = self.options

    self.env['FC'] = 'mpif90'
    self.env['CC'] = 'mpicc'
    self.env['CXX'] = 'mpicxx'
......

This invokes the configuration script which is used by the aster full package to set the enviroment correctly.

Maybe check if mpi works correct using a simple hello world program just to make sure (e.g. http://mpitutorial.com/tutorials/mpi-hello-world/ )
It happened to me already one time that openmpi was not installed correctly, with this you can find out.

Offline

#9 2015-10-30 13:55:00

m_golbs
Member
From: Germany
Registered: 2009-11-09
Posts: 126

Re: ./waf configure >>> with mpicc.openmpi-gcc no with mpicc on a cluster

Hello,

thanks. You have got a great idea! It work's!

I use

    self.env['FC'] = 'mpif90.openmpi-gcc'
    self.env['CC'] = 'mpicc.openmpi-gcc'
    self.env['CXX'] = 'mpicc.openmpi-gcc'

in *.mpi.py


./waf configure --use-config-dir=$ASTER_ROOT/12.3/share/aster --use-config=Ubuntu_gnu_mpi --prefix=$ASTER_ROOT/PAR12.3mc
Setting top to                           : /apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0 
Setting out to                           : /apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0/build 
Checking for custom configuration        : Ubuntu_gnu_mpi 
Getting Code_Aster version               : [(12, 3, 0), '5d6e49793beb', 'default', '10/12/2014', 'default', 0] 
Checking for 'mpicc.openmpi-gcc'         : yes 
Checking for 'mpif90.openmpi-gcc'        : yes 
Checking for 'gcc' (c compiler)          : mpicc.openmpi-gcc 
Checking for 'g++' (c++ compiler)        : mpicc.openmpi-gcc 
Checking for 'gfortran' (fortran compiler) : mpif90.openmpi-gcc 
Checking for header mpi.h                : yes 
fortran link verbose flag                : -v 
Checking for OpenMP flag -fopenmp        : yes 
Getting fortran runtime link flags       : ok (-L/apps/prod/mumps-4.10.0_mpi/lib -L/apps/prod/petsc-3.2-p7/arch-linux2-c-opt/lib -L/apps/prod/scalapack/lib -L/apps/prod/aster/public/hdf5-1.8.10/lib -L/apps/prod/aster/public/med-3.0.8/lib -L/apps/prod/aster/public/metis-4.0.3/lib -L/apps/prod/aster/public/scotch-5.1.11_esmumps/lib -L/apps/prod/OpenBLAS/lib -L/usr/lib/openmpi/1.8.4/gcc/lib -L/apps/prod/mumps-4.10.0_mpi/lib -L/apps/prod/petsc-3.2-p7/arch-linux2-c-opt/lib -L/apps/prod/scalapack/lib -L/apps/prod/aster/public/hdf5-1.8.10/lib -L/apps/prod/aster/public/med-3.0.8/lib -L/apps/prod/aster/public/metis-4.0.3/lib -L/apps/prod/aster/public/scotch-5.1.11_esmumps/lib -L/apps/prod/OpenBLAS/lib -L/usr/lib/openmpi/1.8.4/gcc/lib -L/apps/prod/mumps-4.10.0_mpi/lib -L/apps/prod/petsc-3.2-p7/arch-linux2-c-opt/lib -L/apps/prod/scalapack/lib -L/apps/prod/aster/public/hdf5-1.8.10/lib -L/apps/prod/aster/public/med-3.0.8/lib -L/apps/prod/aster/public/metis-4.0.3/lib -L/apps/prod/aster/public/scotch-5.1.11_esmumps/lib -L/apps/prod/OpenBLAS/lib -L/usr/lib/openmpi/1.8.4/gcc/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.7 -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.7/../../.. -lX11 -lmpi_usempi -lmpi_mpifh -lmpi -lgfortran -lm -lquadmath -lm -lpthread) 
Checking for library pthread             : yes 
Checking for library dl                  : yes 
Checking for library util                : yes 
Checking for program python              : /usr/bin/python 
Checking for python version              : (2, 7, 3, 'final', 0) 
Checking for library python2.7 in LIBDIR : yes 
Checking for program /usr/bin/python-config,python2.7-config,python-config-2.7,python2.7m-config : /usr/bin/python-config 
Checking for header Python.h             : yes 
Checking for numpy                       : yes 
Checking for numpy version               : 1.6.2 
Checking for numpy include               : ['/usr/lib/python2.7/dist-packages/numpy/core/include'] 
Getting platform                         : LINUX64 
Checking for library pthread             : yes 
Checking for library m                   : yes 
Checking for static library openblas     : yes 
Setting libm after files                 : ok ("-lm" moved to LINKFLAGS_CLIB) 
Checking for a program using blas/lapack : ok 
Checking for static library hdf5         : yes 
Checking for static library z            : yes 
Checking for header hdf5.h               : yes 
Checking hdf5 version                    : 1.8.10 
Checking for API hdf5 v18                : default v18 
Checking for static library med          : yes 
Checking for static library stdc++       : yes 
Checking for header med.h                : yes 
Checking size of med_int integers        : 4 
Checking med version                     : 3.0.8 
Checking for library metis               : yes 
Checking for header metis.h              : yes 
Checking metis version                   : 4.0.3 
Getting mumps version                    : 4.10.0 
Checking for library dmumps              : yes 
Checking for library zmumps              : yes 
Checking for library smumps              : yes 
Checking for library cmumps              : yes 
Checking for library mumps_common        : yes 
Checking for library pord                : yes 
Checking for library metis               : yes 
Checking for library scalapack           : yes 
Checking for library openblas            : yes 
Checking for library esmumps             : yes 
Checking for library scotch              : yes 
Checking for library scotcherr           : yes 
Setting size of Mumps integers           : 4 
Checking for header scotch.h             : yes 
Checking scotch version                  : 5.1.10 
Checking for static library esmumps      : yes 
Checking for static library scotch       : yes 
Checking for static library scotcherr    : yes 
Checking for static library petsc        : yes 
Checking for static library HYPRE        : yes 
Checking for static library ml           : yes 
Checking for header petsc.h              : yes 
Checking petsc version                   : 3.2.0p7 
Reading build preferences from ~/.hgrc   : {} 
Compiling a simple fortran app           : yes 
Detecting whether we need a dummy main   : yes main 
Checking for fortran option              : yes (-fdefault-double-8 -fdefault-integer-8 -fdefault-real-8) 
Checking for fortran option              : yes (-Wimplicit-interface) 
Checking for fortran option              : yes (-Wintrinsic-shadow) 
Checking for fortran option              : no (-fno-aggressive-loop-optimizations) 
Checking for fortran option              : yes (-ffree-line-length-none) 
Setting fortran compiler flags           : ['-fPIC', '-fdefault-double-8', '-fdefault-integer-8', '-fdefault-real-8', '-Wimplicit-interface', '-Wintrinsic-shadow', '-ffree-line-length-none'] 
Getting fortran mangling scheme          : ok ('_', '', 'lower-case') 
Checking size of integer4                : 4 
Checking the matching C type             : int 
Checking size of default integer         : 8 
Checking the matching C type             : long 
Checking size of logical                 : 1 
Checking size of simple precision real   : 4 
Checking the matching C type             : float 
Checking size of double precision real   : 8 
Checking the matching C type             : double 
Checking size of double complex          : 16 
Setting type for fortran string length   : unsigned int 
Setting size of blas/lapack integers     : 4 
Checking size of MPI_Fint integers       : 4 
Checking fpp stringify using #           : no 
Checking fpp stringify using ""          : yes 
Checking compilation with long lines     : yes 
Check for backtrace feature              : no 
Check for tracebackqq feature            : no 
Checking for library stdc++              : yes 
Checking for 'gcc' (c compiler)          : mpicc.openmpi-gcc 
Getting C compiler flags                 : ['-fPIC'] 
Checking for library dl                  : yes 
Checking for program mfront              : not found 
Check for msgfmt programs                : not found 
Check for lrelease programs              : not found 
Setting C debug flags                    : ['-g'] 
Setting C optimization flags             : ['-O2'] 
Setting C++ debug flags                  : ['-g'] 
Setting C++ optimization flags           : ['-O2'] 
Setting fortran debug flags              : ['-g'] 
Getting fortran optimization flags       : ['-O2'] (VOLATILE is required) 
Write config file                        : debug/asterf_config.h 
Write config file                        : debug/asterc_config.h 
Write config file                        : release/asterf_config.h 
Write config file                        : release/asterc_config.h 
'configure' finished successfully (47.749s)
 0  cl-fe:/apps/prod/aster-full-src-12.3.0/SRC/aster-12.3.0 $

Thanks and greeting Markus

Last edited by m_golbs (2015-10-30 13:55:43)


The superfluous chase, is to miss the essential.
Jules Saliège

Offline