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

[timeseries] integer division or modulo by zero #180

Open
lvankampenhout opened this issue Nov 6, 2018 · 1 comment
Open

[timeseries] integer division or modulo by zero #180

lvankampenhout opened this issue Nov 6, 2018 · 1 comment

Comments

@lvankampenhout
Copy link

lvankampenhout commented Nov 6, 2018

I'm attempting to make timeseries of some 1-year test run that I did on an external machine. I'm using one node with 24 cores and run into the following error message:

integer division or modulo by zero

I was able to trace this back to the function divide_comm() in cesm_tseries_generator.py where there is the following code:

    min_procs_per_spec = 36
    size = scomm.get_size()
    rank = scomm.get_rank()

    if l_spec == 1:
        num_of_groups = 1
    else:
        num_of_groups = size/min_procs_per_spec
(...)
        temp_color = (rank % num_of_groups)+1

In my case l_spec equals 17 so the number of groups is 24 divided by 36, which is rounded down to 0.

I imagine the solution could be to either raise a helpful error message ("number of cores must >= 36") or to remove the magic number 36, or both.

@bertinia
Copy link
Contributor

bertinia commented Nov 7, 2018

@lvankampenhout - the decision to hardcode the min_procs_per_spec = 36 is based on optimizing
the single variable timeseries generation for the CMIP6 experiments on cheyenne. We might be able
to make this setting an XML variable so it's not so restrictive to just NCAR machines. Thanks for the
bringing this up.

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

2 participants