https://bitbucket.org/malb/m4ri/wiki/M4RI-20110601
Cheers,
Martin
--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com/
_jab: martinr...@jabber.ccc.de
Cheers, I'll take a look.
> The remaining problems appear to be OpenMP-related. Compiling with
> OpenMP enabled fails, due to 3 distinct kinds of problems. First,
> some OpenMP macros refer to variables that aren't declared until the
> following line. Second, there is a "return" from the middle of a
> critical section in mmc.c. Third, "-fopenmp" isn't passed to the
> compiler when building the tests, so they fail to link. This patch
> fixes all of those problems:
Cheers, that's because I forgot to test OpenMP for this release. Sorry about
that!
> Even with the above patches, m4ri is still failing the tests when
> built with OpenMP enabled. I can build without it, but am reluctant
> to do so unless there is no other choice. The failing tests,
> test_multiplication, test_elimination, and test_kernel, all segfault.
> The segfaults seem to occur in different places on each run, which
> suggests a race condition somewhere. I don't know how to debug this
> further. Any suggestions or help are much appreciated.
Carlo added more caching for matrix structs which could be the cause for this
race condition. I'll also investigate.
> One more thing. I'm going to have to rebuild Fedora's polybori
> package once I get this sorted out. Did you have to make any
> significant changes to polybori when you tested the build, or was it
> pretty straightforward?
The only thing that needs changing IIRC is to replace RADIX by m4ri_radix. The
next version of PolyBoRi (i.e. 0.8) will have that fix (it will also work with
older versions of M4RI btw.)
Cheers,
Martin
PS: I'm at a conference this week with limited internet access, so I might
take longer than usual to reply & look into stuff.
Hi again,
which compiler is this? I compile with gcc 4.5.3 with -Wall -pedantic and
nothing shows up. I also compiled under MSVC which usually seems to be more
strict than my GCC.
My best,
Alexander
--
Dr. rer. nat. Dipl.-Math. Alexander Dreyer
Abteilung "Systemanalyse, Prognose und Regelung"
Fraunhofer Institut f�r Techno- und Wirtschaftsmathematik (ITWM)
Fraunhofer-Platz 1
67663 Kaiserslautern
Telefon +49 (0) 631-31600-4318
Fax +49 (0) 631-31600-1099
E-Mail alexande...@itwm.fraunhofer.de
Internet http://www.itwm.fraunhofer.de/sys/dreyer.html
Note however, that you'll see little improvements when using OpenMP over the
sequential code, at least on Intel CPUs (which tend to have more shared cache
between cores than AMDs). On my 4 core Intel i7 I see an improvement when
using the M4RI algorithm but using the asymptotically fast sequential code is
still faster.
I cut a new release (well, alpha0 of it), available here:
http://m4ri.sagemath.org/downloads/m4ri-20110613.alpha0.tar.gz
let me know if it works, then I'll release 20110613 proper (which will only
contains this fix).
Cheers,
Martin
PS: I was offline until now so I didn't use your patches in the end but
credited you in mine, I hope that's okay.
I'd say it's currently probably not worth it enabling OpenMP by default at
least on x86(_64). I have no idea about other platforms. But the focus of the
library so far definitely is single core.
> > I cut a new release (well, alpha0 of it), available here:
> >
> > http://m4ri.sagemath.org/downloads/m4ri-20110613.alpha0.tar.gz
> >
> > let me know if it works, then I'll release 20110613 proper (which will
> > only contains this fix).
>
> That works for me. Thank you very much.
I guess I will make this the official release then.
> Sorry to distract you while at a conference. :-)
NP :)
> > PS: I was offline until now so I didn't use your patches in the end but
> > credited you in mine, I hope that's okay.
>
> Oh, absolutely. I don't even care about the credit, really.
>
> You also asked about the compiler I am using. I am running Fedora 15
> on my desktop, which includes gcc 4.6.0 and binutils 2.21.51.0.6.
>
> One last thing. I have to disable SSE3/SSSE3 support, because the
> machines we build on may have such support, but not all of our users
> will. This can result in illegal instruction errors on the users'
> machines. I'm currently patching m4/ax_ext.m4 to force those two
> checks to fail. It is certainly not urgent, but if you have time in
> the future, some officially sanctioned way of forcing those off would
> be nice.
Just pass --disable-sse2 to configure :) We only use SSE2 (128-bit wide XORs)
and not SSE3 btw.
Cheers,
Martin
Sorry for coming back to this only now, but I just ran configure with --
disable-sse2 and it worked, i.e. we don't run ax_ext.m4 if disable-sse2 is
set. Also there was no msse3 gcc flag flying by while building. GCC might
detect SSE3 anyway and use it, but that should be controlled by setting CFLAGS
appropriately?
Thanks for explaining, I got it now and opened a ticket at
https://bitbucket.org/malb/m4ri/issue/30/allow-to-disable-sse3
Cheers,
Martin
--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com/
_jab: martinr...@jabber.ccc.de