-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.py
38 lines (32 loc) · 948 Bytes
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /bin/env sage-python
#
#SBATCH --partition m
#SBATCH --tasks=1
#SBATCH --mem-per-cpu=4096
#SBATCH --nice=10000
#SBATCH --time=1-00:00
#SBATCH --output=slurm_out/%j
#SBATCH --error=slurm_out/%j
import slurm
import taskdb2
import traceback
import zhcircles
def save_pdf(task):
try:
V = pe.PECharVariety(task['name'], radius=1.04)
L = pe.SL2RLifter(V)
if L.nonempty():
F = L.show(True)
F.save('/pkgs/tmp/pe_pdfs/' + task['name'] + '.pdf')
task['done'] = True
except:
print('<apoly-error>')
print('task: ' + task['name'])
print(traceback.format_exc())
print('</apoly-error>')
if __name__ == '__main__':
db = zhcircles.ZHCircles()
#db.run_function('taskhigh', zhcircles.save_plot_highres,
# num_tasks=1, columns=['radius'])
db.run_function('task0', zhcircles.parabolic_psl2R_details,
num_tasks=1)