prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  TorqueProvider fails on NSCC 
  The following patch is required in order to run the `TorqueProvider` on NSCC:
  ```
  [nscc04] ~/libsubmit >git diff
  diff --git a/libsubmit/providers/torque/template.py b/libsubmit/providers/torque/template.py
  index a00ce7c..056c648 100644
  --- a/libsubmit/providers/torque/template.py
  +++ b/libsubmit/providers/torque/template.py
  @@ -8,7 +8,6 @@ template_string = '''#!/bin/bash
   #PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node}
   #PBS -o ${submit_script_dir}/${jobname}.submit.stdout
   #PBS -e ${submit_script_dir}/${jobname}.submit.stderr
  -#PBS -v WORKER_LOGGING_LEVEL
   ${overrides}
  
   export JOBNAME="${jobname}"
  ```
  
  Otherwise, the job fails with `qsub: cannot send environment with the job`. Could we just merge the patch, or should we make this configurable somehow?
  
  </issue>
  <code>
  [start of parsl/providers/torque/template.py]
  1 template_string = '''#!/bin/bash
  2 
  3 #PBS -S /bin/bash
  4 #PBS -N ${jobname}
  5 #PBS -m n
  6 #PBS -k eo
  7 #PBS -l walltime=$walltime
  8 #PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node}
  9 #PBS -o ${submit_script_dir}/${jobname}.submit.stdout
  10 #PBS -e ${submit_script_dir}/${jobname}.submit.stderr
  11 #PBS -v WORKER_LOGGING_LEVEL
  12 ${overrides}
  13 
  14 export JOBNAME="${jobname}"
  15 
  16 ${user_script}
  17 
  18 '''
  19
  [end of parsl/providers/torque/template.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/parsl/providers/torque/template.py b/parsl/providers/torque/template.py
  --- a/parsl/providers/torque/template.py
  +++ b/parsl/providers/torque/template.py
  @@ -8,7 +8,6 @@
   #PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node}
   #PBS -o ${submit_script_dir}/${jobname}.submit.stdout
   #PBS -e ${submit_script_dir}/${jobname}.submit.stderr
  -#PBS -v WORKER_LOGGING_LEVEL
   ${overrides}
   
   export JOBNAME="${jobname}"
  
verification_info: {"golden_diff": "diff --git a/parsl/providers/torque/template.py b/parsl/providers/torque/template.py\n--- a/parsl/providers/torque/template.py\n+++ b/parsl/providers/torque/template.py\n@@ -8,7 +8,6 @@\n #PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node}\n #PBS -o ${submit_script_dir}/${jobname}.submit.stdout\n #PBS -e ${submit_script_dir}/${jobname}.submit.stderr\n-#PBS -v WORKER_LOGGING_LEVEL\n ${overrides}\n \n export JOBNAME=\"${jobname}\"\n", "issue": "TorqueProvider fails on NSCC \nThe following patch is required in order to run the `TorqueProvider` on NSCC:\r\n```\r\n[nscc04] ~/libsubmit >git diff\r\ndiff --git a/libsubmit/providers/torque/template.py b/libsubmit/providers/torque/template.py\r\nindex a00ce7c..056c648 100644\r\n--- a/libsubmit/providers/torque/template.py\r\n+++ b/libsubmit/providers/torque/template.py\r\n@@ -8,7 +8,6 @@ template_string = '''#!/bin/bash\r\n #PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node}\r\n #PBS -o ${submit_script_dir}/${jobname}.submit.stdout\r\n #PBS -e ${submit_script_dir}/${jobname}.submit.stderr\r\n-#PBS -v WORKER_LOGGING_LEVEL\r\n ${overrides}\r\n\r\n export JOBNAME=\"${jobname}\"\r\n```\r\n\r\nOtherwise, the job fails with `qsub: cannot send environment with the job`. Could we just merge the patch, or should we make this configurable somehow?\n", "before_files": [{"content": "template_string = '''#!/bin/bash\n\n#PBS -S /bin/bash\n#PBS -N ${jobname}\n#PBS -m n\n#PBS -k eo\n#PBS -l walltime=$walltime\n#PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node}\n#PBS -o ${submit_script_dir}/${jobname}.submit.stdout\n#PBS -e ${submit_script_dir}/${jobname}.submit.stderr\n#PBS -v WORKER_LOGGING_LEVEL\n${overrides}\n\nexport JOBNAME=\"${jobname}\"\n\n${user_script}\n\n'''\n", "path": "parsl/providers/torque/template.py"}]}