crazyboycjr / nethint

The prototype for NSDI paper "NetHint: White-Box Networking for Multi-Tenant Data Centers"
25 stars 2 forks source link

The version of rustc #63

Closed sftyzxg closed 1 year ago

sftyzxg commented 2 years ago

Hi! I am trying to use 'cargo run' to run the project, and received several warnings and errors, I am using rustc 1.66.0-nightly and I am wondering if I used a wrong version of rustc. The logs are as follows:

warning: the featurecommand_access` has been stable since 1.57.0 and no longer requires an attribute to enable --> src/utils/src/lib.rs:1:12 1 #![feature(command_access)] ^^^^^^^^^^^^^^

= note: #[warn(stable_features)] on by default

warning: utils (lib) generated 1 warning warning: field lambda is never read --> src/nethint/src/timer.rs:49:5 46 pub(crate) struct PoissonTimer { ------------ field in this struct ... 49 lambda: f64, ^^^^^^

= note: PoissonTimer has a derived impl for the trait Debug, but this is intentionally ignored during dead code analysis = note: #[warn(dead_code)] on by default

warning: field ts is never read --> src/nethint/src/hint.rs:57:5 56 struct Point { ----- field in this struct 57 ts: Timestamp, ^^

= note: Point has derived impls for the traits Clone and Debug, but these are intentionally ignored during dead code analysis

warning: nethint (lib) generated 2 warnings warning: field seed is never read --> src/allreduce/src/random_ring.rs:9:5 8 pub struct RandomRingAllReduce { ------------------- field in this struct 9 seed: u64, ^^^^

= note: RandomRingAllReduce has a derived impl for the trait Debug, but this is intentionally ignored during dead code analysis = note: #[warn(dead_code)] on by default

warning: allreduce (lib) generated 1 warning warning: the feature command_access has been stable since 1.57.0 and no longer requires an attribute to enable --> src/nhagent_v2/src/lib.rs:1:12 1 #![feature(command_access)] ^^^^^^^^^^^^^^

= note: #[warn(stable_features)] on by default

warning: nhagent_v2 (lib) generated 1 warning warning: field seed is never read --> src/rl/src/contraction.rs:9:5 8 pub struct Contraction { ----------- field in this struct 9 seed: u64, ^^^^

= note: Contraction has a derived impl for the trait Debug, but this is intentionally ignored during dead code analysis = note: #[warn(dead_code)] on by default

warning: field seed is never read --> src/rl/src/random_ring.rs:9:5 8 pub struct RandomChain { ----------- field in this struct 9 seed: u64, ^^^^

= note: RandomChain has a derived impl for the trait Debug, but this is intentionally ignored during dead code analysis

warning: rl (lib) generated 2 warnings warning: the feature command_access has been stable since 1.57.0 and no longer requires an attribute to enable --> src/nhagent/src/lib.rs:1:12 1 #![feature(command_access)] ^^^^^^^^^^^^^^

= note: #[warn(stable_features)] on by default

warning: nhagent (lib) generated 1 warning warning: the feature command_access has been stable since 1.57.0 and no longer requires an attribute to enable --> src/replayer/src/scheduler.rs:4:12 4 #![feature(command_access)] ^^^^^^^^^^^^^^

= note: #[warn(stable_features)] on by default

warning: field job_id is never read --> src/replayer/src/scheduler.rs:60:5 59 struct JobConfig { --------- field in this struct 60 job_id: usize, ^^^^^^

= note: JobConfig has derived impls for the traits Clone and Debug, but these are intentionally ignored during dead code analysis = note: #[warn(dead_code)] on by default

warning: the feature command_access has been stable since 1.57.0 and no longer requires an attribute to enable --> src/replayer/src/launcher.rs:8:12 8 #![feature(command_access)] ^^^^^^^^^^^^^^

= note: #[warn(stable_features)] on by default

warning: replayer (bin "scheduler") generated 2 warnings warning: replayer (bin "rplaunch") generated 1 warning warning: the feature bindings_after_at has been stable since 1.56.0 and no longer requires an attribute to enable --> src/replayer/src/controller/main.rs:1:12 1 #![feature(bindings_after_at)] ^^^^^^^^^^^^^^^^^

= note: #[warn(stable_features)] on by default

warning: replayer (bin "controller") generated 1 warning warning: unused import: std::sync::Arc --> src/rl/src/experiment.rs:3:5 3 use std::sync::Arc; ^^^^^^^^^^^^^^

= note: #[warn(unused_imports)] on by default

warning: unused import: Application --> src/rl/src/experiment.rs:9:21 | 9 | app::{AppGroup, Application}, | ^^^^^^^^^^^

warning: unused import: mapreduce::plink::PlinkApp --> src/rl/src/experiment.rs:16:5 | 16 | use mapreduce::plink::PlinkApp; | ^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: indicatif::MultiProgress --> src/rl/src/experiment.rs:22:5 | 22 | use indicatif::MultiProgress; | ^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused variable: first_ts --> src/nhagent_v2/src/main.rs:117:9 117 let first_ts = last_tp; ^^^^^^^^ help: if this is intentional, prefix it with an underscore: _first_ts
= note: `#[warn(unused_variables)]` on by default
warning: field committed_traffic is never read --> src/nhagent_v2/src/main.rs:235:5 232 struct Handler { ------- field in this struct ... 235 committed_traffic: HashMap<LinkIx, Vec>, ^^^^^^^^^^^^^^^^^
= note: `#[warn(dead_code)]` on by default

warning: associated function commit_chunk is never used --> src/nhagent_v2/src/main.rs:438:8 | 438 | fn commit_chunk(chunk1: &mut Vec, chunk2: &mut Vec) { | ^^^^^^^^^^^^

warning: rl (bin "rl_experiment") generated 4 warnings warning: nhagent_v2 (bin "nhagent_v2") generated 3 warnings Compiling allreduce v0.1.0 (/home/sftyzxg/Desktop/nethint/src/allreduce) warning: unused import: std::sync::Arc --> src/allreduce/src/experiment.rs:3:5 3 use std::sync::Arc; ^^^^^^^^^^^^^^

= note: #[warn(unused_imports)] on by default

warning: unused import: Application --> src/allreduce/src/experiment.rs:9:21 | 9 | app::{AppGroup, Application}, | ^^^^^^^^^^^

warning: unused import: mapreduce::plink::PlinkApp --> src/allreduce/src/experiment.rs:16:5 | 16 | use mapreduce::plink::PlinkApp; | ^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: allreduce (bin "allreduce_experiment") generated 3 warnings Compiling mapreduce v0.1.0 (/home/sftyzxg/Desktop/nethint/src/mapreduce) error[E0061]: this function takes 11 arguments but 9 arguments were supplied --> src/mapreduce/src/main.rs:205:38 205 let mapreduce_app = Box::new(MapReduceApp::new( __^^^^^^^^^^^^^^^^^- 206 seed, 207 job_spec, 208 None, ... 215 0.0, --- an argument of type Option<f64> is missing 216 false, 217 )); _____- an argument of type bool is missing
note: associated function defined here --> /home/sftyzxg/Desktop/nethint/src/mapreduce/src/app.rs:81:12 81 pub fn new( ^^^ help: provide the arguments
205 let mapreduce_app = Box::new(MapReduceApp::new(seed, job_spec, None, MapperPlacementPolicy::RandomSkew(seed_base + seed, 0.2), policy, nethint_level, opt.collocate, / Option /, false, 0.0, / bool /));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error[E0061]: this function takes 11 arguments but 7 arguments were supplied --> src/allreduce/src/main.rs:120:38 120 let allreduce_app = Box::new(AllReduceApp::new( __^^^^^^^^^^^^^^^^^- 121 job_spec, 122 None, 123 None, ... 127 opt.tune, 128 )); _____- multiple arguments are missing
note: associated function defined here --> /home/sftyzxg/Desktop/nethint/src/allreduce/src/app.rs:52:12 52 pub fn new( ^^^ help: provide the arguments
120 let allreduce_app = Box::new(AllReduceApp::new(job_spec, None, None, seed, all_reduce_policy, opt.nethint_level, opt.tune, / allreduce::config::ProbeConfig /, / bool /, / Option /, / usize /));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For more information about this error, try rustc --explain E0061. error: could not compile allreduce due to previous error warning: build failed, waiting for other jobs to finish... error: could not compile mapreduce due to previous error `

crazyboycjr commented 2 years ago

Sorry for the late response. I have added a rust-toolchain.

[toolchain]
channel = "nightly-2021-08-04"
components = [ "cargo", "clippy", "rust-docs", "rust-std", "rustc", "rustfmt", "rust-analyzer" ]
profile = "minimal"