Skip to content

Commit

Permalink
add note
Browse files Browse the repository at this point in the history
  • Loading branch information
nsheff committed May 9, 2019
1 parent 873a2ce commit fdf3a72
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pypiper/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ def __init__(
self.cores = params['cores']
self.output_parent = params['output_parent']

# Keep track of an ID for the number of processes attempted
self.proc_count

# We use this memory to pass a memory limit to processes like java that
# can take a memory limit, so they don't get killed by a SLURM (or other
# cluster manager) overage. However, with java, the -Xmx argument can only
Expand Down Expand Up @@ -314,7 +317,7 @@ def __init__(
# later to pass to, for example, toolkits
import yaml
# An also use yaml.FullLoader for trusted input. . .
config = yaml.load(conf, Loader=yaml.SafeLoader)
config = yaml.load(conf, LoaderF=yaml.SafeLoader)
self.config = AttMapEcho(config)
else:
print("No config file")
Expand Down Expand Up @@ -687,6 +690,9 @@ def call_follow():
# Normally we don't run the follow, but if you want to force. . .
if self.force_follow:
call_follow()

# Increment process count here

break # Do not run command

# Scenario 1: Lock file exists, but we're supposed to overwrite target; Run process.
Expand Down Expand Up @@ -940,9 +946,10 @@ def proc_wrapup(i):
mem=display_memory(local_maxmems[i]))

# report process profile
self.proc_count += 1
self._report_profile(self.procs[current_pid]["proc_name"], lock_file,
time.time() - self.procs[current_pid]["start_time"], local_maxmems[i],
current_pid, self.procs[current_pid]["args_hash"])
current_pid, self.procs[current_pid]["args_hash"], self.proc_count)

# Remove this as a running subprocess
del self.procs[current_pid]
Expand Down

0 comments on commit fdf3a72

Please sign in to comment.