diff --git a/.vscode/settings.json b/.vscode/settings.json index 1d4903a55..47cbecb37 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,9 +5,8 @@ "rust-analyzer.checkOnSave.command": "reap-clippy", "rust-analyzer.cargo.allFeatures": false, "rust-analyzer.cargo.features": [ - "rustcoalescence-algorithms-gillespie", - "rustcoalescence-algorithms-independent", - "rustcoalescence-algorithms-cuda", - "necsim-partitioning-mpi" + "all-algorithms", + "all-scenarios", + "mpi-partitioning" ], } diff --git a/Cargo.lock b/Cargo.lock index c7c4c3eef..f09359f04 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,9 +10,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" dependencies = [ "cfg-if", "getrandom", @@ -38,9 +38,9 @@ checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] name = "anstream" -version = "0.6.5" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" +checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" dependencies = [ "anstyle", "anstyle-parse", @@ -52,9 +52,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" @@ -86,9 +86,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" [[package]] name = "array-init-cursor" @@ -141,9 +141,9 @@ checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "bincode" @@ -195,7 +195,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.48", + "syn 2.0.49", "which", ] @@ -207,9 +207,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" dependencies = [ "serde", ] @@ -235,15 +235,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "d32a994c2b3ca201d9b263612a374263f05e7adde37c4707f693dcd375076d1f" [[package]] name = "bytemuck" -version = "1.14.0" +version = "1.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +checksum = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" dependencies = [ "bytemuck_derive", ] @@ -256,7 +256,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -276,9 +276,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" +checksum = "694c8807f2ae16faecc43dc17d74b3eb042482789fd0eb64b39a2e04e087053f" dependencies = [ "serde", ] @@ -292,7 +292,7 @@ dependencies = [ "camino", "cargo-platform", "derive_builder", - "semver 1.0.21", + "semver 1.0.22", "serde", "serde_json", "thiserror", @@ -325,9 +325,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" dependencies = [ "num-traits", ] @@ -345,9 +345,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.13" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52bdc885e4cacc7f7c9eedc1ef6da641603180c783c41a15c264944deeaab642" +checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" dependencies = [ "clap_builder", "clap_derive", @@ -355,33 +355,33 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.12" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb7fb5e4e979aec3be7791562fcba452f94ad85e954da024396433e0e25a79e9" +checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim", + "strsim 0.11.0", ] [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "colorchoice" @@ -442,9 +442,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] @@ -499,7 +499,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim", + "strsim 0.10.0", "syn 1.0.109", ] @@ -564,7 +564,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -575,9 +575,9 @@ checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "erased-serde" @@ -658,9 +658,9 @@ checksum = "ee1b05cbd864bcaecbd3455d6d967862d446e4ebfc3c2e5e5b9841e53cba6673" [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "js-sys", @@ -686,7 +686,7 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -780,24 +780,24 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" dependencies = [ "libc", ] [[package]] name = "jpeg-decoder" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" +checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" dependencies = [ "wasm-bindgen", ] @@ -816,9 +816,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.151" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libloading" @@ -848,9 +848,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "log" @@ -892,9 +892,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] @@ -921,7 +921,7 @@ source = "git+https://github.com/juntyr/rsmpi?rev=ed8c10d#ed8c10d1a64b6f63c57d91 dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -1137,7 +1137,7 @@ dependencies = [ "necsim-core-bond", "necsim-plugins-core", "rustc_version 0.4.0", - "semver 1.0.21", + "semver 1.0.22", "serde", "serde_json", "tskit", @@ -1156,9 +1156,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", ] @@ -1190,9 +1190,9 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "pest" -version = "2.7.6" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" +checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" dependencies = [ "memchr", "thiserror", @@ -1201,9 +1201,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "planus" @@ -1227,7 +1227,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ "proc-macro2", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -1256,9 +1256,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.76" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -1283,7 +1283,7 @@ dependencies = [ "lazy_static", "libc", "regex", - "semver 1.0.21", + "semver 1.0.22", "thiserror", "toml", ] @@ -1329,9 +1329,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", @@ -1341,9 +1341,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -1363,7 +1363,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64", - "bitflags 2.4.1", + "bitflags 2.4.2", "serde", "serde_derive", ] @@ -1374,7 +1374,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -1475,7 +1475,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.21", + "semver 1.0.22", ] [[package]] @@ -1622,11 +1622,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno", "libc", "linux-raw-sys", @@ -1635,9 +1635,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "seahash" @@ -1656,9 +1656,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" dependencies = [ "serde", ] @@ -1674,22 +1674,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] @@ -1705,9 +1705,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.111" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ "itoa", "ryu", @@ -1741,9 +1741,9 @@ checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" [[package]] name = "shlex" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "simdutf8" @@ -1762,9 +1762,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "stable_deref_trait" @@ -1793,6 +1793,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" + [[package]] name = "syn" version = "1.0.109" @@ -1806,9 +1812,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496" dependencies = [ "proc-macro2", "quote", @@ -1817,29 +1823,29 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] [[package]] name = "tiff" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d172b0f4d3fba17ba89811858b9d3d97f928aece846475bbda076ca46736211" +checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" dependencies = [ "flate2", "jpeg-decoder", @@ -1949,9 +1955,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1959,24 +1965,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1984,28 +1990,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] name = "weezl" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" +checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "which" @@ -2190,5 +2196,5 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.49", ] diff --git a/README.md b/README.md index 6db036df2..0698d53eb 100644 --- a/README.md +++ b/README.md @@ -48,17 +48,17 @@ If you also want to use the CUDA-based algorithm, it is **required** that you al ## Installation -To install `rustcoalescence`, you need to decide which algorithms you want to compile with it. You can enable the provided algorithms by enabling their corresponding features. For instance, to compile all CPU-based algorithms, you can use +To install `rustcoalescence`, you need to decide which algorithms you want to compile with it. You can enable the provided algorithms by enabling their corresponding features. For instance, to compile all CPU-based algorithms with all scenarios, you can use ```shell -> cargo install --path rustcoalescence --locked --features rustcoalescence-algorithms-gillespie --features rustcoalescence-algorithms-independent +> cargo install --path rustcoalescence --locked --features gillespie-algorithms --features independent-algorithm --features all-scenarios ``` -To install with CUDA support, you first need to ensure that the dynamic CUDA libraries are in the `LD_LIBRARY_PATH` and enable the `rustcoalescence-algorithms-cuda` feature: +To install with CUDA support, you first need to ensure that the dynamic CUDA libraries are in the `LD_LIBRARY_PATH` and enable the `cuda-algorithm` feature: ```shell -> LIBRARY_PATH="$LD_LIBRARY_PATH" cargo install --path rustcoalescence --locked [...] --features rustcoalescence-algorithms-cuda +> LIBRARY_PATH="$LD_LIBRARY_PATH" cargo install --path rustcoalescence --locked [...] --features cuda-algorithm ``` -To compile with MPI support, you need to enable the `necsim-partitioning-mpi` feature: +To compile with MPI support, you need to enable the `mpi-partitioning` feature: ```shell -> cargo install --path rustcoalescence --locked [...] --features necsim-partitioning-mpi +> cargo install --path rustcoalescence --locked [...] --features mpi-partitioning ``` After compilation, you can then run `rustcoalescence` using: ```shell diff --git a/rustcoalescence/Cargo.toml b/rustcoalescence/Cargo.toml index ebf41fc18..d08d7a3a9 100644 --- a/rustcoalescence/Cargo.toml +++ b/rustcoalescence/Cargo.toml @@ -10,6 +10,47 @@ edition = "2021" [features] default = [] +gillespie-algorithms = ["dep:rustcoalescence-algorithms-gillespie"] +independent-algorithm = ["dep:rustcoalescence-algorithms-independent"] +cuda-algorithm = ["dep:rustcoalescence-algorithms-cuda"] + +all-algorithms = ["gillespie-algorithms", "independent-algorithm", "cuda-algorithm"] + +almost-infinite-scenario = [ + "rustcoalescence-scenarios/almost-infinite", + "rustcoalescence-algorithms-cuda?/almost-infinite-scenario", +] +non-spatial-scenario = [ + "rustcoalescence-scenarios/non-spatial", + "rustcoalescence-algorithms-cuda?/non-spatial-scenario", +] +spatially-explicit-uniform-turnover-scenario = [ + "rustcoalescence-scenarios/spatially-explicit-uniform-turnover", + "rustcoalescence-algorithms-cuda?/spatially-explicit-uniform-turnover-scenario", +] +spatially-explicit-turnover-map-scenario = [ + "rustcoalescence-scenarios/spatially-explicit-turnover-map", + "rustcoalescence-algorithms-cuda?/spatially-explicit-turnover-map-scenario", +] +spatially-implicit-scenario = [ + "rustcoalescence-scenarios/spatially-implicit", + "rustcoalescence-algorithms-cuda?/spatially-implicit-scenario", +] +wrapping-noise-scenario = [ + "rustcoalescence-scenarios/wrapping-noise", + "rustcoalescence-algorithms-cuda?/wrapping-noise-scenario", +] + +all-scenarios = [ + "almost-infinite-scenario", "non-spatial-scenario", + "spatially-explicit-uniform-turnover-scenario", + "spatially-explicit-turnover-map-scenario", + "spatially-implicit-scenario", + "wrapping-noise-scenario", +] + +mpi-partitioning = ["dep:necsim-partitioning-mpi"] + [dependencies] necsim-core = { path = "../necsim/core" } necsim-core-bond = { path = "../necsim/core/bond" } diff --git a/rustcoalescence/algorithms/cuda/Cargo.toml b/rustcoalescence/algorithms/cuda/Cargo.toml index e25ab2387..ed2620492 100644 --- a/rustcoalescence/algorithms/cuda/Cargo.toml +++ b/rustcoalescence/algorithms/cuda/Cargo.toml @@ -7,6 +7,14 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[features] +almost-infinite-scenario = ["rustcoalescence-algorithms-cuda-cpu-kernel/almost-infinite-scenario"] +non-spatial-scenario = ["rustcoalescence-algorithms-cuda-cpu-kernel/non-spatial-scenario"] +spatially-explicit-uniform-turnover-scenario = ["rustcoalescence-algorithms-cuda-cpu-kernel/spatially-explicit-uniform-turnover-scenario"] +spatially-explicit-turnover-map-scenario = ["rustcoalescence-algorithms-cuda-cpu-kernel/spatially-explicit-turnover-map-scenario"] +spatially-implicit-scenario = ["rustcoalescence-algorithms-cuda-cpu-kernel/spatially-implicit-scenario"] +wrapping-noise-scenario = ["rustcoalescence-algorithms-cuda-cpu-kernel/wrapping-noise-scenario"] + [dependencies] necsim-core = { path = "../../../necsim/core" } necsim-core-bond = { path = "../../../necsim/core/bond" } diff --git a/rustcoalescence/algorithms/cuda/cpu-kernel/Cargo.toml b/rustcoalescence/algorithms/cuda/cpu-kernel/Cargo.toml index 7587473ae..52d79f471 100644 --- a/rustcoalescence/algorithms/cuda/cpu-kernel/Cargo.toml +++ b/rustcoalescence/algorithms/cuda/cpu-kernel/Cargo.toml @@ -7,6 +7,14 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[features] +almost-infinite-scenario = [] +non-spatial-scenario = [] +spatially-explicit-uniform-turnover-scenario = [] +spatially-explicit-turnover-map-scenario = [] +spatially-implicit-scenario = [] +wrapping-noise-scenario = [] + [dependencies] necsim-core = { path = "../../../../necsim/core" } necsim-core-bond = { path = "../../../../necsim/core/bond" } diff --git a/rustcoalescence/algorithms/cuda/cpu-kernel/src/link.rs b/rustcoalescence/algorithms/cuda/cpu-kernel/src/link.rs index 98f3b0819..e06c610da 100644 --- a/rustcoalescence/algorithms/cuda/cpu-kernel/src/link.rs +++ b/rustcoalescence/algorithms/cuda/cpu-kernel/src/link.rs @@ -1,7 +1,10 @@ +#[allow(unused_imports)] use rustcoalescence_algorithms_cuda_gpu_kernel::{SimulatableKernel, SimulationKernelArgs}; +#[allow(unused_imports)] use crate::SimulationKernel; +#[allow(unused_macros)] macro_rules! link_kernel { ($habitat:ty, $dispersal:ty, $turnover:ty, $speciation:ty) => { link_kernel! { @@ -201,6 +204,7 @@ macro_rules! link_kernel { }; } +#[cfg(feature = "non-spatial-scenario")] link_kernel!( necsim_impls_no_std::cogs::habitat::non_spatial::NonSpatialHabitat< necsim_impls_cuda::cogs::maths::NvptxMathsCore @@ -218,6 +222,7 @@ link_kernel!( necsim_impls_no_std::cogs::speciation_probability::uniform::UniformSpeciationProbability ); +#[cfg(feature = "spatially-implicit-scenario")] link_kernel!( necsim_impls_no_std::cogs::habitat::spatially_implicit::SpatiallyImplicitHabitat< necsim_impls_cuda::cogs::maths::NvptxMathsCore @@ -235,6 +240,7 @@ link_kernel!( necsim_impls_no_std::cogs::speciation_probability::spatially_implicit::SpatiallyImplicitSpeciationProbability ); +#[cfg(feature = "almost-infinite-scenario")] link_kernel!( necsim_impls_no_std::cogs::habitat::almost_infinite::AlmostInfiniteHabitat< necsim_impls_cuda::cogs::maths::NvptxMathsCore @@ -252,6 +258,7 @@ link_kernel!( necsim_impls_no_std::cogs::speciation_probability::uniform::UniformSpeciationProbability ); +#[cfg(feature = "spatially-explicit-uniform-turnover-scenario")] link_kernel!( necsim_impls_no_std::cogs::habitat::in_memory::InMemoryHabitat< necsim_impls_cuda::cogs::maths::NvptxMathsCore @@ -272,6 +279,7 @@ link_kernel!( necsim_impls_no_std::cogs::speciation_probability::uniform::UniformSpeciationProbability ); +#[cfg(feature = "spatially-explicit-turnover-map-scenario")] link_kernel!( necsim_impls_no_std::cogs::habitat::in_memory::InMemoryHabitat< necsim_impls_cuda::cogs::maths::NvptxMathsCore @@ -292,6 +300,7 @@ link_kernel!( necsim_impls_no_std::cogs::speciation_probability::uniform::UniformSpeciationProbability ); +#[cfg(feature = "wrapping-noise-scenario")] link_kernel!( necsim_impls_no_std::cogs::habitat::wrapping_noise::WrappingNoiseHabitat< necsim_impls_cuda::cogs::maths::NvptxMathsCore diff --git a/rustcoalescence/scenarios/Cargo.toml b/rustcoalescence/scenarios/Cargo.toml index 455dc3a23..365c493d3 100644 --- a/rustcoalescence/scenarios/Cargo.toml +++ b/rustcoalescence/scenarios/Cargo.toml @@ -7,6 +7,14 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[features] +almost-infinite = [] +non-spatial = [] +spatially-explicit-uniform-turnover = [] +spatially-explicit-turnover-map = [] +spatially-implicit = [] +wrapping-noise = [] + [dependencies] necsim-core = { path = "../../necsim/core" } necsim-core-bond = { path = "../../necsim/core/bond" } diff --git a/rustcoalescence/scenarios/src/lib.rs b/rustcoalescence/scenarios/src/lib.rs index 8f8dfc13a..80c6c41f9 100644 --- a/rustcoalescence/scenarios/src/lib.rs +++ b/rustcoalescence/scenarios/src/lib.rs @@ -20,10 +20,15 @@ use necsim_impls_no_std::{ decomposition::Decomposition, }; +#[cfg(feature = "almost-infinite")] pub mod almost_infinite; +#[cfg(feature = "non-spatial")] pub mod non_spatial; +#[cfg(any(feature = "spatially-explicit-uniform-turnover", feature = "spatially-explicit-turnover-map"))] pub mod spatially_explicit; +#[cfg(feature = "spatially-implicit")] pub mod spatially_implicit; +#[cfg(feature = "wrapping-noise")] pub mod wrapping_noise; pub trait ScenarioParameters { diff --git a/rustcoalescence/scenarios/src/spatially_explicit/mod.rs b/rustcoalescence/scenarios/src/spatially_explicit/mod.rs index c4bc85206..13dc754df 100644 --- a/rustcoalescence/scenarios/src/spatially_explicit/mod.rs +++ b/rustcoalescence/scenarios/src/spatially_explicit/mod.rs @@ -1,10 +1,13 @@ mod maps; mod turnover; +#[cfg(feature = "spatially-explicit-turnover-map")] #[allow(clippy::useless_attribute, clippy::module_name_repetitions)] pub use turnover::map::{ SpatiallyExplicitTurnoverMapArguments, SpatiallyExplicitTurnoverMapScenario, }; + +#[cfg(feature = "spatially-explicit-uniform-turnover")] #[allow(clippy::useless_attribute, clippy::module_name_repetitions)] pub use turnover::uniform::{ SpatiallyExplicitUniformTurnoverArguments, SpatiallyExplicitUniformTurnoverScenario, diff --git a/rustcoalescence/src/args/config/algorithm.rs b/rustcoalescence/src/args/config/algorithm.rs index 6df40f288..b344797e8 100644 --- a/rustcoalescence/src/args/config/algorithm.rs +++ b/rustcoalescence/src/args/config/algorithm.rs @@ -3,31 +3,31 @@ use serde::{Serialize, Serializer}; use necsim_partitioning_core::partition::Partition; #[cfg(any( - feature = "rustcoalescence-algorithms-gillespie", - feature = "rustcoalescence-algorithms-independent", - feature = "rustcoalescence-algorithms-cuda" + feature = "gillespie-algorithms", + feature = "independent-algorithm", + feature = "cuda-algorithm" ))] use rustcoalescence_algorithms::AlgorithmParamters; #[derive(Debug, DeserializeState)] #[serde(deserialize_state = "Partition")] pub enum Algorithm { - #[cfg(feature = "rustcoalescence-algorithms-gillespie")] + #[cfg(feature = "gillespie-algorithms")] #[serde(alias = "Classical")] Gillespie( #[serde(deserialize_state)] ::Arguments, ), - #[cfg(feature = "rustcoalescence-algorithms-gillespie")] + #[cfg(feature = "gillespie-algorithms")] #[serde(alias = "SkippingGillespie")] EventSkipping( #[serde(deserialize_state)] ::Arguments, ), - #[cfg(feature = "rustcoalescence-algorithms-cuda")] + #[cfg(feature = "cuda-algorithm")] #[serde(alias = "CUDA")] Cuda(#[serde(deserialize_state)] ::Arguments), - #[cfg(feature = "rustcoalescence-algorithms-independent")] + #[cfg(feature = "independent-algorithm")] Independent( #[serde(deserialize_state)] ::Arguments, ), @@ -37,22 +37,22 @@ impl Serialize for Algorithm { fn serialize(&self, serializer: S) -> Result { #[allow(unreachable_patterns, clippy::single_match_else)] match self { - #[cfg(feature = "rustcoalescence-algorithms-gillespie")] + #[cfg(feature = "gillespie-algorithms")] Self::Gillespie(args) => { serializer.serialize_newtype_variant(stringify!(Algorithm), 0, "Gillespie", args) }, - #[cfg(feature = "rustcoalescence-algorithms-gillespie")] + #[cfg(feature = "gillespie-algorithms")] Self::EventSkipping(args) => serializer.serialize_newtype_variant( stringify!(Algorithm), 1, "EventSkipping", args, ), - #[cfg(feature = "rustcoalescence-algorithms-cuda")] + #[cfg(feature = "cuda-algorithm")] Self::Cuda(args) => { serializer.serialize_newtype_variant(stringify!(Algorithm), 2, "CUDA", args) }, - #[cfg(feature = "rustcoalescence-algorithms-independent")] + #[cfg(feature = "independent-algorithm")] Self::Independent(args) => { serializer.serialize_newtype_variant(stringify!(Algorithm), 3, "Independent", args) }, diff --git a/rustcoalescence/src/args/config/scenario.rs b/rustcoalescence/src/args/config/scenario.rs index 36d5a54e1..08c89ad4e 100644 --- a/rustcoalescence/src/args/config/scenario.rs +++ b/rustcoalescence/src/args/config/scenario.rs @@ -1,22 +1,30 @@ use serde::{Deserialize, Serialize}; -use rustcoalescence_scenarios::{ - almost_infinite::AlmostInfiniteArguments, - non_spatial::NonSpatialArguments, - spatially_explicit::{ - SpatiallyExplicitTurnoverMapArguments, SpatiallyExplicitUniformTurnoverArguments, - }, - spatially_implicit::SpatiallyImplicitArguments, - wrapping_noise::WrappingNoiseArguments, -}; - #[derive(Debug, Serialize, Deserialize)] pub enum Scenario { + #[cfg(feature = "spatially-explicit-uniform-turnover-scenario")] #[serde(alias = "SpatiallyExplicit")] - SpatiallyExplicitUniformTurnover(SpatiallyExplicitUniformTurnoverArguments), - SpatiallyExplicitTurnoverMap(SpatiallyExplicitTurnoverMapArguments), - NonSpatial(NonSpatialArguments), - SpatiallyImplicit(SpatiallyImplicitArguments), - AlmostInfinite(AlmostInfiniteArguments), - WrappingNoise(WrappingNoiseArguments), + SpatiallyExplicitUniformTurnover( + rustcoalescence_scenarios::spatially_explicit::SpatiallyExplicitUniformTurnoverArguments + ), + #[cfg(feature = "spatially-explicit-turnover-map-scenario")] + SpatiallyExplicitTurnoverMap( + rustcoalescence_scenarios::spatially_explicit::SpatiallyExplicitTurnoverMapArguments + ), + #[cfg(feature = "non-spatial-scenario")] + NonSpatial( + rustcoalescence_scenarios::non_spatial::NonSpatialArguments + ), + #[cfg(feature = "spatially-implicit-scenario")] + SpatiallyImplicit( + rustcoalescence_scenarios::spatially_implicit::SpatiallyImplicitArguments + ), + #[cfg(feature = "almost-infinite-scenario")] + AlmostInfinite( + rustcoalescence_scenarios::almost_infinite::AlmostInfiniteArguments + ), + #[cfg(feature = "wrapping-noise-scenario")] + WrappingNoise( + rustcoalescence_scenarios::wrapping_noise::WrappingNoiseArguments + ), } diff --git a/rustcoalescence/src/cli/simulate/dispatch/mod.rs b/rustcoalescence/src/cli/simulate/dispatch/mod.rs index a6b38c73c..b8974085e 100644 --- a/rustcoalescence/src/cli/simulate/dispatch/mod.rs +++ b/rustcoalescence/src/cli/simulate/dispatch/mod.rs @@ -1,27 +1,27 @@ #[cfg(any( - feature = "rustcoalescence-algorithms-gillespie", - feature = "rustcoalescence-algorithms-independent", - feature = "rustcoalescence-algorithms-cuda" + feature = "gillespie-algorithms", + feature = "independent-algorithm", + feature = "cuda-algorithm" ))] mod valid; #[cfg(not(any( - feature = "rustcoalescence-algorithms-gillespie", - feature = "rustcoalescence-algorithms-independent", - feature = "rustcoalescence-algorithms-cuda" + feature = "gillespie-algorithms", + feature = "independent-algorithm", + feature = "cuda-algorithm" )))] mod fallback; #[cfg(any( - feature = "rustcoalescence-algorithms-gillespie", - feature = "rustcoalescence-algorithms-independent", - feature = "rustcoalescence-algorithms-cuda" + feature = "gillespie-algorithms", + feature = "independent-algorithm", + feature = "cuda-algorithm" ))] pub(super) use valid::dispatch; #[cfg(not(any( - feature = "rustcoalescence-algorithms-gillespie", - feature = "rustcoalescence-algorithms-independent", - feature = "rustcoalescence-algorithms-cuda" + feature = "gillespie-algorithms", + feature = "independent-algorithm", + feature = "cuda-algorithm" )))] pub(super) use fallback::dispatch; diff --git a/rustcoalescence/src/cli/simulate/dispatch/valid/algorithm_scenario.rs b/rustcoalescence/src/cli/simulate/dispatch/valid/algorithm_scenario.rs index b8628421f..af8b02a4c 100644 --- a/rustcoalescence/src/cli/simulate/dispatch/valid/algorithm_scenario.rs +++ b/rustcoalescence/src/cli/simulate/dispatch/valid/algorithm_scenario.rs @@ -4,25 +4,28 @@ use necsim_partitioning_core::LocalPartition; use rustcoalescence_algorithms::AlgorithmDefaults; -#[cfg(feature = "rustcoalescence-algorithms-cuda")] +#[cfg(feature = "cuda-algorithm")] use rustcoalescence_algorithms_cuda::CudaAlgorithm; -#[cfg(feature = "rustcoalescence-algorithms-gillespie")] +#[cfg(feature = "gillespie-algorithms")] use rustcoalescence_algorithms_gillespie::{ event_skipping::EventSkippingAlgorithm, gillespie::GillespieAlgorithm, }; -#[cfg(feature = "rustcoalescence-algorithms-independent")] +#[cfg(feature = "independent-algorithm")] use rustcoalescence_algorithms_independent::IndependentAlgorithm; -use rustcoalescence_scenarios::{ - almost_infinite::AlmostInfiniteScenario, - non_spatial::NonSpatialScenario, - spatially_explicit::{ - SpatiallyExplicitTurnoverMapScenario, SpatiallyExplicitUniformTurnoverScenario, - }, - spatially_implicit::SpatiallyImplicitScenario, - wrapping_noise::WrappingNoiseScenario, - Scenario, -}; +#[cfg(feature = "almost-infinite-scenario")] +use rustcoalescence_scenarios::almost_infinite::AlmostInfiniteScenario; +#[cfg(feature = "non-spatial-scenario")] +use rustcoalescence_scenarios::non_spatial::NonSpatialScenario; +#[cfg(feature = "spatially-explicit-turnover-map-scenario")] +use rustcoalescence_scenarios::spatially_explicit::SpatiallyExplicitTurnoverMapScenario; +#[cfg(feature = "spatially-explicit-uniform-turnover-scenario")] +use rustcoalescence_scenarios::spatially_explicit::SpatiallyExplicitUniformTurnoverScenario; +#[cfg(feature = "spatially-implicit-scenario")] +use rustcoalescence_scenarios::spatially_implicit::SpatiallyImplicitScenario; +#[cfg(feature = "wrapping-noise-scenario")] +use rustcoalescence_scenarios::wrapping_noise::WrappingNoiseScenario; +use rustcoalescence_scenarios::Scenario; use crate::{ args::config::{ @@ -37,40 +40,40 @@ use super::{super::super::BufferingSimulateArgsBuilder, rng}; macro_rules! match_scenario_algorithm { ( ($algorithm:expr, $scenario:expr => $algscen:ident) { - $($(#[$meta:meta])* $algpat:pat => $algcode:block),* + $($(#[$algmeta:meta])* $algpat:pat => $algcode:block),* <=> - $($scenpat:pat => $scencode:block),* + $($(#[$scenmeta:meta])* $scenpat:pat => $scencode:block),* } ) => { match_scenario_algorithm! { impl ($algorithm, $scenario => $algscen) { - $($(#[$meta])* $algpat => $algcode),* + $($(#[$algmeta])* $algpat => $algcode),* <=> - $($scenpat => $scencode),* + $($(#[$scenmeta])* $scenpat => $scencode),* <=> } } }; ( impl ($algorithm:expr, $scenario:expr => $algscen:ident) { - $(#[$meta:meta])* $algpat:pat => $algcode:block, - $($(#[$metarem:meta])* $algpatrem:pat => $algcoderem:block),+ + $(#[$algmeta:meta])* $algpat:pat => $algcode:block, + $($(#[$algmetarem:meta])* $algpatrem:pat => $algcoderem:block),+ <=> - $($scenpat:pat => $scencode:block),* + $($(#[$scenmeta:meta])* $scenpat:pat => $scencode:block),* <=> $($tail:tt)* } ) => { match_scenario_algorithm! { impl ($algorithm, $scenario => $algscen) { - $($(#[$metarem])* $algpatrem => $algcoderem),+ + $($(#[$algmetarem])* $algpatrem => $algcoderem),+ <=> - $($scenpat => $scencode),* + $($(#[$scenmeta])* $scenpat => $scencode),* <=> $($tail)* - $(#[$meta])* $algpat => { + $(#[$algmeta])* $algpat => { match $scenario { - $($scenpat => { + $($(#[$scenmeta])* $scenpat => { let $algscen = $scencode; $algcode }),* @@ -81,18 +84,18 @@ macro_rules! match_scenario_algorithm { }; ( impl ($algorithm:expr, $scenario:expr => $algscen:ident) { - $(#[$meta:meta])* $algpat:pat => $algcode:block + $(#[$algmeta:meta])* $algpat:pat => $algcode:block <=> - $($scenpat:pat => $scencode:block),* + $($(#[$scenmeta:meta])* $scenpat:pat => $scencode:block),* <=> $($tail:tt)* } ) => { match $algorithm { $($tail)* - $(#[$meta])* $algpat => { + $(#[$algmeta])* $algpat => { match $scenario { - $($scenpat => { + $($(#[$scenmeta])* $scenpat => { let $algscen = $scencode; $algcode }),* @@ -118,7 +121,7 @@ pub(super) fn dispatch<'p, R: Reporter, P: LocalPartition<'p, R>>( match_scenario_algorithm!( (algorithm, scenario => scenario) { - #[cfg(feature = "rustcoalescence-algorithms-gillespie")] + #[cfg(feature = "gillespie-algorithms")] AlgorithmArgs::Gillespie(algorithm_args) => { rng::dispatch::< ::MathsCore, @@ -128,7 +131,7 @@ pub(super) fn dispatch<'p, R: Reporter, P: LocalPartition<'p, R>>( pause_before, ron_args, normalised_args, ) }, - #[cfg(feature = "rustcoalescence-algorithms-gillespie")] + #[cfg(feature = "gillespie-algorithms")] AlgorithmArgs::EventSkipping(algorithm_args) => { rng::dispatch::< ::MathsCore, @@ -138,7 +141,7 @@ pub(super) fn dispatch<'p, R: Reporter, P: LocalPartition<'p, R>>( pause_before, ron_args, normalised_args, ) }, - #[cfg(feature = "rustcoalescence-algorithms-independent")] + #[cfg(feature = "independent-algorithm")] AlgorithmArgs::Independent(algorithm_args) => { rng::dispatch::< ::MathsCore, @@ -148,7 +151,7 @@ pub(super) fn dispatch<'p, R: Reporter, P: LocalPartition<'p, R>>( pause_before, ron_args, normalised_args, ) }, - #[cfg(feature = "rustcoalescence-algorithms-cuda")] + #[cfg(feature = "cuda-algorithm")] AlgorithmArgs::Cuda(algorithm_args) => { rng::dispatch::< ::MathsCore, @@ -159,18 +162,21 @@ pub(super) fn dispatch<'p, R: Reporter, P: LocalPartition<'p, R>>( ) } <=> + #[cfg(feature = "spatially-explicit-uniform-turnover-scenario")] ScenarioArgs::SpatiallyExplicitUniformTurnover(scenario_args) => { SpatiallyExplicitUniformTurnoverScenario::initialise( scenario_args, speciation_probability_per_generation, )? }, + #[cfg(feature = "spatially-explicit-turnover-map-scenario")] ScenarioArgs::SpatiallyExplicitTurnoverMap(scenario_args) => { SpatiallyExplicitTurnoverMapScenario::initialise( scenario_args, speciation_probability_per_generation, )? }, + #[cfg(feature = "non-spatial-scenario")] ScenarioArgs::NonSpatial(scenario_args) => { NonSpatialScenario::initialise( scenario_args, @@ -178,6 +184,7 @@ pub(super) fn dispatch<'p, R: Reporter, P: LocalPartition<'p, R>>( ) .into_ok() }, + #[cfg(feature = "almost-infinite-scenario")] ScenarioArgs::AlmostInfinite(scenario_args) => { AlmostInfiniteScenario::initialise( scenario_args, @@ -185,6 +192,7 @@ pub(super) fn dispatch<'p, R: Reporter, P: LocalPartition<'p, R>>( ) .into_ok() }, + #[cfg(feature = "spatially-implicit-scenario")] ScenarioArgs::SpatiallyImplicit(scenario_args) => { SpatiallyImplicitScenario::initialise( scenario_args, @@ -192,6 +200,7 @@ pub(super) fn dispatch<'p, R: Reporter, P: LocalPartition<'p, R>>( ) .into_ok() }, + #[cfg(feature = "wrapping-noise-scenario")] ScenarioArgs::WrappingNoise(scenario_args) => { WrappingNoiseScenario::initialise( scenario_args,