Crates.io | openshmem-rs |
lib.rs | openshmem-rs |
version | 1.5.2-3 |
source | src |
created_at | 2024-11-01 18:08:47.364147 |
updated_at | 2024-11-05 17:50:47.071655 |
description | Wrappers for the OpenSHMEM API. |
homepage | |
repository | https://github.com/kumaryash6352/openshmem-rs |
max_upload_size | |
id | 1432118 |
size | 81,380 |
Rust bindings for the OpenSHMEM 1.5 (and soon 1.6) communication API.
Quick start:
let ctx = ShmemCtx::init()?;
let my_pe = ctx.my_pe().raw();
let npes = ctx.n_pes();
println!("Hello from PE {my_pe}!");
See ./examples/ for example programs.
This library depends on openshmem-sys
. Building the sys crate
requires the environment variable SHMEM_INSTALL_DIR
to point to
a directory containing your OpenSHMEM installation. Your
SHMEM_INSTALL_DIR
should contain a lib/
and a
include/
. For example, this is the output of tree
on the
SHMEM_INSTALL_DIR
for Sandia OpenSHMEM.
├── ...
├── include/
│ ├── mpp/
│ ├── shmem-def.h
│ ├── shmem.fh
│ ├── shmem.h
│ ├── shmemx-def.h
│ ├── shmemx.fh
│ └── shmemx.h
├── lib/
│ ├── libsma.0.dylib
│ ├── libsma.a
│ └── ...
└── ...
We currently test with Sandia OpenSHMEM as the underlying OpenSHMEM implementation.
If you want rust-analyzer to function correctly, you'll need to pass
SHMEM_INSTALL_DIR
to rust-analyzer.
Add this to your user settings JSON.
...
"rust-analyzer.server.extraEnv": { "SHMEM_INSTALL_DIR": "~/my-shmem-install-dir" },
...
Add this to your configuration.
(setq lsp-rust-analyzer-cargo-extra-env ["SHMEM_INSTALL_DIR", "~/my-shmem-install-dir"])
Rebecca Hassett and Tony Curtis at Stony Brook University created the RustySHMEM project, which this library draws heavy inspiration from.