@@ -139,12 +139,10 @@ def main():
139139 with config_path .open () as f :
140140 config_data = yaml .safe_load (f )
141141
142- # Use a shared location for the database
143- script_dir = Path ("cmor_job_scripts" )
144- script_dir .mkdir (exist_ok = True )
145-
146- # Put database in the script directory (which should be on a shared filesystem)
147- db_path = script_dir / "cmor_tasks.db"
142+ # Put database in output directory on scratch filesystem (accessible from compute nodes)
143+ output_dir = Path (config_data ["output_folder" ])
144+ output_dir .mkdir (parents = True , exist_ok = True )
145+ db_path = output_dir / "cmor_tasks.db"
148146 tracker = TaskTracker (db_path )
149147
150148 # Pre-populate all tasks
@@ -160,7 +158,7 @@ def main():
160158 DASHBOARD_SCRIPT = files ("access_mopper.dashboard" ).joinpath ("cmor_dashboard.py" )
161159 start_dashboard (str (DASHBOARD_SCRIPT ), str (db_path ))
162160
163- # Create directory for job scripts
161+ # Create directory for job scripts (local to login node is fine)
164162 script_dir = Path ("cmor_job_scripts" )
165163 script_dir .mkdir (exist_ok = True )
166164
@@ -171,7 +169,7 @@ def main():
171169 print (f"Submitting { len (variables )} CMORisation jobs..." )
172170
173171 for variable in variables :
174- # Create job script
172+ # Create job script - pass the scratch database path
175173 script_path = create_job_script (variable , config_data , str (db_path ), script_dir )
176174 print (f"Created job script: { script_path } " )
177175
0 commit comments