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

You are not logged in.

#1 2009-01-04 21:22:46

toltec
Member
Registered: 2009-01-04
Posts: 94

Ubuntu 8.10 64 bit Installation Problem

Hello,
I'm trying to compile Aster on Ubuntu 8.10 64 bit and would appreciate some help. I plan to compile using only the Intel V11 compilers to keep things "simple". The compilers are installed and seem to be be ok (see * below). I modified setup.cfg as seemed reasonable (see below). In order to deal with some errors I set MATHLIB and OTHERLIB to:

MATHLIB = '/opt/intel/Compiler/11.0/074-fort/mkl/lib/em64t/libmkl_lapack.a'
OTHERLIB = '/opt/intel/Compiler/11.0/074-fort/lib/intel64/libguide.a'

I have no experience in compiling so these may be wrong. When running "setup.py install" the script aborts in the check_compilers.py routine with the following in the traceback (also see attached setup.log):

File "/home/gary/CAE-info/downloaded-code/install/aster/aster-full-src-9.4.0/check_compilers.py", line 476, in check_env
    v11 = self.compiler_version['CC']  >= [11, 0] or \
KeyError: 'CC'

* Compilers are installed in the following directories:

/opt/intel/Compiler/11.0/074/bin/intel64/ ... C++
/opt/intel/Compiler/11.0/074-fort/bin/intel64/ ... fortran (different directory to C++ to avoid overwriting files during installation)

Any help would be greatly appreciated!

Toltec


Setup.cfg
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-

# This file gives parameters value to complete installation
# NOTE : Python syntax MUST be respected !

import os

#-------------------------------------------------------------------------------
# Code_Aster toplevel directory (ex: /aster, /opt/aster...)
ASTER_ROOT='/opt/aster'

# astk configuration (for network capabilities)
# Let the setup configure it for you or define the 3 following parameters :
# Example for a stand-alone server (no other remote astk server)
#SERVER_NAME='localhost'
#DOMAIN_NAME='localdomain'
#FULL_SERVER_NAME='%s.%s' % (SERVER_NAME, DOMAIN_NAME)

# If you haven't write access in your Python site-packages directory
# setup.py will automatically install the Python modules (Numeric for example)
# with this prefix : [ASTER_ROOT]/public
# the files will be placed in [ASTER_ROOT]/public/lib/pythonX.X/site-packages
# PYMODULES_PREFIX = os.path.join(ASTER_ROOT, 'public')

#-------------------------------------------------------------------------------
#   Compilers
# The setup tries to find automatically your compilers and math libraries.
# You can set PATH and LD_LIBRARY_PATH environment variables before running setup.py
# to add paths in search list.
#
# You may want to select different compilers for products
# Example : PREFER_COMPILER_med = 'GNU'

# Default values are :
#    GNU compiler for all products
PREFER_COMPILER = 'Intel'

# If you have Intel compilers you should uncomment following lines:
# (aster, mumps, metis)
#PREFER_COMPILER_aster = 'Intel'
#PREFER_COMPILER_mumps = PREFER_COMPILER_aster
#PREFER_COMPILER_metis = PREFER_COMPILER_aster


# There are also two variants Intel_without_MATH, GNU_without_MATH but if you choose
# one of these you MUST set your mathematical libraries argument using MATHLIB.
# Example : PREFER_COMPILER='Intel_without_MATH'
#       and MATHLIB = '-L/path_to_acml_libs -lacml'
MATHLIB = '/opt/intel/Compiler/11.0/074-fort/mkl/lib/em64t/libmkl_lapack.a'
OTHERLIB = '/opt/intel/Compiler/11.0/074-fort/lib/intel64/libguide.a'
# You may want to specify the values yourself by defining
# these variables : CC, F77, F90, CXX, LD, DEFINED,
#                   CFLAGS, FFLAGS, F90FLAGS, CXXFLAGS, LDFLAGS,
#                   MATHLIB, CXXLIB, OTHERLIB
# (these values will be common to ALL products)

#-------------------------------------------------------------------------------
# C and Fortran compilers and linker for Code_Aster
# classical values for GNU compilers
#CC='/usr/bin/gcc'
#CXX='/usr/bin/g++'
#F77='/usr/bin/gfortran'
#F90='/usr/bin/gfortran'
#LD=F77
#CFLAGS="-fno-stack-protector"      # for gcc 4.x

#                          Example for Intel compilers (see README file)
CC='/opt/intel/Compiler/11.0/074/bin/intel64/icc'
CXX='/opt/intel/Compiler/11.0/074/bin/intel64/icpc'
F77='/opt/intel/Compiler/11.0/074-fort/bin/intel64/ifort'
LD=F77
LDFLAGS='-nofor_main'
FFLAGS="-fpe0 -traceback"
F90FLAGS="-fpe0 -traceback -align sequence"

#OPT_ENV="""
#source /opt/intel/Compiler/11.0/074/bin/iccvars.sh
#source /opt/intel/Compiler/11.0/074-fort/bin/ifortvars.sh
#source /opt/intel/Compiler/11.0/074/mkl/tools/environment/mklvars32.sh
#"""

#                          Example for gfortran (32 bits) :
#F90FLAGS="-ffixed-line-length-0 -x f77-cpp-input"
#                          Example for gfortran 64 bits :
#FFLAGS="-fdefault-double-8 -fdefault-integer-8 -fdefault-real-8"
#F90FLAGS="-ffixed-line-length-0 -x f77-cpp-input -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8"


#-------------------------------------------------------------------------------
# You may want to add no standard directories in searched paths (as python list)
# to search respectively for binaries, libraries and include files :
#BINDIR=['/myprefix/bin', ]
#LIBDIR=['/myprefix/lib', ]
#INCLUDEDIR=['/myprefix/include', ]

# To search for files recursively in subdirectories
# With MAXDEPTH>0 you may set HOME_xxx of products to a high level directory
# as ASTER_ROOT, /usr/local...
MAXDEPTH=3  # 0: not recursive (this may be long with a high depth value)

# To search for shared libraries first
PREFER_SHARED_LIBS=False   # False/True
PREFER_64BITS_LIBS=True    # False/True

#-------------------------------------------------------------------------------
# Comment the two following lines to install tcl/tk
_install_tcl = False
_install_tk  = False

#-------------------------------------------------------------------------------
# Only if hdf5 was previously installed, uncomment following line
# and fill next one
#_install_hdf5 = False
#HOME_HDF = ''

#-------------------------------------------------------------------------------
# Only if med was previously installed, uncomment following line
# and fill next one
#_install_med = False
#HOME_MED = ''

#-------------------------------------------------------------------------------
# NB : Scotch is installed by default
# Uncomment the following line to not install Scotch libraries
# (under LGPL, available at http://www.labri.fr/perso/pelegrin/scotch/)
#_install_scotch  = False

# If scotch was previously installed, uncomment and fill following line
#HOME_SCOTCH = ''

#-------------------------------------------------------------------------------
# Optionnal packages
# NOTE : optionnal packages must be installed before Code_Aster to
#   correctly configure and build this one.
#
# NOTE : only a sequential version of Mumps will be built by `setup.py`

# MUMPS libraries (sources available at http://mumps.enseeiht.fr/)
# (Fortran 90 compiler is required to use MUMPS with Code_Aster)
#HOME_MUMPS=''    # which contains lib/libseq directory

# ZMAT libraries (commercial, available at http://www.mat.ensmp.fr/)
#HOME_ZMAT=''     # which contains PUBLIC/lib-Linux4/libZmat_base.so and others

#-------------------------------------------------------------------------------
# Interface between Code_Aster and Salome
_install_omniORB   = True
_install_omniORBpy = True
_install_pylotage  = True
# Salome version supported by pylotage
SALOME_VERSION = 'DEFAULT'    # DEFAULT means the last one supported by pylotage


Attachments:
setup.log, Size: 3.94 KiB, Downloads: 726

Ubuntu 12.04
Intel(R) Core(TM)2 Quad CPU    Q9400  @ 2.66GHz

Offline

#2 2009-01-06 10:21:38

toltec
Member
Registered: 2009-01-04
Posts: 94

Re: Ubuntu 8.10 64 bit Installation Problem

Update: This particular problem was caused by my Intel C/C++ compiler not working properly. Setting LANG=C resolved this immediate issue. I have simplified my .cfg file too, with the result that the .log looks cleaner but aborts as libmkl_intel_lp64.a can't be found despite the fact that it exists. See .log below. Any help would be greatly appreciated.

Toltec

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

--------------------------------------------------------------------------------
Code_Aster Setup
revision 3730 2008-12-23 17:00:41Z

Copyright (c) 2001-2009 EDF R&D - http://www.code-aster.org
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------
Command line :
  /usr/bin/python setup.py install
--------------------------------------------------------------------------------


--------------------------------------------------------------------------------
Reading config file '/home/gary/CAE-info/downloaded-code/install/aster/aster-full-src-9.4.0/setup.cfg'...
_install_pylotage (from cfg) : True
PREFER_64BITS_LIBS (from cfg) : True
PREFER_SHARED_LIBS (from cfg) : False
_install_omniORB (from cfg) : True
          LIBDIR (from cfg) : ['/opt/intel/Compiler/11.0/074/mkl/lib/em64t']
PREFER_COMPILER (from cfg) : 'Intel'
      ASTER_ROOT (from cfg) : '/opt/aster'
    _install_tcl (from cfg) : False
_install_omniORBpy (from cfg) : True
     _install_tk (from cfg) : False
        MAXDEPTH (from cfg) : 3
  SALOME_VERSION (from cfg) : 'DEFAULT'

--------------------------------------------------------------------------------
Checking for max command length...   32768
Checking for file... /usr/bin/file
Checking for ar... /usr/bin/ar
Checking for architecture... Linux / posix / x86_64
Checking for Code_Aster platform type... LINUX64
Checking for bash... /bin/bash
Checking for Python multi-threading... yes
Checking for gcc... /usr/bin/gcc
Checking for /usr/bin/gcc configured installation directory... /usr/lib/gcc/x86_64-linux-gnu/4.3.2, /usr/bin
Checking for libpthread.so... /usr/lib/libpthread.so
Checking for libz.so... no
Checking for libz.a... no

--------------------------------------------------------------------------------
Checking for default compiler (for all products)...
Checking for Intel compilers...
Checking for icc... /usr/local/bin/icc
Checking for compiler version... icc (ICC) 11.0 20081105
Checking for icpc... /usr/local/bin/icpc
Checking for compiler version... icpc (ICC) 11.0 20081105
Checking for ifort... /usr/local/bin/ifort
Checking for compiler version... ifort (IFORT) 11.0 20081105
Checking for ifort... /usr/local/bin/ifort
Checking for compiler version... ifort (IFORT) 11.0 20081105
Checking for pthread... -L/usr/lib -lpthread (already found)
Checking for libmkl_lapack.a... /opt/intel/Compiler/11.0/074/mkl/lib/em64t/libmkl_lapack.a
Checking for libmkl_em64t.a... /opt/intel/Compiler/11.0/074/mkl/lib/em64t/libmkl_em64t.a
Checking for libguide.a... (locate)... /opt/intel/Compiler/11.0/074/lib/intel64/libguide.a
Checking for pthread... -L/usr/lib -lpthread (already found)
Checking for libstdc++.so... /usr/lib/gcc/x86_64-linux-gnu/4.3/libstdc++.so
Checking for Intel Compilers version >= 11.0... yes
Checking for iccvars.sh... (locate)... /opt/intel/Compiler/11.0/074/bin/iccvars.sh
Checking for ifortvars.sh... (locate)... /opt/intel/Compiler/11.0/074-fort/bin/ifortvars.sh
Checking for mklvarsem64t.sh... should be sourced by iccvars.sh/ifortvars.sh
Checking for C/fortran program using blas/lapack... no
---------- ERROR MESSAGE ----------
ld: cannot find libmkl_intel_lp64.a


-------------------------------------------------------------------------------
WARNING :
  The C/fortran test program calling blas and lapack subroutines failed.

Reasons :
  - unable to find suitable C/fortran compilers
  - blas/lapack libraries (or required by them) missing
  - incorrect compilation options

Nevertheless the compilation of Code_Aster may work !
If it failed, you must help the setup by setting CC, CFLAGS, MATHLIB...
-------------------------------------------------------------------------------


Attachments:
setup.cfg, Size: 6.44 KiB, Downloads: 1,065

Ubuntu 12.04
Intel(R) Core(TM)2 Quad CPU    Q9400  @ 2.66GHz

Offline

#3 2009-01-06 21:23:27

toltec
Member
Registered: 2009-01-04
Posts: 94

Re: Ubuntu 8.10 64 bit Installation Problem

I give up. Clearly compiling a robust, efficient FEA code from source, no matter how sophisticated, is not the way forward. There is a reason why companies such as Simulia, MSC and LSTC spend significant time/money on the compilation phase to optimise speed/quality.


Ubuntu 12.04
Intel(R) Core(TM)2 Quad CPU    Q9400  @ 2.66GHz

Offline

#4 2009-01-07 11:07:41

Thomas DE SOZA
Guru
From: EDF
Registered: 2007-11-23
Posts: 3,066

Re: Ubuntu 8.10 64 bit Installation Problem

Hi,

Don't give up so fast !

I successfully compiled Aster with Intel Compilers v11 on an Ubuntu 32 bits. We also compiled on a 64bits Debian but with a prior version of Intel compilers.

The error you encounter is with the BLAS/LAPACK libraries (provided through the MKL libraries in Intel products). Have you sourced the environment files before starting the process, that is execute the following commands in a (bash) shell (change to intel64 for 64bits) :

desoza@claut621:~$ . /opt/intel/Compiler/11.0/074/mkl/tools/environment/mklvars32.sh 
desoza@claut621:~$ . /opt/intel/Compiler/11.0/074/bin/iccvars.sh ia32
desoza@claut621:~$ . /opt/intel/Compiler/11.0/074/bin/ifortvars.sh ia32

If it does not work, try setting the MATH_LIST argument in the setup.cfg by hand :

MATH_LIST=['/opt/intel/Compiler/11.0/074-fort/mkl/lib/em64t/libmkl_lapack.a','/opt/intel/Compiler/11.0/074-fort/mkl/lib/em64t/libmkl_em64t.a','/opt/intel/Compiler/11.0/074-fort/lib/intel64/libguide.a']

Regards,

TdS

Offline

#5 2009-01-07 20:37:44

toltec
Member
Registered: 2009-01-04
Posts: 94

Re: Ubuntu 8.10 64 bit Installation Problem

Hi Thomas,

Thanks for your response. Since writing my above entry I've experimented a bit and taken your suggestion into account but without success. I sourced the environment both at the command line and in setup.cfg. Adding MATH_LIST as suggested makes no difference. "libmkl_intel_lp64.a" is *only* found if I point to it directly as below:

#MATH_LIST = ['mkl_lapack', 'libmkl', 'guide']   # for intel mkl
MATHLIB = '/opt/intel/Compiler/11.0/074-fort/mkl/lib/em64t/libmkl_intel_lp64.a' #  <------------------------
##MATHLIB = '/opt/intel/Compiler/11.0/074-fort/mkl/lib/em64t/libmkl_lapack.a'
##MATHLIB = '/opt/intel/Compiler/11.0/074-fort/mkl/lib/em64t/libmkl_em64t.a'
##MATHLIB = '/opt/intel/Compiler/11.0/074-fort/lib/intel64/libguide.a'
#LIBDIR=['/opt/intel/Compiler/11.0-fort/074/mkl/lib/em64t', ]
MATH_LIST=['/opt/intel/Compiler/11.0/074-fort/mkl/lib/em64t/libmkl_lapack.a',
'/opt/intel/Compiler/11.0/074-fort/mkl/lib/em64t/libmkl_em64t.a',
'/opt/intel/Compiler/11.0/074-fort/lib/intel64/libguide.a',
'/opt/intel/Compiler/11.0/074-fort/mkl/lib/em64t/libmkl_intel_lp64.a']

Running with above settings results in:


Checking for F90FLAGS from setup.cfg... -fpe0 -traceback -align sequence
Checking for C/fortran program using blas/lapack... no
---------- ERROR MESSAGE ----------
/opt/intel/Compiler/11.0/074-fort/mkl/lib/em64t/libmkl_intel_lp64.a(_dlapy2_lp64.o): In function `dlapy2_':
_dlapy2_lp64_iface.c:(.text+0x2): undefined reference to `mkl_lapack_dlapy2'
/opt/intel/Compiler/11.0/074-fort/mkl/lib/em64t/libmkl_intel_lp64.a(_ddot_lp64.o): In function `ddot_':
_ddot_lp64_iface.c:(.text+0x2a): undefined reference to `mkl_blas_ddot'

Many thanks fpr your input.

Regards

G


Attachments:
setup.cfg, Size: 7.01 KiB, Downloads: 810

Ubuntu 12.04
Intel(R) Core(TM)2 Quad CPU    Q9400  @ 2.66GHz

Offline

#6 2009-01-10 14:41:51

toltec
Member
Registered: 2009-01-04
Posts: 94

Re: Ubuntu 8.10 64 bit Installation Problem

Hello Thomas,

I've explicitly set MATH_LIST as follows:

MATH_LIST=['/opt/intel/Compiler/11.0/074-fort/mkl/lib/em64t/libmkl_lapack.a',
'/opt/intel/Compiler/11.0/074/mkl/lib/em64t/libmkl_lapack.a',
'/opt/intel/Compiler/11.0/074-fort/mkl/lib/em64t/libmkl_em64t.a',
'/opt/intel/Compiler/11.0/074/mkl/lib/em64t/libmkl_em64t.a',
'/opt/intel/Compiler/11.0/074-fort/lib/intel64/libguide.a',
'/opt/intel/Compiler/11.0/074/lib/intel64/libguide.a',
'/opt/intel/Compiler/11.0/074/mkl/lib/em64t/libmkl_intel_lp64.a',
'/opt/intel/Compiler/11.0/074-fort/mkl/lib/em64t/libmkl_intel_lp64.a',]

As the attached log shows these libs are found. However the script still aborts with:

Checking for C/fortran program using blas/lapack... no
---------- ERROR MESSAGE ----------
ld: cannot find libmkl_intel_lp64.a

1) Is this a linking or thread problem? (Shooting in the dark!)

2) I've selected to compile only using the intel compiler. Why does the script look for gcc and /usr/lib/libpthread.so?

3) I attempted setting CC='/opt/intel/Compiler/11.0/074/bin/intel64/icc'  but the script aborts with:

Checking for libstdc++.so... /usr/lib/gcc/x86_64-linux-gnu/4.3/libstdc++.so
Traceback (most recent call last):
  File "setup.py", line 777, in <module>
    main()
  File "setup.py", line 472, in main
    sys_lib=sys_lib)
  File "/home/gary/CAE-info/downloaded-code/install/aster/aster-full-src-9.4.0/check_compilers.py", line 653, in check_compiler
    success = self.configure(**kargs)
  File "/home/gary/CAE-info/downloaded-code/install/aster/aster-full-src-9.4.0/check_compilers.py", line 611, in configure
    conf.run()
  File "/home/gary/CAE-info/downloaded-code/install/aster/aster-full-src-9.4.0/check_compilers.py", line 276, in run
    self.check_env()
  File "/home/gary/CAE-info/downloaded-code/install/aster/aster-full-src-9.4.0/check_compilers.py", line 476, in check_env
    v11 = self.compiler_version['CC']  >= [11, 0] or \
KeyError: 'CC'

which is where it's checking Intel compilers and should get:

Checking for Intel Compilers version >= 11.0... yes

Setting F77 to ifort and CXX to icpc doesn't cause a problem so there appears to be a conflict with CC (perhaps it's looking to gcc?)

Any help from you or the universe will be greatly appreciated.

Regards

G


Attachments:
setup.cfg.tar.gz, Size: 3.77 KiB, Downloads: 713

Ubuntu 12.04
Intel(R) Core(TM)2 Quad CPU    Q9400  @ 2.66GHz

Offline

#7 2009-01-19 15:58:33

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

Re: Ubuntu 8.10 64 bit Installation Problem

Hello,

It seems there is a bug in environment files of Intel Compiler version 11 (iccvars.sh + ifortvars.sh and co).
You must replace all "==" by "=".

if [ "`uname`" == "Darwin" ]; then  >>> this is not a valid sh/bash syntax.


You should compile aster without problem :
1. change iccvars.sh and ifortvars.sh + intel64/iccvars_intel64.sh and intel64/ifortvars_intel64.sh
2. load Intel environment using :

source /opt/intel/Compiler/11.0/074/bin/iccvars.sh intel64
source /opt/intel/Compiler/11.0/074-fort/bin/ifortvars.sh intel64

3. Set in setup.cfg :
PREFER_COMPILER='GNU'
PREFER_COMPILER_aster = 'Intel'
PREFER_COMPILER_mumps = PREFER_COMPILER_aster
PREFER_COMPILER_metis = PREFER_COMPILER_aster

4. Run : python setup.py

It should work perfectly wink

MC


[EDIT] : there is still a problem :
Using /bin/bash, it works.

Using /bin/sh :
$ . iccvars.sh intel64
ERROR: Unknown switch ''. Accepted values: ia32, intel64, ia64

on Ubuntu, /bin/sh is a link to /bin/dash.

Last edited by courtois (2009-01-19 16:41:58)


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

#8 2009-01-19 16:48:54

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

Re: Ubuntu 8.10 64 bit Installation Problem

By sourcing the environment by hand (see point 2 in my previous post) installation should succeed.
But upgrades or other compilation will fail.

For me it's really a bug in Intel environment files which don't work using dash (see DashAsBinSh page from ubuntu).

You can use "old" syntax by replacing :
. /opt/intel/Compiler/11.0/074/bin/iccvars.sh intel64
. /opt/intel/Compiler/11.0/074/bin/ifortvars.sh intel64

by :
. /opt/intel/Compiler/11.0/074/bin/intel64/iccvars_intel64.sh
. /opt/intel/Compiler/11.0/074/bin/intel64/ifortvars_intel64.sh
. /opt/intel/Compiler/11.0/074/mkl/tools/environment/mklvarsem64t.sh

in [ASTER_ROOT]/STA9.4/profile.sh

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

#9 2009-01-19 21:13:09

toltec
Member
Registered: 2009-01-04
Posts: 94

Re: Ubuntu 8.10 64 bit Installation Problem

Thanks MC, I'll take a look at this ASAP

G


Ubuntu 12.04
Intel(R) Core(TM)2 Quad CPU    Q9400  @ 2.66GHz

Offline

#10 2009-01-25 16:05:48

toltec
Member
Registered: 2009-01-04
Posts: 94

Re: Ubuntu 8.10 64 bit Installation Problem

Hello MC,

I did as you recommended and it worked.

For the record, I attempted to install all components using setup.py. All components installed ok except mumps and aster. I then modified /opt/aster/intel/STA9.4/profile.sh as you recommended and then did a "make clean" and "make" in the same directory.

Thanks for your help.

G


Ubuntu 12.04
Intel(R) Core(TM)2 Quad CPU    Q9400  @ 2.66GHz

Offline