-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initiated jobs #431
base: master
Are you sure you want to change the base?
Initiated jobs #431
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
from pprint import pformat | ||
from typing import Dict, Optional, Union | ||
|
||
from arc.common import arc_path, get_logger | ||
from arc.common import arc_path, get_logger, local_arc_path | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. import |
||
from arc.exceptions import JobError, InputError | ||
from arc.imports import settings, input_files, submit_scripts | ||
from arc.job.local import (get_last_modified_time, | ||
|
@@ -424,7 +424,7 @@ def _set_job_number(self): | |
""" | ||
Used as the entry number in the database, as well as the job name on the server. | ||
""" | ||
csv_path = os.path.join(arc_path, 'initiated_jobs.csv') | ||
csv_path = os.path.join(local_arc_path, 'initiated_jobs.csv') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this means we'll always have a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. . arc is per user. If I am not mistaken if I run from two different machines I get two different job counts. I was thinking about how it working on the delta. there are multiple users using the same ARC repo. Therefore the counter is for everyone. I was afraid a permission error might occur when multiple people write to the same file. The CSV file was created automatically. Are you suggesting that we create a CSV file in the .arc folder and if the csv file exists then write to the .arc folder? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, check if it exists in .arc first. Other users would like to keep a songle counter while submitting from different machines onto a single server. |
||
if not os.path.isfile(csv_path): | ||
# check file, make index file and write headers if file doesn't exists | ||
with open(csv_path, 'w') as f: | ||
|
@@ -445,7 +445,7 @@ def _write_initiated_job_to_csv_file(self): | |
""" | ||
Write an initiated ARCJob into the initiated_jobs.csv file. | ||
""" | ||
csv_path = os.path.join(arc_path, 'initiated_jobs.csv') | ||
csv_path = os.path.join(local_arc_path, 'initiated_jobs.csv') | ||
if self.conformer < 0: # this is not a conformer search job | ||
conformer = '-' | ||
else: | ||
|
@@ -463,7 +463,7 @@ def write_completed_job_to_csv_file(self): | |
""" | ||
if self.job_status[0] != 'done' or self.job_status[1]['status'] != 'done': | ||
self.determine_job_status() | ||
csv_path = os.path.join(arc_path, 'completed_jobs.csv') | ||
csv_path = os.path.join(local_arc_path, 'completed_jobs.csv') | ||
if not os.path.isfile(csv_path): | ||
# check file, make index file and write headers if file doesn't exists | ||
with open(csv_path, 'w') as f: | ||
|
@@ -473,7 +473,7 @@ def write_completed_job_to_csv_file(self): | |
'final_time', 'run_time', 'job_status_(server)', 'job_status_(ESS)', | ||
'ESS troubleshooting methods used', 'comments'] | ||
writer.writerow(row) | ||
csv_path = os.path.join(arc_path, 'completed_jobs.csv') | ||
csv_path = os.path.join(local_arc_path, 'completed_jobs.csv') | ||
if self.conformer < 0: # this is not a conformer search job | ||
conformer = '-' | ||
else: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have this in https://github.com/ReactionMechanismGenerator/ARC/blob/master/arc/imports.py#L14
No need to have it here