Skip to content

Commit ec4899d

Browse files
authored
Merge pull request #351 from libAtoms/remote_op_with_configset_input
fix bug with remote jobs for an op that takes a ConfigSet as its input
2 parents b1cdb70 + f3e1eec commit ec4899d

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.github/workflows/pytests.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,12 @@ jobs:
208208
echo "SLURM apt-get done, doing local configuration"
209209
host_s=$( hostname -s )
210210
if [ -f /etc/slurm/slurm.conf ]; then sudo mv /etc/slurm/slurm.conf /etc/slurm/slurm.conf.orig; fi
211-
sudo bash -c 'gzip -cd /usr/share/doc/slurmd/examples/slurm.conf.simple.gz > /etc/slurm/slurm.conf'
211+
# /usr/share/doc/slurm-client/examples/slurm.conf.simple
212+
# /usr/share/doc/slurmd/examples/slurm.conf.simple
213+
# /usr/share/doc/slurmctld/examples/slurm.conf.simple
214+
## sudo bash -c 'gzip -cd /usr/share/doc/slurmd/examples/slurm.conf.simple.gz > /etc/slurm/slurm.conf'
215+
sudo bash -c 'cp /usr/share/doc/slurmd/examples/slurm.conf.simple /etc/slurm/slurm.conf'
216+
##
212217
# sudo sed -E -i -e "s/^\s*ClusterName\s*=.*/ClusterName=github_expyre_test/" /etc/slurm/slurm.conf
213218
sudo bash -c 'sed -E -i -e "s/^\s*SlurmctldHost\s*=.*/SlurmctldHost=_HOST_/" /etc/slurm/slurm.conf'
214219
# sudo sed -E -i -e "s/^\s*DefaultStorageHost\s*=.*/DefaultStorageHost=none" /etc/slurm/slurm.conf

tests/local_scripts/complete_pytest.tin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module purge
44
# module load compiler/gnu python/system python_extras/quippy lapack/mkl
5-
module load compiler/gnu python/conda python_extras/quippy/_2024-10-21 lapack/mkl
5+
module load compiler/gnu python python_extras/quippy lapack/mkl
66
module load python_extras/torch/cpu
77

88
if [ -z "$WFL_PYTEST_EXPYRE_INFO" ]; then

wfl/autoparallelize/remote.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,15 @@ def do_remotely(autopara_info, iterable=None, outputspec=None, op=None, rng=None
8484
if isinstance(iterable, ConfigSet):
8585
job_iterable = ConfigSet(item_list)
8686
else:
87+
# for a subtle reason, passing an object with a loc to the remote function
88+
# leads the remote do_in_pool to return a ConfigSet with empty containers
89+
# for all earlier ConfigSet_loc, which confuses the code that processes the remote
90+
# job results. If isinstance(item, Atoms), this info is remove automatically
91+
# when item_list is turned into a ConfigSet (just above). However, if item is a ConfigSet
92+
# we must do this manually here
93+
for item in item_list:
94+
if isinstance(item, ConfigSet):
95+
item._enclosing_loc = ''
8796
job_iterable = item_list
8897
co = OutputSpec()
8998

0 commit comments

Comments
 (0)