[GenABEL-dev] [Genabel-commits] r1635 - in pkg/OmicABELnoMM: . tests

Frank, Alvaro Jesus alvaro.frank at rwth-aachen.de
Wed Mar 5 22:44:46 CET 2014


Hi Lennart,

I will take a look at it. At the moment those are base tests and more comprehensive ones should follow soon once the base one is integrated into the automake. I still need to rework some verbosity problem when performing hundreds of tests, too much output wont give meaningful information.

Ill keep you posted.

Alvaro
________________________________________
From: genabel-devel-bounces at lists.r-forge.r-project.org [genabel-devel-bounces at lists.r-forge.r-project.org] on behalf of L.C. Karssen [lennart at karssen.org]
Sent: Wednesday, March 05, 2014 10:31 PM
To: genabel-devel at lists.r-forge.r-project.org
Subject: Re: [GenABEL-dev] [Genabel-commits] r1635 - in pkg/OmicABELnoMM: .     tests

Hi Alvaro,

On 05-03-14 20:54, noreply at r-forge.r-project.org wrote:
> Author: afrank
> Date: 2014-03-05 20:54:09 +0100 (Wed, 05 Mar 2014)
> New Revision: 1635
>
> Added:
>    pkg/OmicABELnoMM/tests/
>    pkg/OmicABELnoMM/tests/Makefile
>    pkg/OmicABELnoMM/tests/test.cpp
> Log:
> Added base tests for validity under tests folder. This should be passed by any build of the solver.

Good news to see you've developed tests and put them in a separate
directory. I'll put it on my todo list to add them to automake so they
will be run when the user runs 'make check'. I won't have time this week
or the next, so if you'd like to do this yourself, please go ahead! See
ProbABEL/checks/Makefile.am for example code.


Thanks,

Lennart.


>
> Added: pkg/OmicABELnoMM/tests/Makefile
> ===================================================================
> --- pkg/OmicABELnoMM/tests/Makefile                           (rev 0)
> +++ pkg/OmicABELnoMM/tests/Makefile   2014-03-05 19:54:09 UTC (rev 1635)
> @@ -0,0 +1,2 @@
> +normal:
> +             g++ *.cpp ../src/Algorithm.cpp ../src/Utility.cpp ../src/AIOwrapper.cpp -o test.out -L/usr/lib/openblas-base -lpthread -lopenblas -llapacke -fopenmp -O2 -g -Wall -pedantic -Wunused-result -Wmaybe-uninitialized -Wformat -g
> \ No newline at end of file
>
>
> Property changes on: pkg/OmicABELnoMM/tests/Makefile
> ___________________________________________________________________
> Added: svn:executable
>    + *
>
> Added: pkg/OmicABELnoMM/tests/test.cpp
> ===================================================================
> --- pkg/OmicABELnoMM/tests/test.cpp                           (rev 0)
> +++ pkg/OmicABELnoMM/tests/test.cpp   2014-03-05 19:54:09 UTC (rev 1635)
> @@ -0,0 +1,85 @@
> +//export MKL_NUM_THREADS=1 OMP_NUM_THREADS=1 OMP_NESTED=true
> +#include <unistd.h>
> +#include <getopt.h>
> +
> +
> +
> +#include "../src/Definitions.h"
> +#include "../src/Algorithm.h"
> +
> +
> +
> +int main(int argc, char *argv[] )
> +{
> +    struct Settings params;
> +
> +    params.ForceCheck = true;
> +
> +
> +    //!default params
> +    params.r = 1;
> +    params.threads = 1;
> +
> +    omp_set_num_threads(params.threads);
> +    blas_set_num_threads(params.threads);
> +
> +    Algorithm alg;
> +
> +    params.use_fake_files = true;
> +    int iters = 10;
> +    int max_threads = 2;
> +
> +
> +    for (int th = 0; th < max_threads; th++)
> +    {
> +        params.threads = th;
> +
> +        params.n=10; params.l=4;  params.r=1;
> +        params.t=16; params.tb=1; params.m=16; params.mb=1;
> +
> +        struct Outputs out = {0};
> +        for (int i = 0; i < iters; i++)
> +        {
> +            alg.solve(params, out, P_NEQ_B_OPT_MD);
> +        }
> +        cout << endl;
> +        /******************************/
> +        params.n=10; params.l=4;  params.r=2;
> +        params.t=16; params.tb=4; params.m=16; params.mb=4;
> +
> +
> +        for (int i = 0; i < iters; i++)
> +        {
> +            alg.solve(params, out, P_NEQ_B_OPT_MD);
> +        }
> +        cout << endl;
> +        /******************************/
> +        params.n=10; params.l=4;  params.r=2;
> +        params.t=16; params.tb=5; params.m=16; params.mb=3;
> +
> +
> +        for (int i = 0; i < iters; i++)
> +        {
> +            alg.solve(params, out, P_NEQ_B_OPT_MD);
> +        }
> +        cout << endl;
> +        /******************************/
> +        params.n=10; params.l=4;  params.r=2;
> +        params.t=4; params.tb=4; params.m=4; params.mb=4;
> +
> +
> +        for (int i = 0; i < iters; i++)
> +        {
> +            alg.solve(params, out, P_NEQ_B_OPT_MD);
> +        }
> +        cout << endl;
> +
> +    }
> +
> +    cout << "\nTest finished succesfully\n";
> +
> +
> +
> +
> +    return 0;
> +}
>
> _______________________________________________
> Genabel-commits mailing list
> Genabel-commits at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-commits
>

--
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
L.C. Karssen
Utrecht
The Netherlands

lennart at karssen.org
http://blog.karssen.org
GPG key ID: A88F554A
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-



More information about the genabel-devel mailing list