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

You are not logged in.

#1 2010-12-14 22:43:34

JMB365
Member
Registered: 2008-01-19
Posts: 781

[SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

Hello,

I am trying to compile CA Ver 10.2 (ultimately 10.3.1) using the Intel compilers (composerxe-2011.1.107 icc/icpc/ifort) and getting an error:

Checking for F77 from setup.cfg... /opt/intel/composerxe-2011.1.107/bin/intel64/ifort
Checking for ifort... no
ERROR #1: SetupConfigureError('\nUnable to find ifort\n',)
Checking for Intel compilers... 1 error(s) (see previous ERROR)
Checking for global values... 
--------------------------------------------------------------------------------
Unable to configure automatically INTEL_WITHOUT_MATH compiler for "__main__" product.

I do have these three compilers:

ls -al /opt/intel/composerxe-2011.1.107/bin/intel64/
-rwxrwxr-x 1 root root  3489813 2010-11-17 17:13 icc
-rwxrwxr-x 1 root root  3489877 2010-11-17 17:13 icpc
-rwxrwxr-x 1 root root  3453455 2010-11-17 17:13 ifort

I have tried:

source /opt/intel/composerxe-2011.1.107/bin/compilervars.sh intel64
source /opt/intel/composerxe-2011.1.107/bin/iccvars.sh intel64
source /opt/intel/composerxe-2011.1.107/bin/ifortvars.sh intel64
source /opt/intel/composerxe-2011.1.107/mkl/bin/mklvars.sh intel64

prior to:

sudo python setup.py install --prefix=/opt/aster

Nothing has helped!  Please help.  I have attached the setup.cfg & setup.log files.  Thank you.

Regards, JMB

Last edited by JMB365 (2010-12-16 16:43:18)


Attachments:
setup.zip, Size: 3.66 KiB, Downloads: 592

SalomeMeca 2021
Ubuntu 20.04, 22.04

Offline

#2 2010-12-14 23:49:57

JMB365
Member
Registered: 2008-01-19
Posts: 781

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

Hello,

I think I found the reason.  CodeAster perhaps does NOT work with new versions (higher than 11) of the Intel compilers!

JMB


SalomeMeca 2021
Ubuntu 20.04, 22.04

Offline

#3 2010-12-15 02:27:53

tcdonley
Member
From: Virginia, USA
Registered: 2010-11-24
Posts: 94

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

Hi,
I can confirm that it is possible to compile Aster STA10.2 / NEW10.2  etc. using the latest 2011.1.107 version of Intel compilers. However, I did not use the 'Intel_without_MATH' option but instead used only 'Intel'. I did have the same  problem as JMB during my initial compilation, and many other problems as well depending on what I put in setup.cfg.

I finally gave up and wiped out the partial installation and started fresh. The more I tinkered with setup.cfg the more I had problems.

What worked for me was to use all the defaults in setup.cfg except to uncomment the lines which specify Intel for Aster, mumps, metis, and metis_edf. GNU was used for the other packages. I did not set the CC CXX or any other flags in the setup file.

With the nearly unchanged setup file in place, I sourced the intel compilers, then ran the setup.py script and everything worked great except for the QtAsstistant warning.

So my suggestion is to comment the lines which set the compiler variables, and try again. I cannot understand why setting the CC, F77 and other variables in setup.cfg would result in the error that was raised by your machine, but I observed precisely the same problem on mine.


Good luck!

Tim Donley

Offline

#4 2010-12-15 04:16:33

JMB365
Member
Registered: 2008-01-19
Posts: 781

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

Hello tcdonley,

Thank you for your email.  It has been the light at the end of the tunnel that I needed tonight !!!  I decided to stick with 2011.1.107 and found the key to making it work:

MAXDEPTH = 8
USE_LOCATE = True

I followed your advice, but also I am trying it with 'Intel_without_MATH' since I would like to use the ACML package.

Although I think increasing the MAXDEPTH from 5 had little or no role in solving the problem.  I believe it is the "USE_LOCATE = True" that makes it work.  Why the install program is so notoriously finicky and unreliable amazes me.  Once the appropriate ENV variables are set, even a shell scripted "which icc icpc ifort" would have reliably pointed the way to where these compilers are!

Anyway, the compilation process is running now and hopefully within an hour I will know if I have asteru/asterd and all the rest.  But I am very thankful for your message.  It was a beacon in the dark!

Best regards, JMB

Last edited by JMB365 (2010-12-15 04:18:20)


SalomeMeca 2021
Ubuntu 20.04, 22.04

Offline

#5 2010-12-15 14:05:27

JMB365
Member
Registered: 2008-01-19
Posts: 781

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

Hello,

I am still having trouble compiling CA 10.2 with Intel (12.0) and ACML 4.4.0 on Ubuntu CAELinux (Lucid 64bit).

My preferences are Intel_without_Math.  I also used Locate=True which was the only way setup.py can find the compilers!

Aster fails to build and the problem seems to be in in-compatibility of variables, int long long etc.  Also MUMPS did not build.  The relevant files are attached.  Thank you for any guidance and help in advance.

Regards, JMB

PS: Additional info which I just noticed:

Checking for libguide.a... no
Checking for libguide.so... no
ERROR #1: SetupConfigureError('\nUnable to find libguide.a or libguide.so\n',)

What is libguide.so, since there is very little Google info about it for Ubuntu and I cannot find it using "locate" or "aptitude search"?

Last edited by JMB365 (2010-12-15 14:40:19)


Attachments:
setup2.zip, Size: 181.89 KiB, Downloads: 558

SalomeMeca 2021
Ubuntu 20.04, 22.04

Offline

#6 2010-12-15 23:16:15

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

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

The aster-full package for Code_Aster 10.3 should support Intel Compilers 12.0.

But if you use Intel Compilers why you do not use MKL libs ?

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

#7 2010-12-16 01:00:41

JMB365
Member
Registered: 2008-01-19
Posts: 781

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

Hello courtois,

Thank you for the confirmation and guidance.  I will try the MKL.  There are many options to play with in the compilation world and too little knowledge!  smile  In fact that is what I had tried earlier today and came back to check on it just as I was reading your message and found that it has worked !

What I used is (a snippet):

PREFER_COMPILER = 'GNU'

# If you have Intel compilers you should uncomment following lines:
# (aster, mumps, metis, metis-edf)
# Note the "-" replaced by "_"
PREFER_COMPILER_aster = 'Intel'
PREFER_COMPILER_mumps = PREFER_COMPILER_aster
PREFER_COMPILER_metis = PREFER_COMPILER_aster
PREFER_COMPILER_metis_edf = PREFER_COMPILER_aster

Is the above the correct way or should I try to compile all CodeAster modules with these below:

PREFER_COMPILER = 'Intel'

# If you have Intel compilers you should uncomment following lines:
# (aster, mumps, metis, metis-edf)
# Note the "-" replaced by "_"
PREFER_COMPILER_aster = 'Intel'
PREFER_COMPILER_mumps = PREFER_COMPILER_aster
PREFER_COMPILER_metis = PREFER_COMPILER_aster
PREFER_COMPILER_metis_edf = PREFER_COMPILER_aster

I have tried this once and did not succeed, so your insight would be appreciated.  Thank you for your help.

Regards, JMB


SalomeMeca 2021
Ubuntu 20.04, 22.04

Offline

#8 2010-12-16 01:03:49

JMB365
Member
Registered: 2008-01-19
Posts: 781

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

tcdonley wrote:

Hi,
I can confirm that it is possible to compile Aster STA10.2 / NEW10.2  etc. using the latest 2011.1.107 version of Intel compilers. However, I did not use the 'Intel_without_MATH' option but instead used only 'Intel'.

Hello tcdonley,

I wandered around some merry "compiler option" paths and have come to the realization that only using GNU and Intel has worked so far.  Thanks for your help.

Regards, JMB

Last edited by JMB365 (2010-12-16 01:04:20)


SalomeMeca 2021
Ubuntu 20.04, 22.04

Offline

#9 2010-12-16 06:04:31

JMB365
Member
Registered: 2008-01-19
Posts: 781

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

Hello,

OK I have installed CodeAster 10.2 and NEW10.2.29 on one PC successfully using GNU/Intel20111.1.107 compilers as documented in earlier posts.  I went through many attempts before I finally got setup.py to find icc/icpc/ifort on my PC. I thought USE_LOCATE = True was the trick.

Now I am trying the same process on another CAELinux2010 PC and I keep getting:

 PREFER_COMPILER (from cfg) : 'GNU'
 PREFER_COMPILER_mumps (from cfg) : 'Intel'
 PREFER_COMPILER_metis (from cfg) : 'Intel'
 PREFER_COMPILER_aster (from cfg) : 'Intel'
      ASTER_ROOT (from cfg) : '/opt/aster'
      USE_LOCATE (from cfg) : True
  SALOME_VERSION (from cfg) : 'DEFAULT'
        MAXDEPTH (from cfg) : 8
.
.
.
Checking for global values... 
Checking for Intel compilers without mathematical libraries.... 
Checking for icc... no
ERROR #1: SetupConfigureError('\nUnable to find icc\n',)
Checking for icpc... no
ERROR #2: SetupConfigureError('\nUnable to find icpc\n',)
Checking for ifort... no
ERROR #3: SetupConfigureError('\nUnable to find ifort\n',)
Checking for ifort... no
ERROR #4: SetupConfigureError('\nUnable to find ifort\n',)
Checking for Intel compilers without mathematical libraries.... 4 error(s) (see previous ERROR)

Why am I getting these errors?  Why can setup.py not be written so that it "just works"?  How does one overcome this problem?

I have done:

source /opt/intel/composerxe-2011.1.107/bin/compilervars.sh intel64
source /opt/intel/composerxe-2011.1.107/bin/iccvars.sh intel64
source /opt/intel/composerxe-2011.1.107/bin/ifortvars.sh intel64
source /opt/intel/composerxe-2011.1.107/mkl/bin/mklvars.sh intel64

and I tried USE_LOCATE = True (or False) but no success!  Why can setup.py NOT find them?!  A simple which command does:

which icc icpc ifort
/opt/intel/composerxe-2011.1.107/bin/intel64/icc
/opt/intel/composerxe-2011.1.107/bin/intel64/icpc
/opt/intel/composerxe-2011.1.107/bin/intel64/ifort

One cannot be constantly experimenting to find some "magical mantra" that works!  Somebody please post a consistent, reliable method of making the Intel compilers be found by setup.py!  It is frustrating to see what should be a straightforward process be so unreliable and tedious.  Thank you in advance for any assistance I can get.

Regards, JMB

Last edited by JMB365 (2010-12-16 06:13:14)


SalomeMeca 2021
Ubuntu 20.04, 22.04

Offline

#10 2010-12-16 07:05:25

JMB365
Member
Registered: 2008-01-19
Posts: 781

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

Hello,

After several attempts setup.py now works on the second PC.  I don't know what I "chanted" to make it happen!!!  How exactly does setup.py find the compilers?  Can it be re-written to use the more reliable "which" command rather than the "locate" command?  Does one need to run a "sudo updatedb" so that it works when USE_LOCATE = True is turned on?  Some improvement is needed in the setup.py program!

Regards, JMB

Last edited by JMB365 (2010-12-16 07:05:48)


SalomeMeca 2021
Ubuntu 20.04, 22.04

Offline

#11 2010-12-16 07:24:12

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

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

Please feel free to improve it !


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

#12 2010-12-16 16:41:51

JMB365
Member
Registered: 2008-01-19
Posts: 781

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

Hello all,

I have added a Wiki page on how to compile CodeAster 10.2 with the latest Intel compilers 2011.1.107 (Ver 12) on a standard CAELinux2010 (Ubuntu Lucid 10.04 64bit) PC as described here:

http://www.code-aster.org/wiki/doku.php … 4bit_intel

Enjoy, JMB

PS: Tested on a PC with a single core Athlon; and a PC with an Intel QuadCore


SalomeMeca 2021
Ubuntu 20.04, 22.04

Offline

#13 2010-12-16 23:35:00

todd_alan_martin
Member
Registered: 2008-03-06
Posts: 131

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

Hi JMB

Did you uncomment these lines in setup.cfg?

#                          Example for Intel compilers (see README file)
#CC='/opt/intel/cc/9.1.049/bin/icc'
#CXX='/opt/intel/cc/9.1.049/bin/icpc'
#F77='/opt/intel/fc/9.1.045/bin/ifort'
#LD=F77
#LDFLAGS='-nofor_main'
#FFLAGS="-fpe0 -traceback"
#F90FLAGS="-fpe0 -traceback -align sequence"

#OPT_ENV="""
#source /opt/intel/cc/9.1.049/bin/iccvars.sh
#source /opt/intel/fc/9.1.045/bin/ifortvars.sh
#source /opt/intel/mkl/9.0/tools/environment/mklvars32.sh
#"""

Todd.

Offline

#14 2010-12-17 02:43:30

JMB365
Member
Registered: 2008-01-19
Posts: 781

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

courtois wrote:

Please feel free to improve it !

Hello courtois / or any developer

In order to make setup.py find the Intel or other compilers here is a suggestion.  Use 'which' instead of 'locate' to find 'icc/icpc/ifort' or any other compilers.  Let me illustrate why 'which' is a better system call:

On a CAELinuc PC I tried:

locate icc

which gave me 120 lines of lines containing 'icc' everywhere within all kinds of path names and file names !!!

Now try:

source /opt/intel/composerxe-2011.1.107/bin/iccvars.sh intel64
which icc

and you will get "/opt/intel/composerxe-2011.1.107/bin/intel64/icc" ... precisely ONE LINE!

So if the Dev team will consider this, you could possibly make the necessary change (in line 1693 of as_setup.py) to use 'which' instead of 'locate'.  Lines 1679 ~ 1703 of as_setup.py are shown below for your reference:

#-------------------------------------------------------------------------------
   def locate(self, filenames, addto=None, typ='bin'):
      """Returns dirname (none, one or more, always as list) of 'filename'.
      If addto != None, addto dirnames into 'addto'.
      """
      dnew = []
      if not self.use_locate:
         return dnew
      if addto is None:
         addto = []
      assert type(addto) is list, _('"addto" argument must be a list !')
      if not type(filenames) in (list, tuple):
         filenames=[filenames,]
      for name in filenames:
         iret, out = self.Shell('locate %s | egrep "/%s$"' % (name, name),
                           verbose=self.debug)
         if iret == 0:
            dirn = [os.path.dirname(d) for d in out.splitlines()]
            for f in out.splitlines():
               if typ != 'bin' or (os.access(f, os.X_OK) and os.path.isfile(f)):
                  d = os.path.dirname(f)
                  if not d in addto:
                     dnew.append(d)
      addto.extend(dnew)
      return dnew

There is one limitation to 'locate'; it searches only in the locations specified by the PATH env variables to find ONLY executables.  But if one is going to 'source /opt/intel/... whatever' anyway this is not a limitation, but a speed benefit !

It appears however that 'locate' is being used to find all kinds of non executable files so a separate function similar to the 'def locate(...' could be utilized whenever executables need to be found.  Hopefully this suggestion will allow setup.py to function faster and more reliably as far as locating compilers is concerned.

Regards, JMB

PS: There may be others pro/cons to this suggestion, so let us know if this is a viable/feasible fix to the problem.
PPS: Thank you Todd Alan Martin for finding where the "Locate" command was being called!

Last edited by JMB365 (2010-12-20 16:58:50)


SalomeMeca 2021
Ubuntu 20.04, 22.04

Offline

#15 2010-12-17 10:20:01

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

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

Hello,

locate searches using the "updatedb" database.
which searches only in PATH of the current environment.

The setup process searches in the same paths as which does but it also adds paths in which it found something previously and it searches also in sub-directories of these paths (MAX_DEPTH levels).

So, if which finds your compiler the setup should too !


Example with setup.cfg changed to use GNU compilers for most of products and Intel ones for aster, mumps, metis, metis-edf (classic) :

1. without sourcing any environment :

$ which ifort
ifort not found
$ python setup.py install --prefix=../aster
[...]
Checking for ifort... no
[...]
Unable to configure automatically INTEL compiler for "aster" product.

2. by sourcing Intel 11 environment

$ source /opt/intel/aster-intel_profile.sh
$ which ifort
/opt/intel/Compiler/11.1/073/bin/ia32/ifort
$ python setup.py install --prefix=../aster
[...]
Checking for ifort... /opt/intel/Compiler/11.1/073/bin/ia32/ifort
[...]
Checking for Intel Compilers version is 11.x... yes
Checking for Intel Compilers version >= 12.0... no
[...]
# Environment settings :
export INTEL_LICENSE_FILE='/opt/intel/licenses'
. /opt/intel/Compiler/11.1/073/bin/iccvars.sh ia32
. /opt/intel/Compiler/11.1/073/bin/ifortvars.sh ia32

3. by sourcing Intel 12 environment

$ source /opt/intel/aster-intel-12_profile.sh
$ which ifort
/opt/intel/composerxe-2011.1.107/bin/ia32/ifort
$ python setup.py install --prefix=../aster
[...]
Checking for ifort... /opt/intel/composerxe-2011.1.107/bin/ia32/ifort
[...]
Checking for Intel Compilers version is 11.x... no
Checking for Intel Compilers version >= 12.0... yes
[...]
# Environment settings :
export INTEL_LICENSE_FILE='/opt/intel/licenses'
. /opt/intel/composerxe-2011.1.107/bin/compilervars.sh ia32

These 3 tests have been done in the same shell to show that the setup takes the order of the PATH var for the environment.
You can also see that which and setup found the same command.

MC


PS : the third test shows that the package 10.3 is ready for Intel 12 wink


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

#16 2011-01-09 03:15:56

echo6
Member
Registered: 2011-01-09
Posts: 32

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

I just compiled Aster 10.3 with the Intel compilers and the mkl libs. I increased the maxdepth to 7. some of the intel directories are deep and 5 would not make it. I also had to uncomment/modify the LIBDIR
LIBDIR=['/opt/intel/mkl/10.0.5.025/lib/em64t/', ]. There are also BINDIR and INCLUDEDIR variables. If some of your files are not on the standard paths, you could probably add the paths here. I did not uncomment any of the other lines.

Offline

#17 2014-04-23 00:57:43

bme
Member
Registered: 2012-05-10
Posts: 46

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

Hi
I installed CA 11.5 on a computer with "4th Generation Intel Core i7-4700MQ Processor (3.40GHz 1600MHz 6MB)"

1. Started with this:
http://www.code-aster.org/wiki/doku.php … and_ca10.3
Exceptions:

download parallel_studio_xe_2013_sp1_update2.tgz form:
http://software.intel.com/en-us/article … -download/


SIP first, then PyQt are installed with little bit older versions, but via UBUNTU software center
pythone-sip and python bindings for qt4


Then I referred to this blog:
http://www.code-aster.org/wiki/doku.php … _19_ca11.4
I defined at ~/.bashrc:

# Intel compiler
export PATH=/opt/intel/bin:$PATH
export LD_LIBRARY_PATH=/opt/intel/mkl/lib/intel64/:/opt/intel/mkl/lib/mic/:/opt/intel/lib/intel64/:/usr/lib/:/usr/lib64/:$LD_LIBRARY_PATH

then in setup.cfg:

# PREFER_COMPILER_aster = 'GNU'
PREFER_COMPILER_aster = 'Intel'
...
PREFER_COMPILER_mumps = PREFER_COMPILER_aster
PREFER_COMPILER_metis = PREFER_COMPILER_aster
PREFER_COMPILER_metis_edf = PREFER_COMPILER_aster
PREFER_COMPILER_med = 'GNU' # There are severe problems using Intel compilers with the med library

NOTE: deffining
source /opt/intel/bin/iccvars.sh intel64
source /opt/intel/bin/ifortvars.sh intel64
source /opt/intel/mkl/bin/mklvars.sh intel64

ended up with dirrenet syntax error, but I did sources in terminal individually.
I stuck in installing CA fore a while, for different changes like "sources", " CC=..." but apparently they are not necessary

setup.cfg is attached.
Hope this helps
BME

Last edited by bme (2014-04-23 01:34:30)


Attachments:
setup.cfg, Size: 5.91 KiB, Downloads: 588

Offline

#18 2014-05-05 21:48:10

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

Re: [SOLVED] Compile CA 10.2 w/ Intel compilers (2010.1.107)

bme wrote:

Hi
I installed CA 11.5 on a computer with "4th Generation Intel Core i7-4700MQ Processor (3.40GHz 1600MHz 6MB)"

1. Started with this:
http://www.code-aster.org/wiki/doku.php … and_ca10.3
Exceptions:

download parallel_studio_xe_2013_sp1_update2.tgz form:
http://software.intel.com/en-us/article … -download/


SIP first, then PyQt are installed with little bit older versions, but via UBUNTU software center
pythone-sip and python bindings for qt4


Then I referred to this blog:
http://www.code-aster.org/wiki/doku.php … _19_ca11.4
I defined at ~/.bashrc:

# Intel compiler
export PATH=/opt/intel/bin:$PATH
export LD_LIBRARY_PATH=/opt/intel/mkl/lib/intel64/:/opt/intel/mkl/lib/mic/:/opt/intel/lib/intel64/:/usr/lib/:/usr/lib64/:$LD_LIBRARY_PATH

then in setup.cfg:

# PREFER_COMPILER_aster = 'GNU'
PREFER_COMPILER_aster = 'Intel'
...
PREFER_COMPILER_mumps = PREFER_COMPILER_aster
PREFER_COMPILER_metis = PREFER_COMPILER_aster
PREFER_COMPILER_metis_edf = PREFER_COMPILER_aster
PREFER_COMPILER_med = 'GNU' # There are severe problems using Intel compilers with the med library

NOTE: deffining
source /opt/intel/bin/iccvars.sh intel64
source /opt/intel/bin/ifortvars.sh intel64
source /opt/intel/mkl/bin/mklvars.sh intel64

ended up with dirrenet syntax error, but I did sources in terminal individually.
I stuck in installing CA fore a while, for different changes like "sources", " CC=..." but apparently they are not necessary

setup.cfg is attached.
Hope this helps
BME

You should open a new thread instead of reporting in an already SOLVED one and provide the log and dbg files of the installation procedure (see
here)

TdS

Last edited by Thomas DE SOZA (2014-05-05 21:48:53)

Offline