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

L.C. Karssen lennart at karssen.org
Wed Mar 5 22:31:06 CET 2014


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
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: OpenPGP digital signature
URL: <http://lists.r-forge.r-project.org/pipermail/genabel-devel/attachments/20140305/ef1f98b8/attachment.sig>


More information about the genabel-devel mailing list