packages.chn-bsub: fix config format

This commit is contained in:
2026-01-03 16:05:01 +08:00
parent ebc05b9911
commit f5e70e16b2
2 changed files with 5 additions and 7 deletions

View File

@@ -1,4 +1,2 @@
Queues:
normal: [ 4, 4, 20 ]
normal_1day: [ 4, 7, 28 ]
normal: [ 4, 4, 20 ]
normal_1day: [ 4, 7, 28 ]

View File

@@ -35,9 +35,9 @@ int main()
}();
std::string OutputFile = "output.txt";
} State;
struct { std::map<std::string, std::array<int, 3>> Queues; } QueueConfig =
std::map<std::string, std::array<int, 3>> QueueConfig =
YAML::LoadFile(BSUB_CONFIG).as<decltype(QueueConfig)>();
State.QueueEntries = QueueConfig.Queues
State.QueueEntries = QueueConfig
| ranges::views::transform([](auto const& item) { return item.first; })
| ranges::to_vector;
@@ -140,7 +140,7 @@ int main()
State.CurrentInterface = InterfaceType::Confirm;
State.SubmitCommand = [&]
{
auto [nproc, nthr, ncpu] = QueueConfig.Queues.at(State.QueueEntries[State.QueueSelected]);
auto [nproc, nthr, ncpu] = QueueConfig.at(State.QueueEntries[State.QueueSelected]);
auto args = std::vector<std::string>
{
"bsub",