runtests.py -i : AND or OR?  [SOLVED]

Documentation, Web site and code modifications

Moderators: baguetl, routerov

Locked
User avatar
jzwanzig
Posts: 504
Joined: Mon Aug 17, 2009 9:25 am

runtests.py -i : AND or OR?

Post by jzwanzig » Wed Jan 08, 2014 6:10 pm

Hi,

the documentation for runtests.py -i suggests that if two keywords are given, the tested input file must contain both. However, it appears to trigger execution if the input file contains either. For example, runtests.py -i 'berryopt, pawecutdg' causes execution of tutorial/tldau_1, which contains pawecutdg but not berryopt.

Is this the expected behavior? Is there a way to select only files with all of a list of keywords present?

thanks,
Joe
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com

User avatar
gmatteo
Posts: 291
Joined: Sun Aug 16, 2009 5:40 pm

Re: runtests.py -i : AND or OR?  [SOLVED]

Post by gmatteo » Thu Jan 09, 2014 1:51 pm

Hi Joe,

it's an unintended feature aka bug ;). Fixed in my 7.6.1 branch.

Please note that the parser used by runtests.py is very primitive since:

1) it does not know the default values of dtset (indefo.F90)
2) Only scalar integers are supported
3) it's a line-based parser that is not fully compatible with the grammar used for the abinit input file (tokens such as *, :, +, are not recognized)

I seldom use -i for my tests. I usually select a subset of tests via keywords instead of input variables.
If my understanding is correct, you want to select the PAW inputs where we test Berry phase calculations.
To select such tests one can use:

runtests.py -k PAW BERRY

To restrict the search to a particular set of directories, use

runtests.py v1 tutorial -k PAW BERRY # only Berry phase tests in v1 and in tutorial

This approach is more robust The price to pay is that you have to add the string BERRY to the list of keywords specified in the TEST_INFO section associated to
the different input files.

BTW, Remember to pass the option -r to runtests.py once you are done with these changes so that the script will generate a new pickle database
that is coherent with the new input files (-r is needed only the first time you run the script)

Cheers,
Matteo

Locked