
Alain Roy wrote:
Michel Drescher wrote:
So you may want to specify 3.14 for jsdl:IndividualCPUCount, but the consuming system then may - throw the JSDL doc back at you nagging about silly values, or - accept the document and use 3.0 instead, or - do something else, e.g. cause a kernel panic in the underlying OS. ;-)
You're right: it is because of how ranges are specified.
Let me make the small suggestion that if there is a future version of JSDL, you consider adding a way to specify this in positive integers, so it's harder for people to specify something meaningless.
Why? Any sensible value for the fundamentally-integral ranges is exactly representable using a double. On the other hand, introducing a separate range typing scheme for integers greatly increases the amount of work needed to write matching engines *and* it also would have made the schema longer and more complicated. It's big enough already. Anyway, if people want to specify meaningless things, they will do anyway. (For example, they can write a document that uses a mailto: URL as a data staging source, which is totally meaningless as the mailto: scheme doesn't work that way round.) Given that, it is 100% expected that not all syntactically-valid JSDL documents will describe things that are possible and sensible. You have to check for yourself. In my experience, attempting to restrict the space of legal documents so that only meaningful things may be said is likely to lead to there being some meaningful things that can't be said. (Are you *sure* that the hardware people will never figure out how to do a fractional CPU? I've seen some strange things in my time...) Of course, for the specific example I would imagine that if someone asks for exactly 3.14 CPUs, the job manager will be unable to allocate that quantity of resources (e.g. only having 3.0 or 4.0 available) and the match will fail. Which would not be our fault, but rather poor job composition by the user (or their agent). End of problem. Donal.