Skip to content

Fix openib memory registration limit calculation if cutoff = 0. #1236

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

Merged
merged 1 commit into from
Dec 17, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion opal/mca/btl/openib/btl_openib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ int mca_btl_openib_add_procs(
}

openib_btl->local_procs += local_procs;
openib_btl->device->mem_reg_max /= openib_btl->local_procs;
openib_btl->device->mem_reg_max = openib_btl->device->mem_reg_max_total / openib_btl->local_procs;

return OPAL_SUCCESS;
}
Expand Down
2 changes: 1 addition & 1 deletion opal/mca/btl/openib/btl_openib.h
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ typedef struct mca_btl_openib_device_t {
/* Maximum value supported by this device for max_inline_data */
uint32_t max_inline_data;
/* Registration limit and current count */
uint64_t mem_reg_max, mem_reg_active;
uint64_t mem_reg_max, mem_reg_max_total, mem_reg_active;
/* Device is ready for use */
bool ready_for_use;
/* Async event */
Expand Down
3 changes: 2 additions & 1 deletion opal/mca/btl/openib/btl_openib_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -1630,7 +1630,8 @@ static int init_one_device(opal_list_t *btl_list, struct ibv_device* ib_dev)
}

device->mem_reg_active = 0;
device->mem_reg_max = calculate_max_reg(ibv_get_device_name(ib_dev));
device->mem_reg_max_total = calculate_max_reg(ibv_get_device_name(ib_dev));
device->mem_reg_max = device->mem_reg_max_total;
if(( 0 == device->mem_reg_max) && mca_btl_openib_component.abort_not_enough_reg_mem) {
return OPAL_ERROR;
}
Expand Down