From 93447de3800ac22d1bd029152457edbbc84048f5 Mon Sep 17 00:00:00 2001 From: d3v-null Date: Wed, 25 Sep 2024 02:24:53 +0000 Subject: [PATCH] switch to hdf5_metno for ndarray0.16 --- .dockerignore | 14 ++ CHANGELOG.md | 4 + Cargo.lock | 332 +++++++++++++++++++++++--------------- Cargo.toml | 8 +- Dockerfile | 28 +--- examples/analytic_cuda.rs | 4 +- examples/fee_cuda.rs | 4 +- src/fee/error.rs | 4 +- src/fee/mod.rs | 10 +- 9 files changed, 241 insertions(+), 167 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..45c5e03 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,14 @@ +.git +.github +.vscode +coverage +doc +img +scripts +target +*.ms +*.uvfits +*.tar +*.metafits +*.fits +*.sif \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d0f5e36..9aebe57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.10.0] - 2024-09-25 +### Changes +- upgrade marlu0.14 rubbl0.8 casacore3.5 ndarray0.16 + ## [0.9.4] - 2024-08-20 ### Changes - Native CPU compiler options off by default for better portability. diff --git a/Cargo.lock b/Cargo.lock index ef486c9..8846e32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -60,12 +60,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.6.0" @@ -102,7 +96,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faeaa693e5a727975a79211b8f35c0cb09b031fdb6eaa4a788bc6713d01488ca" dependencies = [ "heck", - "indexmap", + "indexmap 1.9.3", "log", "proc-macro2", "quote", @@ -139,7 +133,7 @@ dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -304,7 +298,7 @@ dependencies = [ "hashbrown 0.14.5", "lock_api", "once_cell", - "parking_lot_core 0.9.10", + "parking_lot_core", ] [[package]] @@ -313,6 +307,12 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "erfa" version = "0.2.1" @@ -442,7 +442,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" dependencies = [ - "bitflags 2.6.0", + "bitflags", "libc", "libgit2-sys", "log", @@ -478,52 +478,54 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] -name = "hdf5" -version = "0.8.1" +name = "hdf5-metno" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdcd9b131fd67bb827b386d0dc63d3e74196a14616ef800acf87ca5fef741a10" +checksum = "3167207f341f305141d3fbae48690442cb4b57771c827ccfae7b66b7cd8891bc" dependencies = [ - "bitflags 1.3.2", + "bitflags", "cfg-if", - "hdf5-derive", - "hdf5-sys", - "hdf5-types", + "hdf5-metno-derive", + "hdf5-metno-sys", + "hdf5-metno-types", "lazy_static", "libc", - "ndarray 0.15.6", - "parking_lot 0.11.2", + "ndarray 0.16.1", "paste", ] [[package]] -name = "hdf5-derive" -version = "0.8.1" +name = "hdf5-metno-derive" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5a77ac6a41e6880594d506118c0b8bc665ec959fe4636e0c84809756d224820" +checksum = "c75d3c9831cc601c2f2829dcdc8178b2503a9127ce1255af33b7d6d3067d44e8" dependencies = [ + "proc-macro-crate", + "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] -name = "hdf5-src" -version = "0.8.1" +name = "hdf5-metno-src" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01493db39ddc0519cf2a83d620d2c037fee60f4fed724cb72dc23763f1727a8" +checksum = "9b746b01050a79cb2914d4d62ae61b8a7e93cc7699a050081b0f88329e859dcd" dependencies = [ "cmake", ] [[package]] -name = "hdf5-sys" -version = "0.8.1" +name = "hdf5-metno-sys" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4842d5980dc311a7c8933c7b45534fdae84df5ae7939a0ae8e449a56d4beb3d2" +checksum = "1e7be8ee30e5034ee48dd30bc85a2fdde6e1ec0e5e19598409e8e9955eab14af" dependencies = [ - "hdf5-src", + "hdf5-metno-src", "libc", "libloading", + "parking_lot", "pkg-config", "regex", "serde", @@ -532,14 +534,14 @@ dependencies = [ ] [[package]] -name = "hdf5-types" -version = "0.8.1" +name = "hdf5-metno-types" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b47268c0dfb499b1ffe5638b6e7694e7a87fe49fb92eca998a4346e5483e428f" +checksum = "236c29ece21fd13543f45b1578c4e65d5d61da38d90192812f1f6ad86ac255ac" dependencies = [ "ascii", "cfg-if", - "hdf5-sys", + "hdf5-metno-sys", "libc", ] @@ -632,19 +634,20 @@ dependencies = [ ] [[package]] -name = "indoc" -version = "1.0.9" +name = "indexmap" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +dependencies = [ + "equivalent", + "hashbrown 0.14.5", +] [[package]] -name = "instant" -version = "0.1.13" +name = "indoc" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] +checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306" [[package]] name = "is-terminal" @@ -757,12 +760,12 @@ dependencies = [ [[package]] name = "libloading" -version = "0.7.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "winapi", + "windows-targets 0.52.6", ] [[package]] @@ -777,9 +780,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags", "libc", - "redox_syscall 0.5.4", + "redox_syscall", ] [[package]] @@ -873,15 +876,15 @@ dependencies = [ "cfg-if", "criterion", "cuda-runtime-sys", - "hdf5", - "hdf5-sys", + "hdf5-metno", + "hdf5-metno-sys", "hip-sys", "marlu", "ndarray 0.16.1", "num-complex", "numpy", "panic-message", - "parking_lot 0.12.3", + "parking_lot", "pyo3", "rayon", "serial_test", @@ -979,17 +982,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384e52fd8fbd4cbe3c317e8216260c21a0f9134de108cea8a4dd4e7e152c472d" -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.3" @@ -997,21 +989,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", - "parking_lot_core 0.9.10", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -1022,9 +1000,9 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.4", + "redox_syscall", "smallvec", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1100,6 +1078,38 @@ dependencies = [ "portable-atomic", ] +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -1119,7 +1129,7 @@ dependencies = [ "indoc", "libc", "memoffset", - "parking_lot 0.12.3", + "parking_lot", "pyo3-build-config", "pyo3-ffi", "pyo3-macros", @@ -1204,22 +1214,13 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" dependencies = [ - "bitflags 2.6.0", + "bitflags", ] [[package]] @@ -1263,7 +1264,7 @@ version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags 2.6.0", + "bitflags", "errno", "libc", "linux-raw-sys", @@ -1339,7 +1340,7 @@ dependencies = [ "futures", "lazy_static", "log", - "parking_lot 0.12.3", + "parking_lot", "serial_test_derive", ] @@ -1487,6 +1488,23 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap 2.5.0", + "toml_datetime", + "winnow", +] + [[package]] name = "unicode-bidi" version = "0.3.15" @@ -1531,6 +1549,12 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + [[package]] name = "walkdir" version = "2.5.0" @@ -1606,22 +1630,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" version = "0.1.9" @@ -1631,19 +1639,22 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-core" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", ] [[package]] @@ -1652,7 +1663,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1661,7 +1672,22 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -1670,28 +1696,46 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -1704,38 +1748,72 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "winnow" +version = "0.6.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c52ac009d615e79296318c1bcce2d422aaca15ad08515e344feeda07df67a587" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" -version = "0.10.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ + "cfg-if", "serde", - "winapi", + "windows-sys 0.48.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 3a3bbb6..75641de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ authors = [ "Sammy McSweeney ", ] edition = "2021" -rust-version = "1.64" +rust-version = "1.80" license = "MPL-2.0" readme = "README.md" description = "Primary beam code for the Murchison Widefield Array (MWA) radio telescope." @@ -28,7 +28,7 @@ crate-type = ["rlib", "staticlib", "cdylib"] [features] default = [] -hdf5-static = ["hdf5-sys"] +hdf5-static = ["hdf5-metno-sys"] cuda-static = [] all-static = ["hdf5-static", "cuda-static"] python = ["pyo3", "numpy"] @@ -47,7 +47,7 @@ codegen-units = 1 # Set this to 1 in Cargo.toml to allow for maximum size reduct [dependencies] cfg-if = "1.0.0" -hdf5 = "0.8.0" +hdf5-metno = "0.9.2" marlu = { version = "0.14.0", default-features = false } ndarray = "0.16.0" num-complex = "0.4.1" @@ -56,7 +56,7 @@ parking_lot = "0.12.0" rayon = "1.5.0" thiserror = "1.0.2" -hdf5-sys = { version = "0.8.0", features = [ +hdf5-metno-sys = { version = "0.9.1", features = [ "static", "threadsafe", ], optional = true } diff --git a/Dockerfile b/Dockerfile index 9c5c126..0290bb6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,25 +16,17 @@ RUN apt-get update && \ clang \ cmake \ curl \ - cython3 \ fontconfig \ g++ \ git \ - ipython3 \ jq \ lcov \ libcfitsio-dev \ liberfa-dev \ libhdf5-dev \ libpng-dev \ - libpython3-dev \ pkg-config \ procps \ - python3 \ - python3-dev \ - python3-pip \ - python3-wheel \ - python3-importlib-metadata \ tzdata \ unzip \ wget \ @@ -46,32 +38,18 @@ RUN apt-get update && \ # Get Rust ARG RUST_VERSION=stable -ENV RUSTUP_HOME=/opt/rust CARGO_HOME=/opt/cargo PATH="/opt/cargo/bin:${PATH}" +ENV RUSTUP_HOME=/opt/rust CARGO_HOME=/opt/cargo +ENV PATH="/opt/cargo/bin:${PATH}" RUN mkdir -m755 $RUSTUP_HOME $CARGO_HOME && ( \ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | env RUSTUP_HOME=$RUSTUP_HOME CARGO_HOME=$CARGO_HOME sh -s -- -y \ --profile=minimal \ --default-toolchain=${RUST_VERSION} \ ) -# install python prerequisites -# - newer pip needed for mwalib maturin install -# - other versions pinned to avoid issues with numpy==2 -ARG SSINS_BRANCH=master -ARG MWAQA_BRANCH=dev RUN python -m pip install --no-cache-dir \ - importlib_metadata==8.2.0 \ - maturin[patchelf]==1.7.0 \ - pip==24.2 \ + maturin[patchelf]==1.7.2 \ ; -ARG MWALIB_BRANCH=v1.5.0 -RUN git clone --depth 1 --branch=${MWALIB_BRANCH} https://github.com/MWATelescope/mwalib.git /mwalib && \ - cd /mwalib && \ - maturin build --release --features=python && \ - python -m pip install $(ls -1 target/wheels/*.whl | tail -n 1) && \ - cd / && \ - rm -rf /mwalib ${CARGO_HOME}/registry - ADD . /app WORKDIR /app RUN maturin build --release --features=python && \ diff --git a/examples/analytic_cuda.rs b/examples/analytic_cuda.rs index 3df6d65..613d5c0 100644 --- a/examples/analytic_cuda.rs +++ b/examples/analytic_cuda.rs @@ -19,7 +19,7 @@ use std::f64::consts::{FRAC_PI_2, PI}; -use mwa_hyperbeam::{analytic::AnalyticBeam, AzEl, GpuFloat, Jones}; +use mwa_hyperbeam::{analytic::AnalyticBeam, AzEl, GpuFloat}; use ndarray::prelude::*; fn main() -> Result<(), Box> { @@ -89,7 +89,7 @@ fn main() -> Result<(), Box> { norm_to_zenith, )?; - let diff = jones[(0, 0, 0)] - Jones::::from(jones_cpu); + let diff = jones[(0, 0, 0)] - jones_cpu; println!("Difference between first GPU and CPU Jones matrices"); println!( diff --git a/examples/fee_cuda.rs b/examples/fee_cuda.rs index ca78e6f..926dd7a 100644 --- a/examples/fee_cuda.rs +++ b/examples/fee_cuda.rs @@ -19,7 +19,7 @@ use std::f64::consts::{FRAC_PI_2, PI}; -use mwa_hyperbeam::{fee::FEEBeam, AzEl, GpuFloat, Jones}; +use mwa_hyperbeam::{fee::FEEBeam, AzEl, GpuFloat}; use ndarray::prelude::*; fn main() -> Result<(), Box> { @@ -95,7 +95,7 @@ fn main() -> Result<(), Box> { iau_order, )?; - let diff = jones[(0, 0, 0)] - Jones::::from(jones_cpu); + let diff = jones[(0, 0, 0)] - jones_cpu; println!("Difference between first GPU and CPU Jones matrices"); println!( diff --git a/src/fee/error.rs b/src/fee/error.rs index 9b605e3..5dbb750 100644 --- a/src/fee/error.rs +++ b/src/fee/error.rs @@ -38,7 +38,7 @@ pub enum InitFEEBeamError { /// An error associated with the hdf5 crate. #[error("HDF5 error: {0}")] - Hdf5(#[from] hdf5::Error), + Hdf5(#[from] hdf5_metno::Error), } #[derive(Error, Debug)] @@ -68,7 +68,7 @@ pub enum FEEBeamError { /// An error associated with the hdf5 crate. #[error("HDF5 error: {0}")] - Hdf5Error(#[from] hdf5::Error), + Hdf5Error(#[from] hdf5_metno::Error), #[cfg(any(feature = "cuda", feature = "hip"))] #[error(transparent)] diff --git a/src/fee/mod.rs b/src/fee/mod.rs index dd87f6c..7d78d7a 100644 --- a/src/fee/mod.rs +++ b/src/fee/mod.rs @@ -40,9 +40,9 @@ use crate::{ /// The main struct to be used for calculating Jones matrices. #[allow(clippy::upper_case_acronyms)] pub struct FEEBeam { - /// The [`hdf5::File`] struct associated with the opened HDF5 file. It is + /// The [`hdf5_metno::File`] struct associated with the opened HDF5 file. It is /// behind a [`Mutex`] to prevent parallel usage of the file. - hdf5_file: Mutex, + hdf5_file: Mutex, /// An ascendingly-sorted vector of frequencies available in the HDF5 file. /// Not allowed to be empty. freqs: Vec, @@ -61,16 +61,16 @@ impl FEEBeam { /// Given the path to an FEE beam file, create a new [`FEEBeam`] struct. pub fn new>(file: T) -> Result { // so that libhdf5 doesn't print errors to stdout - hdf5::silence_errors(true); + hdf5_metno::silence_errors(true); - // If the file doesn't exist, hdf5::File::open will handle it, but the + // If the file doesn't exist, hdf5_metno::File::open will handle it, but the // error message is horrendous. if !file.as_ref().exists() { return Err(InitFEEBeamError::BeamFileDoesntExist( file.as_ref().display().to_string(), )); } - let h5 = hdf5::File::open(file)?; + let h5 = hdf5_metno::File::open(file)?; // We want all of the available frequencies and the biggest antenna index. let mut freqs: Vec = vec![]; let mut biggest_dip_index: Option = None;