#7375: upgrade M4RI to newest upstream release
---------------------------+------------------------------------------------
Reporter: malb | Owner: tbd
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.3
Component: packages | Keywords: M4RI, linear algebra
Work_issues: | Author: Martin Albrecht
Reviewer: drkirkby | Merged:
---------------------------+------------------------------------------------
Comment(by drkirkby):
Hi,
it now builds fine, and passes all tests on Solaris with the Sun compiler.
I did not recheck on HP-UX as I have powered the machine off, and it is
the garage, but I suspect it will still be fine there.
But I notice at the top of spkg-install you have
{{{
SAGE_DEBUG=0
}}}
which means you override the value of the environment variable, so it
makes any tests pointless. That should be very easy to fix.
== Suspect source code found with Sun's lint ==
As you can probably see, I can be a bit picky, but I am keen the quality
of software in Sage is improved as much as possible. Some, such as
''lcalc'' leaves a lot to be desired in my opinion. The code in there is
pretty awful, which means I'd be suspicious myself of trusting any results
that make use of ''lcalc''.
Anyway, with that in mind, I decided to have a '''quick''' look at the
M4RI source code. I'm not a mathematician, so I do not understand what is
going on, but I did notice a few things, with the aid of 'lint' that I
believe need addressing. I'm not an expert using lint, so just did:
{{{
$ lint *.c
}}}
in the 'src' directory. Here are a few examples of things I found. I've
attached a log of the lint results, so perhaps you can have a look though
them, to see if there are things that you should fix.
In grayflex.c
{{{
int m4ri_opt_k(int a,int b,int c) {
int n = MIN(a,b);
int res = MIN( MAXKAY, MAX(1, (int)(0.75*log2_floor(n))) );
return res;
}
}}}
does not use the argument 'c' at all.
In permutation.c, the following function
{{{
void mzp_set_ui(mzp_t *P, unsigned int value) {
size_t i;
for (i=0; i<P->length; i++) {
P->values[i] = i;
}
}
}}}
does not use the integer 'value' at any point.
Line 1180 of strassen.c
{{{
mzd_t* _mzd_addmul_weird_weird (mzd_t* C, mzd_t* A, mzd_t *B, int
cutoff){
}}}
takes a argument 'cutoff' but you never actually use 'cutoff' in that
function.
sqrt() is used in brilliantrussian.c, but the header file math.h is not
included.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7375#comment:12>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=.