Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into 'master'
[simgrid.git] / examples / python / comm-waitallfor / comm-waitallfor.py
index d7af7862ed2a27920eca22d668580042df19c341..0f387951d241620bd624a45f9930a5c7fcc1b1dc 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2010-2022. The SimGrid Team. All rights reserved.
+# Copyright (c) 2010-2023. The SimGrid Team. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the license (GNU LGPL) which comes with this package.
@@ -14,6 +14,7 @@ This example implements the following scenario:
 
 from argparse import ArgumentParser
 from dataclasses import dataclass
+from typing import List
 from uuid import uuid4
 import sys
 
@@ -24,7 +25,7 @@ SIMULATED_JOB_SIZE_BYTES = 1024
 SIMULATED_RESULT_SIZE_BYTES = 1024 * 1024
 
 
-def parse_requests(requests_str: str) -> list[float]:
+def parse_requests(requests_str: str) -> List[float]:
     return [float(item.strip()) for item in requests_str.split(",")]
 
 
@@ -33,6 +34,7 @@ def create_parser() -> ArgumentParser:
     parser.add_argument(
         '--platform',
         type=str,
+        required=True,
         help='path to the platform description'
     )
     parser.add_argument(
@@ -88,7 +90,7 @@ class AsyncJobResult:
         return "complete" if self.complete else "pending"
 
 
-def client(client_id: str, jobs: list[float], wait_timeout: float):
+def client(client_id: str, jobs: List[float], wait_timeout: float):
     worker_mailbox: Mailbox = Mailbox.by_name("worker")
     this_actor.info(f"{client_id} started")
     async_job_results: list[AsyncJobResult] = []