[ET Trac] [Einstein Toolkit] #1958: parfiles accept 1.0, 0.0, 1e3 for integer typed parameters
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Thu Sep 22 10:17:27 CDT 2016
#1958: parfiles accept 1.0, 0.0, 1e3 for integer typed parameters
-----------------------+----------------------------------------------------
Reporter: rhaas | Owner:
Type: defect | Status: new
Priority: optional | Milestone:
Component: Cactus | Version: development version
Resolution: | Keywords:
-----------------------+----------------------------------------------------
Comment (by knarf):
Such an extra check shouldn't be necessary. Parameters are correctly
parsed as integers or reals. However, right now the code includes a step
that tries to convert any real to integer if it can be done without loss
of precision. This is 'safe' because any integer can be interpreted as
real as well. Look for integerize() in src/piraha/Call.cc. Making this
function a no-op catches the example given in this ticket and (in the one
test I did) still works otherwise as far as my limited test can show.
However, since this was apparently done deliberately, I would wait for
input from Steve to see why, and what possible consequences of removing it
could be.
In the end it is most likely more a question of what we like.
As to masking errors in par file generators: as long as it generates 24.0
(dot zero) all should be fine. As soon as you get something else than an
"integer", Cactus should complain loudly. Is the problem that a generator
might create a gazillion files of which some could work (by chance hitting
an integer), and some might not? I could see that this could be ...
inconvenient.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1958#comment:1>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list