octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling ATLAS with MinGW


From: Tatsuro MATSUOKA
Subject: Re: Compiling ATLAS with MinGW
Date: Mon, 20 Feb 2012 07:23:15 +0900 (JST)

Hello

--- On Mon, 2012/2/20, Michael Goffioul  wrote:

> On Sun, Feb 19, 2012 at 3:46 AM, Tatsuro MATSUOKA  wrote:
> > Hello
> >
> >
> > --- On Sun, 2012/2/19, Michael Goffioul wrote:
> >
> >> On Sun, Feb 19, 2012 at 12:03 AM, Michael Goffioul
> >> <address@hidden> wrote:
> >> > On Sat, Feb 18, 2012 at 11:08 PM, Tatsuro MATSUOKA
> >> > <address@hidden> wrote:
> >> >> Hello
> >> >>
> >> >> I have complied the ATLAS self-build GCC on Cygwin compiler (gcc-4.5.3).
> >> >> From the libatlats.a and liff77blas.a, I have create libblas.dll.a and 
> >> >> libblas.dll using MinGW GCC as linker.
> >> >>
> >> >> This ATLAS can be linked with Octave on MinGW.
> >> >>
> >> >> The reason why I use self build GCC on cygwin, I have not create 
> >> >> libblas.dll.a and libblas.dll with MinGW linker from libatlats.a and 
> >> >> libff77blas.a built with the GCC bundled with Cygwin.
> >> >
> >> > Thanks Tatsuro. So you're basically doing the same as me. The reason
> >> > I'm asking is that I've been trying to recompile ATLAS with
> >> > multi-thread support, but went into problems. The multi-threaded ATLAS
> >> > version is compiled against pthread library. However when applying the
> >> > same method as above, you're using cygwin-GCC to compile ATLAS; hence
> >> > you're using the cygwin version of pthread headers. At link stage,
> >> > you're using MinGW-GCC and link against the MinGW version of pthread
> >> > library (which is basically this one:
> >> > http://sourceware.org/pthreads-win32/).
> >> >
> >> > But the catch is that the pthread types in the cywin version and MinGW
> >> > version are not the same, especially they don't have the same size. In
> >> > other words: sizeof(pthread_t) in cygwin is not the same as
> >> > sizeof(pthread_t) in MinGW. And you end up with stack corruption.
> >> >
> >> > I tried to compile ATLAS with the mingw-xxx compilers that are
> >> > available in cygwin, but teh build process stops almost immediately
> >> > with an error (ERROR 435 DURING Stage 1 install).
> >>
> >> Actually, it seems to work fine when I keep the XCC compiler to be
> >> cygwin-GCC. I'll give that a shot when I get some time.
> >>
> >> Michael.
> >>
> >
> >
> > Thank you for your information.  As you described I could not build 
> > multi-threaded atlas because of pthread issue.  I hope that your trial will 
> > be successful.
> 
> I managed to complete the compilation process, but it wasn't really a
> success. I specified MinGW as main compiler, but kept cygwin-GCC as
> the XCC compiler. I had to hack a bit the Makefile in tune/sysinfo/,
> because some support executables are compiled with the ICC compiler
> (interface compiler), mingw-in-cygwin in this case, but are then
> called with cygwin-style paths and fail. I also noticed a similar
> issue that prevented a proper creation of files like
> atlas_dtrsmXover.h (empty files are created), although these errors
> were ignored by make.
> 
> I created the DLL and tested the result with octave with this snippet:
> 
> n=2000; A=randn(n); B=randn(n);tic; C=A*B; t=toc, MFLOPS=2*n^3/t*1e-6
> 
> and verified that both CPU's were used (in the task manager). However
> it seems that the generated multi-threaded ATLAS is suboptimal and
> even with the 2 CPU's being used, it was slower than a single-threaded
> ATLAS. I don't know the reason, but it may be related to the fact that
> some files couldn't be properly generated. In the end, it seems like
> trying to compile ATLAS with MinGW is a dead-end...
> 
> Michael.


Hello

At present it is difficult to generate effective multi threaded ATLAS for 
MinGW. Thank you for your efforts.  

Regards

Tatsuro


reply via email to

[Prev in Thread] Current Thread [Next in Thread]