-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Setting LAMELLAR_UNSPAWNED_TASK_WARNING=0 does not suppress the corresponding warning as expected.
In cases where I call world.wait_all(); without spawning, the following warning appears (whether or not the variable LAMELLAR_UNSPAWNED_TASK_WARNING is set to 0)
[LAMELLAR WARNING] you have called `wait_all` before all tasks/active messages have been spawned.
This typically means you forgot to call spawn() on the handle returned from calls such as exec_am_* or various array operations.
If this is your intended behavior, set LAMELLAR_UNSPAWNED_TASK_WARNING=0 to disable this warning.
Note that this warning is informative only, and will not terminate your application.
To disable runtime warnings completely, recompile lamellar with the `disable-runtime-warnings` feature.
Alternatively, you can force runtime warnings to cause a panic by recompiling with the `runtime-warnings-panic` feature.
To view backtrace set RUST_LIB_BACKTRACE=1.
Minimal reproducible example
//! This file was written as a minimal reproducible example of a warning suppression issue
//! in the Lamellar runtime. The issue is that the warning about unspawned tasks
//! is not suppressed when the `LAMELLAR_UNSPAWNED_TASK_WARNING` environment
//! variable is set to `0`.
//!
//!
//! To run this example: (1) place this file in the `src/bin` directory of a Lamellar project,
//! (2) run `cargo build --release` to compile the project, and (3)
//! execute the following command:
//! ```bash
//! LAMELLAR_UNSPAWNED_TASK_WARNING=0 RUST_LIB_BACKTRACE=FULL LAMELLAR_DEADLOCK_TIMEOUT=20 LAMELLAR_THREADS=4 srun --cpus-per-task=4 --cpu-bind=ldoms,v -N 1 --ntasks-per-node=16 -A lamellar --mpi=pmi2 --exclusive path/to/this/file/in/crate/target/release
//! ```
// ===========================================================================
// MAIN THREAD
// ===========================================================================
use lamellar::active_messaging::prelude::*;
fn main() {
let world = lamellar::LamellarWorldBuilder::new().build();
let am = DoNothing {}; // create an active message that does nothing
let _ = world.exec_am_pe( 0, am );
world.wait_all(); // wait for the active message to complete
world.barrier();
}
// ===========================================================================
// ACTIVE MESSAGE
// ===========================================================================
/// Allows each node to transmit data about the number of nonzero entries it holds in each column.
#[lamellar::AmData(Debug, Clone)]
pub struct DoNothing {}
#[lamellar::am]
impl LamellarAM for DoNothing {
async fn exec(self) {
// do nothing
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels