<div dir="ltr">Hi Michael,<br><br>thanks for the patch! I'm, however, not sure if we can include it in its current form.<br>The problem is that the data-dir itself has subdirectories. Hence, it wouldn't work for example with DFTB runs.<br><br>I suppose you encounted this problem when picking regtest-inputs as examples for the Debian package?<br>I think the best solution for the time being is to just patch the paths in the input-files directly.<br><br>> Finally, I tripped over the fact that -D__DATA_DIR= and $CP2K_DATA_DIR
require a trailing slash, ...<br><br>Good point! I will write a routine to properly join paths.<br><br>-Ole<br><br>Am Freitag, 1. Mai 2015 17:41:16 UTC+2 schrieb Michael:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hi,
<br>
<br>the -D__DATA_DIR= and $CP2K_DATA_DIR options are really neat, but most
<br>regressions test ship with relative pathnames to the data files.
<br>
<br>In order for those to be more useful, I wrote a small patch so that
<br>strings passed as *_FILE_NAME in input will not only be looked for in
<br>the above two directories (if present) but alternatively also just the
<br>last segment of the string, i.e. the file name without path.
<br>
<br>So for "POTENTIAL_FILE_NAME ../../../data/POTENTIAL" and
<br>$CP2K_DATA_DIR=/usr/local/<wbr>share/cp2k/, it would look up the potential
<br>file in both /usr/local/share/cp2k/../../..<wbr>/data/POTENTIAL and
<br>(new and more useful) /usr/local/share/cp2k/<wbr>POTENTIAL.
<br>
<br>I took the code from [1] (which appears to be in the public domain [2]),
<br>so kept the author, but it is slightly adapted and only a few lines so I
<br>don't think it's even copyrightable.  In any case, feel free to rewrite
<br>it to your taste.
<br>
<br>Finally, I tripped over the fact that -D__DATA_DIR= and $CP2K_DATA_DIR
<br>require a trailing slash, or else CP2K looks for
<br>"/usr/local/share/<wbr>cp2kPOTENTIAL".  I've inserted that slash as I thought
<br>it wouldn't hurt.
<br>
<br>
<br>Michael
<br>
<br>[1] <a href="http://www.cesm.ucar.edu/models/cesm1.3/cesm/cesmBbrowser/html_code/clm/fileutils.F90.html" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.cesm.ucar.edu%2Fmodels%2Fcesm1.3%2Fcesm%2FcesmBbrowser%2Fhtml_code%2Fclm%2Ffileutils.F90.html\46sa\75D\46sntz\0751\46usg\75AFQjCNEQ8u8LOSOTKwtVXWgwRvL2hNRQgw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.cesm.ucar.edu%2Fmodels%2Fcesm1.3%2Fcesm%2FcesmBbrowser%2Fhtml_code%2Fclm%2Ffileutils.F90.html\46sa\75D\46sntz\0751\46usg\75AFQjCNEQ8u8LOSOTKwtVXWgwRvL2hNRQgw';return true;">http://www.cesm.ucar.edu/<wbr>models/cesm1.3/cesm/<wbr>cesmBbrowser/html_code/clm/<wbr>fileutils.F90.html</a>
<br>[2] <a href="http://www.cesm.ucar.edu/models/cesm1.3/copyright.html" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.cesm.ucar.edu%2Fmodels%2Fcesm1.3%2Fcopyright.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHK73M-H2mXJlEhFhHnnFYd_vxsgw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.cesm.ucar.edu%2Fmodels%2Fcesm1.3%2Fcopyright.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHK73M-H2mXJlEhFhHnnFYd_vxsgw';return true;">http://www.cesm.ucar.edu/<wbr>models/cesm1.3/copyright.html</a>
<br>
<br></blockquote></div>