Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Commit ed5f788

Browse files
committed
update dask and slurmconfig
1 parent 122aa48 commit ed5f788

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

mti_nma/bin/all.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,23 +107,31 @@ def run(
107107
# Create or get log dir
108108
# Do not include ms
109109
log_dir_name = datetime.now().isoformat().split(".")[0]
110-
log_dir = Path(f"~/.dask_logs/mti_nma/{log_dir_name}").expanduser()
110+
log_dir = Path(f".dask_logs/{log_dir_name}").expanduser()
111111
# Log dir settings
112-
log_dir.mkdir(parents=True)
112+
log_dir.mkdir(parents=True, exist_ok=True)
113+
114+
# Configure dask config
115+
dask.config.set(
116+
{
117+
"scheduler.work-stealing": False,
118+
"logging.distributed.worker": "info",
119+
}
120+
)
113121

114122
# Create cluster
115123
log.info("Creating SLURMCluster")
116124
cluster = SLURMCluster(
117-
cores=1,
118-
memory="8GB",
125+
cores=4,
126+
memory="20GB",
119127
queue="aics_cpu_general",
120128
walltime="10:00:00",
121129
local_directory=str(log_dir),
122-
log_directory=str(log_dir)
130+
log_directory=str(log_dir),
123131
)
124132
log.info("Created SLURMCluster")
125133

126-
# Scale workers
134+
# Scale cluster
127135
cluster.scale(60)
128136

129137
# Use the port from the created connector to set executor address

0 commit comments

Comments
 (0)