diff --git a/buildstockbatch/hpc.py b/buildstockbatch/hpc.py index e57e8690..e13ea3cb 100644 --- a/buildstockbatch/hpc.py +++ b/buildstockbatch/hpc.py @@ -356,6 +356,8 @@ def run_building(cls, output_dir, cfg, n_datapoints, i, upgrade_idx=None): cls.local_buildstock_dir / "measures", cls.local_weather_dir, ] + if (resources_dir := cls.local_buildstock_dir / "resources").exists(): + dirs_to_mount.append(resources_dir) for src in dirs_to_mount: container_mount = "/" + src.name @@ -363,12 +365,6 @@ def run_building(cls, output_dir, cfg, n_datapoints, i, upgrade_idx=None): container_symlink = pathlib.Path("/var/simdata/openstudio", src.name) runscript.append("ln -s {} {}".format(*map(shlex.quote, (container_mount, str(container_symlink))))) - if (cls.local_buildstock_dir / "resources" / "hpxml-measures").exists(): - runscript.append("ln -s /resources /var/simdata/openstudio/resources") - src = cls.local_buildstock_dir / "resources" / "hpxml-measures" - container_mount = "/resources/hpxml-measures" - args.extend(["-B", f"{src}:{container_mount}:ro"]) - # Build the openstudio command that will be issued within the # apptainer container If custom gems are to be used in the # apptainer container add extra bundle arguments to the cli diff --git a/docs/changelog/changelog_dev.rst b/docs/changelog/changelog_dev.rst index 5178193f..048b5ba4 100644 --- a/docs/changelog/changelog_dev.rst +++ b/docs/changelog/changelog_dev.rst @@ -109,3 +109,11 @@ Development Changelog Stop creating dask _metadata files for the timeseries parquet files since it crashes the postprocessing. + + .. change:: + :tags: bugfix, hpc + :pullreq: 467 + + Updates the bind mount for apptainer to include the whole resources + directory instead of just the hpxml-measures directory. Makes it work + with newer versions of ResStock.