[SciPy-user] Error while installing Scipy

Pearu Peterson pearu at scipy.org
Sun Apr 9 05:13:51 CDT 2006



On Sat, 8 Apr 2006, Rahul Kanwar wrote:

> Hello,
>  I finally got numpy and scipy working on my computer! My computer's
> configuration is
> Xeon 64 bit, ifort (64 bit fortran compiler), mkl (em64t) and gcc
> 4.1.0 running Suse 10.1 beta 9. I used the following command to build
> numPy and scipy:
> python setup.py config_fc --fcompiler=intel build

Thanks for the feedback. Everything that you did is now in numpy svn.
Different from the above command line, you should use now

   python setup.py config_fc --fcompiler=intelem build

Pearu


>   Here is what I did, this maybe helpful for others and maybe the
> developers can do the following chnages in the code to make it work
> out of the box!
>
> 1) To compile numpy edit  numpy/distutils/cpuinfo.py and replace XEON by Xeon,
>
> -------------------------------------------------------------------
>    def _is_XEON(self):
>        return re.match(r'.*?XEON\b',
>                        self.info[0]['model name']) is not None
> -------------------------------------------------------------------
>
> now open numpy/distutils/fcompiler/intel.py and change
>
> -------------------------------------------------------------------
>    version_pattern = r'Intel\(R\) Fortran Compiler for 32-bit '\
>                      'applications, Version (?P<version>[^\s*]*)'
> -------------------------------------------------------------------
>
> with
>
> *******************************************************************
>    version_pattern = r'Intel\(R\) Fortran Compiler for Intel\(R\)
> EM64T-based '\
>                      'applications, Version (?P<version>[^\s*]*)'
> *******************************************************************
>
> 2) You need to change the mkl linker flags as -lmkl_em64t cannot be
> used to build a shared libraray as there is only libmkl_em64t.a file
> in the mkl lib folder. We can add the LAPACK and BLAS routines by
> linking with libraries libmkl_lapack32.so and libmkl_lapack64.so (we
> need to include both as single and doubel precesion functions are kept
> in seperate files). Here is how I did this, first open
> numpy/distutils/system_info.py and edit
>
> -------------------------------------------------------------------
>            elif cpu.is_Xeon():
>                plt = 'em64t'
>                l = 'mkl_em64t'
> -------------------------------------------------------------------
>
> with (i am removing mkl_em64t from the linker command and replacing
> with its shared counterpart)
>
> *******************************************************************
>            elif cpu.is_Xeon():
>                plt = 'em64t'
>                l = 'mkl' #'mkl_em64t'
> *******************************************************************
>
> now in the same file replace
>
> -------------------------------------------------------------------
>        lapack_libs = self.get_libs('lapack_libs',['mkl_lapack'])
>        info = {'libraries': lapack_libs}
>        dict_append(info,**mkl)
>        self.set_info(**info)
> -------------------------------------------------------------------
>
> with
>
> *******************************************************************
>        lapack_libs = self.get_libs('lapack_libs',['mkl_lapack32',
> 'mkl_lapack64'])
>        info = {'libraries': lapack_libs}
>        dict_append(info,**mkl)
>        self.set_info(**info)
> *******************************************************************
>
> 3) you can also replace
>
> -------------------------------------------------------------------
>        if cpu.has_mmx():
>            opt.append('-xM')
> -------------------------------------------------------------------
>
> with(it helps ifort to vectorize the loops on Xeon machine and does
> not give the xM warning)
>
> *******************************************************************
>        if cpu.has_mmx():
>            opt.append('') #-xM
> *******************************************************************
>
> Thats all i did to get numPy and scipy running on my machine, hope
> this info helps some one else.
>
> bye,
> Rahul
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
>



More information about the SciPy-user mailing list