Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seemingly random "Maximum" values #152

Open
JohnHadish opened this issue Jun 11, 2020 · 3 comments
Open

Seemingly random "Maximum" values #152

JohnHadish opened this issue Jun 11, 2020 · 3 comments
Assignees
Milestone

Comments

@JohnHadish
Copy link
Collaborator

When using the KINC help documentation, "maximum" values for --bsize, --gsize, and --lsize are set to 2147483647:

--bsize <value>
Value Type: Integer
Minimum Value: 0
Maximum Value: 2147483647
Default Value: 0
Number of pairs to process in each work block.

--gsize <value>
Value Type: Integer
Minimum Value: 1
Maximum Value: 2147483647
Default Value: 4096
The global work size for each OpenCL worker.

--lsize <value>
Value Type: Integer
Minimum Value: 1
Maximum Value: 2147483647
Default Value: 32
The local work size for each OpenCL worker.

I am sure there is an interesting reason for this number, but to me, it makes it look like the KINC documentation is glitching. I suggest that we remove this "maximum" value from the documentation, as it realistically provides no useful information .

Rather than have this value be mentioned in the documentation, KINC could simply send an error in the unlikley event that a user chooses a number greater than 2147483647:

Error: Maximum Value for `--lsize` is 2147483647. Please choose a smaller value.

Proposed new documentation for these parameters:

--bsize <value>
Value Type: Integer
Minimum Value: 0
Default Value: 0
Number of pairs to process in each work block.

--gsize <value>
Value Type: Integer
Minimum Value: 1
Default Value: 4096
The global work size for each OpenCL worker.

--lsize <value>
Value Type: Integer
Minimum Value: 1
Default Value: 32
The local work size for each OpenCL worker.

@spficklin
Copy link
Member

Perhaps we should specify a real limit instead of using the maximum integer size.

@spficklin
Copy link
Member

@4ctrl-alt-del can you suggest some reasonable limits for these options?

@bentsherman
Copy link
Member

@JohnHadish @spficklin The maximum limits for these options will vary from system to system depending on things like amount of RAM and the GPU model. In other words they are limited by the underlying hardware. So there are really no sensible software-imposed limits that we could use, other than the integer limits.

If you don't like the help text because it seems ugly, I suppose we could remove the maximum settings from the code. I've never tried it but I think ACE just wouldn't check against a maximum. In that case the user would be able to specify some huge number and I'm not sure what would happen, ACE might throw a parsing error or might allow the number to overflow which would be a silent error. Of course the user will probably never come close to such large numbers for these particular parameters... right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants