Loading src/ips_fastran_gui/app/models/tool_implementations/superfacility.py +5 −6 Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ import os from shutil import rmtree from typing import Any, Dict from authlib.jose import JsonWebKey from fsspec import filesystem from sfapi_client import Client from sfapi_client.compute import Machine Loading @@ -25,16 +24,16 @@ class SuperfacilityTool: def __init__(self, model: MainModel) -> None: self.model = model self.client = Client( self.model.resource_params.client_id, JsonWebKey.import_key(self.model.resource_params.private_key) ) self.client = Client(self.model.resource_params.client_id, self.model.resource_params.private_key) self.file_tree: Dict[str, Any] = {} self.perlmutter: Any = None self.user: Any = None self.job: Any = None self.output_directory = ".results" self.working_directory = os.path.join("/global/u2", self.model.config.username, self.model.config.username) self.working_directory = os.path.join( "/global/u2", self.model.config.username[0], self.model.config.username, "ips-fastran-gui" ) def cancel(self) -> None: if not self.job: Loading Loading @@ -145,6 +144,6 @@ conda deactivate return with open(path, "r") as local_file: remote_path = os.path.join(self.working_directory, relative_path) remote_path = os.path.join("ips-fastran-gui", relative_path.lstrip("/")) with self.perlmutter_fs.open(remote_path, "w") as remote_file: remote_file.write(local_file.read()) Loading
src/ips_fastran_gui/app/models/tool_implementations/superfacility.py +5 −6 Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ import os from shutil import rmtree from typing import Any, Dict from authlib.jose import JsonWebKey from fsspec import filesystem from sfapi_client import Client from sfapi_client.compute import Machine Loading @@ -25,16 +24,16 @@ class SuperfacilityTool: def __init__(self, model: MainModel) -> None: self.model = model self.client = Client( self.model.resource_params.client_id, JsonWebKey.import_key(self.model.resource_params.private_key) ) self.client = Client(self.model.resource_params.client_id, self.model.resource_params.private_key) self.file_tree: Dict[str, Any] = {} self.perlmutter: Any = None self.user: Any = None self.job: Any = None self.output_directory = ".results" self.working_directory = os.path.join("/global/u2", self.model.config.username, self.model.config.username) self.working_directory = os.path.join( "/global/u2", self.model.config.username[0], self.model.config.username, "ips-fastran-gui" ) def cancel(self) -> None: if not self.job: Loading Loading @@ -145,6 +144,6 @@ conda deactivate return with open(path, "r") as local_file: remote_path = os.path.join(self.working_directory, relative_path) remote_path = os.path.join("ips-fastran-gui", relative_path.lstrip("/")) with self.perlmutter_fs.open(remote_path, "w") as remote_file: remote_file.write(local_file.read())