コード例 #1
0
ファイル: example1_dict.py プロジェクト: imclab/BatchQ
         'T'              : t,
         'J'              : 1 ,
         'THERMALIZATION' : 1000,
         'SWEEPS'         : 100000,
         'UPDATE'         : "cluster",
         'MODEL'          : "Ising",
         'L'              : 8
       }
   )

input_file = pyalps.writeInputFiles('parm1',parms)

## This dictionary defines the standard queue parameters which will be used if nothing else is supplied
settings = {'command': ".", 'username':"******", 'server':"satis.ethz.ch", 'port':22, 'working_directory':"/tmp/", 'input_directory':"/tmp/", 'output_directory':"/tmp/", 'q_interact':True, "options": "", "prior":"", "post":""}

q = load_queue(NoHUPSSH, settings)
desc = runApplicationBackground('spinmc',input_file,Tmin=5,writexml=True, queue = q, force_resubmit = False )

if not desc.finished():
   print "Your simulations has not yet ended, please run this command again later."
else:
    if desc.failed():
        print "Your submission has failed"
        sys.exit(-1)
    result_files = pyalps.getResultFiles(prefix='parm1')
    print result_files
    print pyalps.loadObservableList(result_files)
    data = pyalps.loadMeasurements(result_files,['|Magnetization|','Magnetization^2'])
    print data
    plotdata = pyalps.collectXY(data,'T','|Magnetization|')
    plt.figure()
コード例 #2
0
       { 
         'LATTICE'        : "square lattice", 
         'T'              : t,
         'J'              : 1 ,
         'THERMALIZATION' : 1000,
         'SWEEPS'         : 100000,
         'UPDATE'         : "cluster",
         'MODEL'          : "Ising",
         'L'              : 8
       }
   )

input_file = pyalps.writeInputFiles('parm1',parms)

# The queue is loaded from a configuration file which should either be located in the execution directory or in ~/.batchq/configuration
q = load_queue(LSFBSub, "brutus")
desc = runApplicationBackground('spinmc',input_file,Tmin=5,writexml=True, queue = q, force_resubmit = False )

if not desc.finished():
   print "Your simulations has not yet ended, please run this command again later."
else:
    if desc.failed():
        print "Your submission has failed"
        sys.exit(-1)
    result_files = pyalps.getResultFiles(prefix='parm1')
    print result_files
    print pyalps.loadObservableList(result_files)
    data = pyalps.loadMeasurements(result_files,['|Magnetization|','Magnetization^2'])
    print data
    plotdata = pyalps.collectXY(data,'T','|Magnetization|')
    plt.figure()
コード例 #3
0
for t in [1.5, 2, 2.5]:
    parms.append({
        'LATTICE': "square lattice",
        'T': t,
        'J': 1,
        'THERMALIZATION': 1000,
        'SWEEPS': 100000,
        'UPDATE': "cluster",
        'MODEL': "Ising",
        'L': 8
    })

input_file = pyalps.writeInputFiles('parm1', parms)

# The queue is loaded from a configuration file which should either be located in the execution directory or in ~/.batchq/configuration
q = load_queue(LSFBSub, "brutus")
desc = runApplicationBackground('spinmc',
                                input_file,
                                Tmin=5,
                                writexml=True,
                                queue=q,
                                force_resubmit=False)

if not desc.finished():
    print "Your simulations has not yet ended, please run this command again later."
else:
    if desc.failed():
        print "Your submission has failed"
        sys.exit(-1)
    result_files = pyalps.getResultFiles(prefix='parm1')
    print result_files