FFLAS-FFPACK 2.1.0 released

26 views
Skip to first unread message

Clement Pernet

unread,
Jun 15, 2015, 2:31:07 PM6/15/15
to ffpack...@googlegroups.com, linbox...@googlegroups.com
Dear users and developpers,

We are glad to announce the release of the version 2.1.0 of the fflas-ffpack library.
It can be found on the fflas-ffpack project page:

http://linalg.org/projects/fflas-ffpack/

As part of the update involves a wide refactoring of the fields implementation, which have been
moved to the Givaro library, there is a strong dependency of this new release with the v4.0.0 of
Givaro, freshly released and available at:

http://givaro.forge.imag.fr/

We plan to have a LinBox release upgrading to these new dependencies in July.

Enjoy.

Clément for the fflas-ffpack group.

Shunsuke Tsuchioka

unread,
Jun 16, 2015, 3:52:12 AM6/16/15
to ffpack...@googlegroups.com, linbox...@googlegroups.com
Hi,

Great!
Is there a good example or a test code for parallel computation
(e.g, parallel PLUQ) in the tar ball?

Best,
Shunsuke

2015年6月16日火曜日 3時31分07秒 UTC+9 Clement Pernet:

Clement Pernet

unread,
Jun 16, 2015, 3:59:32 AM6/16/15
to ffpack...@googlegroups.com, linbox...@googlegroups.com
You'll find such an code in benchmarks/benchmark-pluq.C line 342.
The parallel PLUQ decomposition routine is called pPLUQ and you should run it within a PAR_BLOCK{ }
block.
Best.
Clément

Le 16/06/2015 09:52, Shunsuke Tsuchioka a écrit :
> Hi,
>
> Great!
> Is there a good example or a test code for parallel computation
> (e.g, parallel PLUQ) in the tar ball?
>
> Best,
> Shunsuke
>
> 2015年6月16日火曜日 3時31分07秒 UTC+9 Clement Pernet:
>
> Dear users and developpers,
>
> We are glad to announce the release of the version 2.1.0 of the fflas-ffpack library.
> It can be found on the fflas-ffpack project page:
>
> http://linalg.org/projects/fflas-ffpack/ <http://linalg.org/projects/fflas-ffpack/>
>
> As part of the update involves a wide refactoring of the fields implementation, which have been
> moved to the Givaro library, there is a strong dependency of this new release with the v4.0.0 of
> Givaro, freshly released and available at:
>
> http://givaro.forge.imag.fr/ <http://givaro.forge.imag.fr/>
>
> We plan to have a LinBox release upgrading to these new dependencies in July.
>
> Enjoy.
>
> Clément for the fflas-ffpack group.
>
> --
> You received this message because you are subscribed to the Google Groups "ffpack-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> ffpack-devel...@googlegroups.com <mailto:ffpack-devel...@googlegroups.com>.
> To post to this group, send email to ffpack...@googlegroups.com
> <mailto:ffpack...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/ffpack-devel.
> For more options, visit https://groups.google.com/d/optout.

Shunsuke Tsuchioka

unread,
Jun 18, 2015, 9:01:50 PM6/18/15
to ffpack...@googlegroups.com
Thanks.

Does "FFPACK::pPLUQ" or "FFPACK::PLUQ" return the rank?

It seems that ffpack.h says so, but the following short code
when applied to a 768x768 matrix
http://www.kurims.kyoto-u.ac.jp/~tshun/4321m
as
"./test_pluq 3 gram4_3_2_1_ p" or ."/test_pluq 3 gram4_3_2_1_ -"
returns 768. This matrix has rank=41 in char=3.

Am I missing some points trivially important?

Sincerely,
Shunsuke

#include "fflas-ffpack/fflas-ffpack-config.h"
#include <iostream>
#include <givaro/modular.h>

#include "fflas-ffpack/config-blas.h"
#include "fflas-ffpack/fflas/fflas.h"
#include "fflas-ffpack/utils/timer.h"
#include "fflas-ffpack/utils/Matio.h"
#include "fflas-ffpack/utils/args-parser.h"
#include "fflas-ffpack/field/nonzero-randiter.h"

#include "tests/test-utils.h"

#ifdef __FFLASFFPACK_USE_KAAPI
#include "libkomp.h"
#endif

using namespace std;

//typedef Givaro::ModularBalanced<double> Field;
//typedef Givaro::ZRing<double> Field;
typedef Givaro::ZRing<double> Field;
//typedef Givaro::UnparametricZRing<double> Field;

int main(int argc, char** argv) {
    int m,n;
    Field F(atof(argv[1]));
    Field::Element * A;
    A = read_field(F,argv[2],&m ,&n);
    const int t=12;
    bool par=(argv[3][0]=='p');
    cout << "is parallel? " << boolalpha << par << endl;

    size_t R;
    enum FFLAS::FFLAS_DIAG diag = FFLAS::FflasNonUnit;
    size_t maxP, maxQ;
    maxP = m;
    maxQ = n;
   
    size_t *P = FFLAS::fflas_new<size_t>(maxP);
    size_t *Q = FFLAS::fflas_new<size_t>(maxQ);
   
    if (par) {
    PAR_BLOCK{
        R = FFPACK::pPLUQ(F, diag, m, n, A, n, P, Q, t);
    }
    }
    else
        R = FFPACK::PLUQ(F, diag, m, n, A, n, P, Q);
   
    cout << m << "x" << n << " matrix." << endl;
    cout << "rank = " << R << endl;
   
    FFLAS::fflas_delete (P);
    FFLAS::fflas_delete (Q);
    FFLAS::fflas_delete (A);
   
    return 0;
}



2015年6月16日火曜日 16時59分32秒 UTC+9 Clement Pernet:

Clement Pernet

unread,
Jun 19, 2015, 3:32:28 AM6/19/15
to ffpack...@googlegroups.com
Hi,

Yes it returns the rank of the matrix.

In your code, you are using the ZRing<double> field, which implements the ring Z using double for
the element representation.
You should use instead

ModularBalanced<float> to represent GF(3).
ModularBalanced<double> (commented in your code) will also work but with a slight overhead.

I compiled you code with ModularBalanced<float> and got a rank 41 in both sequential and parallel
versions.
Best.
Clément
> <http://linalg.org/projects/fflas-ffpack/> <http://linalg.org/projects/fflas-ffpack/
> <http://linalg.org/projects/fflas-ffpack/>>
> >
> > As part of the update involves a wide refactoring of the fields implementation, which have
> been
> > moved to the Givaro library, there is a strong dependency of this new release with the
> v4.0.0 of
> > Givaro, freshly released and available at:
> >
> > http://givaro.forge.imag.fr/ <http://givaro.forge.imag.fr/>
> >
> > We plan to have a LinBox release upgrading to these new dependencies in July.
> >
> > Enjoy.
> >
> > Clément for the fflas-ffpack group.
> >
> > --
> > You received this message because you are subscribed to the Google Groups "ffpack-devel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to
> > ffpack-devel...@googlegroups.com <mailto:ffpack-devel...@googlegroups.com>.
> > To post to this group, send email to ffpack...@googlegroups.com
> > <mailto:ffpack...@googlegroups.com>.
> > Visit this group at http://groups.google.com/group/ffpack-devel
> <http://groups.google.com/group/ffpack-devel>.
> > For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to the Google Groups "ffpack-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> ffpack-devel...@googlegroups.com <mailto:ffpack-devel...@googlegroups.com>.

Shunsuke Tsuchioka

unread,
Jun 19, 2015, 5:07:38 AM6/19/15
to ffpack...@googlegroups.com
Hi, Thank you.

Now everything seems fine.

A report:
I calculated some 26975 x 15400 over GF(257) whose rank=15388.
(my complication option is:
-D__FFLASFFPACK_HAVE_CBLAS -msse4.1 -fabi-version=6
-std=gnu++11  -lgoto2  -lgivaro -lgmpxx -lgmp -O3 -fopenmp
and I used ModularBalanced<double> as a field implementation of GF(257))

(1) FFPACK::pPLUQ call with the last argument=13 (i.e., use 13 cores)
from Fri 2015-06-19 17:41:49 JST
to Fri 2015-06-19 17:42:17 JST

(2) FFPACK::PLUQ call
from Fri 2015-06-19 17:43:23 JST
to Fri 2015-06-19 17:46:40 JST

Thus, paralllel call is 7~8 times faster than the unthreaded call
(when 13 cores are used).

Best,
Shunsuke

2015年6月19日金曜日 16時32分28秒 UTC+9 Clement Pernet:
>     > To post to this group, send email to ffpack...@googlegroups.com
>     > <mailto:ffpack...@googlegroups.com>.
>     > Visit this group at http://groups.google.com/group/ffpack-devel
>     <http://groups.google.com/group/ffpack-devel>.
>     > For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to the Google Groups "ffpack-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to

Clement Pernet

unread,
Jun 19, 2015, 5:16:41 AM6/19/15
to ffpack...@googlegroups.com
Thanks for the report.

I suggest that you use ModularBalanced<float> for this field: single precision is enough and faster
for p=257, hence using ModularBalanced<double> will generate a lot of conversions from double to
float matrices, which you avoid by working over floats directly.

Clément
> > http://www.kurims.kyoto-u.ac.jp/~tshun/4321m <http://www.kurims.kyoto-u.ac.jp/%7Etshun/4321m>
> > > ffpack-devel...@googlegroups.com <mailto:ffpack-devel...@googlegroups.com>.
> <https://groups.google.com/d/optout> <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>.
> >
> > --
> > You received this message because you are subscribed to the Google Groups "ffpack-devel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to
> > ffpack-devel...@googlegroups.com <mailto:ffpack-devel...@googlegroups.com>.
> > To post to this group, send email to ffpack...@googlegroups.com
> > <mailto:ffpack...@googlegroups.com>.
> > Visit this group at http://groups.google.com/group/ffpack-devel
> <http://groups.google.com/group/ffpack-devel>.
> > For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to the Google Groups "ffpack-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> ffpack-devel...@googlegroups.com <mailto:ffpack-devel...@googlegroups.com>.

Shunsuke Tsuchioka

unread,
Jun 19, 2015, 5:32:08 AM6/19/15
to ffpack...@googlegroups.com
Thank you.

I tried ModularBalanced<float> for the same matrix.
With FFPACK::pPLUQ call, the same rank is calculated with 13 cores
from Fri 2015-06-19 17:48:12 JST
to Fri 2015-06-19 17:48:33 JST.
Thus, 3 seconds faster.
I believe everybody gets happy if there's an instruction
for each field (or ring) implementation in FFLAS-FFPACK.

By the way, the above is a report of my machine:
Linux phi 2.6.32-358.18.1.el6.x86_64 #1 SMP Wed Aug 28 17:19:38 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz x 16cores
256GB memory.

I tried same binary on other machine:
Linux sapporo 3.2.0-64-generic #97-Ubuntu SMP Wed Jun 4 22:04:21 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Intel(R) Xeon(R) CPU E7- 4870  @ 2.40GHz x 40cores
1TB memory

Then, I got an error message that says
BLAS : Program is Terminated. Because you tried to allocate too many memory regions.

Disclaimer: I build gotoblas2-1.13 with USE_THREAD=0 option.

I am now wondering why such a thing happens because
the binary is the same...
I believe that some google search gives me why,
but I also believe somebody on earth now gets the same message.

Do you have some suggestion?

Best,
Shunsuke


2015年6月19日金曜日 18時16分41秒 UTC+9 Clement Pernet:
>     >     > To post to this group, send email to ffpack...@googlegroups.com
>     >     > <mailto:ffpack...@googlegroups.com>.
>     >     > Visit this group at http://groups.google.com/group/ffpack-devel
>     <http://groups.google.com/group/ffpack-devel>
>     >     <http://groups.google.com/group/ffpack-devel <http://groups.google.com/group/ffpack-devel>>.
>     >     > For more options, visit https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout> <https://groups.google.com/d/optout
>     <https://groups.google.com/d/optout>>.
>     >
>     > --
>     > You received this message because you are subscribed to the Google Groups "ffpack-devel" group.
>     > To unsubscribe from this group and stop receiving emails from it, send an email to
>     > To post to this group, send email to ffpack...@googlegroups.com
>     > <mailto:ffpack...@googlegroups.com>.
>     > Visit this group at http://groups.google.com/group/ffpack-devel
>     <http://groups.google.com/group/ffpack-devel>.
>     > For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to the Google Groups "ffpack-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
Reply all
Reply to author
Forward
0 new messages