Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

use slab allocation #21

Closed
jeffhammond opened this issue Sep 16, 2018 · 1 comment
Closed

use slab allocation #21

jeffhammond opened this issue Sep 16, 2018 · 1 comment
Assignees

Comments

@jeffhammond
Copy link
Owner

jeffhammond commented Sep 16, 2018

Instead of allocating a window for every call to ARMCI_Malloc, allocate a single slab according to GA_Initialize_ltd and suballocate from there. This will obviate the need for any GMR lookups, which helps latency.

A more general approach would be to use a slab of some capacity and then allocate a window per call for allocation in excess of that. Thus, the GMR lookup would start with a simple range check (fast) and only hit the O(n) linked-list traversal when the slab capacity was exceeded.

The key to implementing this is ARMCI_Set_shm_limit, which tells ARMCI what the upper bound on how much storage to allocate:

Global Arrays global/src/base.c line 374:

        if(GA_memory_limited) ARMCI_Set_shm_limit(GA_total_memory);
        if (_ga_initialize_c) {
            if (_ga_initialize_args) {
                ARMCI_Init_args(_ga_argc, _ga_argv);
            }
            else {
                ARMCI_Init();
            }
        }

NWChem always uses ga_initialize_ltd and requires the user to specify the GA allocation size, so no changes to NWChem are required to activate this.

@jeffhammond jeffhammond self-assigned this Sep 16, 2018
@jeffhammond jeffhammond modified the milestone: version 2.0 Sep 16, 2018
@jeffhammond
Copy link
Owner Author

Migrated to pmodels/armci-mpi#16

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

No branches or pull requests

1 participant