Skip to content

Commit

Permalink
fix cache padding in device; fix spack package pmix option; fix READM…
Browse files Browse the repository at this point in the history
…E typo;
  • Loading branch information
JiakunYan committed Feb 16, 2024
1 parent 1284e2c commit 1a1b557
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ make install
- `ofi`: libfabrics, for all other networks (slingshot-11, ethernet, shared memory).
- `LCI_FORCE_SERVER=ON/OFF`: Default value is `OFF`. If it is set to `ON`,
`LCI_SERVER` will not be treated as a hint but a requirement.
- `LCI_WITH_LCT_ONLY=ON/OFF`: Whether to only build LCT (The Lightweight COmmunication Tools).
- `LCI_WITH_LCT_ONLY=ON/OFF`: Whether to only build LCT (The Lightweight Communication Tools).
Default is `OFF` (build both LCT and LCI).

## Run LCI applications
Expand Down
8 changes: 6 additions & 2 deletions contrib/spack/packages/lci/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def is_positive_int(val):
variant('papi', default=False,
description='Use PAPI to collect hardware counters')
variant('gprof', default=False, description='Enable GPROF')
variant('enable-pmix', default=True, description='Enable PMIx as the process management backend')
variant('enable-pmix', default='auto', values=is_positive_int,
description='Enable PMIx as the process management backend')

generator("ninja", "make", default="ninja")

Expand Down Expand Up @@ -110,9 +111,12 @@ def cmake_args(self):
self.define_from_variant('LCI_ENABLE_SLOWDOWN', 'debug-slow'),
self.define_from_variant('LCI_USE_PAPI', 'papi'),
self.define_from_variant('LCI_USE_GPROF', 'gprof'),
self.define_from_variant('LCT_PMI_BACKEND_ENABLE_PMIX', 'enable-pmix'),
]

if self.spec.variants['enable-pmix'].value != 'auto':
arg = self.define_from_variant('LCT_PMI_BACKEND_ENABLE_PMIX', 'enable-pmix')
args.append(arg)

if self.spec.variants['cache-line'].value != 'auto':
arg = self.define_from_variant('LCI_CACHE_LINE', 'cache-line')
args.append(arg)
Expand Down
4 changes: 2 additions & 2 deletions lci/runtime/lcii.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ struct __attribute__((aligned(LCI_CACHE_LINE))) LCI_device_s {
LCII_rcache_t rcache; // 8B
LCI_lbuffer_t heap; // 24B
uintptr_t base_packet; // 8B
LCIU_CACHE_PADDING(sizeof(LCIS_server_t) + 2 * sizeof(LCIS_endpoint_t) -
sizeof(LCII_pool_t*) + sizeof(LCI_matchtable_t) -
LCIU_CACHE_PADDING(sizeof(LCIS_server_t) + 2 * sizeof(LCIS_endpoint_t) +
sizeof(LCII_pool_t*) + sizeof(LCI_matchtable_t) +
sizeof(LCII_rcache_t*) + sizeof(LCI_lbuffer_t) +
sizeof(uintptr_t));
// the following is shared by both progress threads and worker threads
Expand Down

0 comments on commit 1a1b557

Please sign in to comment.