Skip to content

Commit

Permalink
update function for mapping results
Browse files Browse the repository at this point in the history
  • Loading branch information
MBueschelberger committed Sep 28, 2023
1 parent 4b22df8 commit 4f38052
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion osp/tools/mapping_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1901,9 +1901,10 @@ def map_tarball(engine, root_cuds_object, path=None) -> str:
:return str: file system path to tarball
"""
path = path or engine.path

tar = tempfile.NamedTemporaryFile().name
shutil.make_archive(tar, "tar", engine.path)
shutil.make_archive(tar, "tar", path)
tar_file = f"{tar}.tar"

print(f"Job output dumped to {tar_file}")
Expand Down
5 changes: 2 additions & 3 deletions osp/wrappers/simzacros/simzacros_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def _run(self, root_cuds_object: Cuds):
import adaptiveDesignProcedure as adp
pz_job = pz.ZacrosJob(settings=pz_settings, lattice=pz_lattice,
mechanism=pz_mechanism, cluster_expansion=pz_cluster_expansion)
pz_job.path = self.workdir

def get_rate( conditions ):

Expand Down Expand Up @@ -113,8 +112,8 @@ def get_rate( conditions ):
uuid = get_upload(adpML.forestFileForCFD)
pkl = emmo.PKLFile(uid=UUID(uuid))
self.adp_cuds.add(pkl, rel=emmo.hasOutput)

self._tarball = map_results(pz_job, root_cuds_object)
path = os.path.join(self.workdir, self.jobname)
self._tarball = map_results(pz_job, root_cuds_object, path=self.path)

else:
pz_job = pz.ZacrosJob(settings=pz_settings, lattice=pz_lattice,
Expand Down

0 comments on commit 4f38052

Please sign in to comment.