JeffersonLab / qphix

QCD for Intel Xeon Phi and Xeon processors
http://jeffersonlab.github.io/qphix/
Other
13 stars 11 forks source link

SOALEN as a runtime parameter breaks client codes #59

Closed kostrzewa closed 7 years ago

kostrzewa commented 7 years ago

Having to wrap for variable soalen is also really annoying. I thought that you had simply added code to the tests which instantiated all currently useful soalen and appropriate switch statements (or otherwise), to get at the instances via the runtime parameter. I'm not sure that I like the fact that QPHIX_SOALEN is not a configure-time parameter anymore..

kostrzewa commented 7 years ago

In tmLQCD, I'll work around it by setting QPHIX_SOALEN in our configure procedure, for now. Maybe we can work out something nicer.

bjoo commented 7 years ago

I think it was meant to be runtime only for youthe tests. Ultimately it is a template param which is compile time. In the testing it seemed more flexible to have it as a command line param rather than have to recompile to test different SOAs.

In Chroma I adopted a similar approach to you: I set precision, SOALEN, inner solver precision (for the iterative refinement solver) and inner SOALEN, as well as compression parameters at configure time.

Best, B

On June 15, 2017 6:56:42 AM EDT, Bartosz Kostrzewa notifications@github.com wrote:

In tmLQCD, I'll work around it by setting QPHIX_SOALEN in our configure procedure.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_JeffersonLab_qphix_issues_59-23issuecomment-2D308698518&d=DwICaQ&c=lz9TcOasaINaaC3U7FbMev2lsutwpI4--09aP8Lu18s&r=SC-qvz5njMoFH6cliT5XZQ&m=buOO2dokstt0uhsPFvUoyQSx69CeS_26__jd_hr6Nsk&s=mEo_o-0FXnRQ8t5tR5iACkNJh-3e2gt_ZJidqS8_KQM&e=

-- Balint Joó, Scientific Computing Group, Jefferson Lab Email: bjoo@jlab.org Tel: +1 757 269 5339 Sent form my mobile phone

martin-ueding commented 7 years ago

I think the soalen should be set at configuration time of the dependent program. If one did not build any tests, the --enable-soalen of the QPhiX-configure would just set QPHIX_SOALEN in the config.h. Setting a QPHIX_SOALEN in tmLQCD makes more sense to me.

Looping over all those template parameters is a little less bad when you use the class from tests/tparam_selector.h.

If you still don't like it, I could also revert that commit and then one would have to give QPhiX-configure the --enable-soalen which would then put that into QPhiX-config.h.

kostrzewa commented 7 years ago

I think the solution with setting it in the tmLQCD configure is currently the best option. In the long run, something like the tparam_selector classes could be a useful addition to the tmLQCD interface.