autostemparameters['Grid_sim2exp'] = 1 autostemparameters['Pixelshift'] = False parameters={'structure':'Cluster', 'optimizer_type':'GA', 'atomlist':[('Au',1,196.9665,-3.6)],'natoms': 309, 'nindiv': 60, 'maxgen': 100, 'reqrep': 10, 'restart': True, 'generate_flag': 'sphere', 'tolerance': 0.01, 'r_ab': 2.5, 'size': 23.0, 'cxpb': 0.8, 'mutpb': 0.2, 'cx_scheme': 'cxtp', #rotct_rand', 'mutation_options': ['lattice_alteration','lattice_alteration_group','rotation','stem_mutation','zp_rotation'], 'selection_scheme': 'tournament2', 'natural_selection_scheme': 'fuss', 'tournsize': 3, 'fusslimit': 10, 'convergence_scheme': 'gen-rep-min', 'fingerprinting': False, 'predator': 'fitpred', 'demin': 0.05, 'pair_style': 'eam', 'pot_file': 'Au_u3.eam', 'filename': 'Output', 'lammps_keep_files': True, 'lammps_min': '1e-8 1e-8 5000 10000', 'lammps_min_style': 'cg\nmin_modify line quadratic', 'lammps_thermo_steps': 1000, 'genealogy': True, 'allenergyfile': True, 'best_inds_list': True, 'postprocessing': True, 'parallel': True, 'energy_cutoff_factor': 4.0, 'stem_keep_files': False, 'stem_coeff': 10.0 } parameters['stem_parameters']=autostemparameters parameters['fitness_scheme']='stem_cost' else: parameters=None parameters = MPI.COMM_WORLD.bcast(parameters,root=0) C = Optimizer(parameters) C.run()
'lammps_min': '1e-8 1e-8 5000 10000', 'lammps_min_style': 'cg\nmin_modify line quadratic', 'lammps_thermo_steps': 1000, 'genealogy': True, 'allenergyfile': True, 'best_inds_list': True, 'postprocessing': True, 'parallel': True, 'energy_cutoff_factor': 4.0, 'stem_keep_files': False, 'stem_coeff': 10.0 } parameters['stem_parameters'] = autostemparameters parameters['fitness_scheme'] = 'stem_cost' else: parameters = None parameters = MPI.COMM_WORLD.bcast(parameters, root=0) C = Optimizer(parameters) C.run()
'LammpsMin': '1e-8 1e-8 5000 10000', 'Lmin_style': 'cg\nmin_modify line quadratic', 'genealogy': True, 'allenergyfile': True, 'BestIndsList': True } if rank == 0: print 'Running Serial...' parameters['filename'] = 'Test-Serial' A = Optimizer(parameters) A.run() done = True else: done = False done = MPI.COMM_WORLD.bcast(done, root=0) print done print 'Running parallel...' parameters['filename'] = 'Test-Parallel' parameters['parallel'] = True A = Optimizer(parameters) A.algorithm_parallel() print 'Running Island_Method' parameters['filename'] = 'Test-IM' parameters['algorithm_type'] = 'Island_Method'
from MAST.structopt import Optimizer from mpi4py import MPI rank = MPI.COMM_WORLD.Get_rank() if rank==0: print 'Running Serial...' A = Optimizer('input-clus.txt') A.run() done = True else: done = False done = MPI.COMM_WORLD.bcast(done,root=0) print done print 'Running parallel...' A = Optimizer('input-clus-p.txt') A.run() print 'Running Island_Method' A = Optimizer('input-clus-im.txt') A.run()