Exemplo n.º 1
0
# settings = {'command': ".", 'username':"******", 'server':"satis.ethz.ch", 'port':22, 'working_directory':"/Users/tfr/RemoteJobs/Submission", 'input_directory':"/Users/tfr/RemoteJobs/TestInDir", 'output_directory':"/Users/tfr/RemoteJobs/TestOutDir2", '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 )
#
# Approach 3:
class Brutus(DescriptorQ):
  queue = LSFBSub
  username = "******"
  server="brutus.ethz.ch"
  port=22
  options = ""
  prior = "module load open_mpi goto2 python hdf5 cmake mkl\nexport PATH=$PATH:$HOME/opt/alps/bin"
  post = ""
  working_directory = "Submission"

desc = runApplicationBackground('spinmc',input_file,Tmin=5,writexml=True, descriptor = Brutus(), force_resubmit = False )
print "Ran", desc.queue_log 

#desc = runApplicationBackground('spinmc',input_file,Tmin=5,writexml=True, queue = load_queue(LSFBSub, "brutus") , 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
Exemplo n.º 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()
    pyalps.plot.plot(plotdata)
Exemplo n.º 3
0
         '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()
    pyalps.plot.plot(plotdata)