Exemplo n.º 1
0
def boot_vms_by_core(vms):
    """ """
    n_vm = len(vms)
    if n_vm == 0:
        return True
    if isinstance(vms[0]['host'], Host):
        host = vms[0]['host'].address.split('.')[0]
    else:
        host = vms[0]['host'].split('.')[0]

    sub_vms = {}
    for i_core in list(set(vm['cpuset'] for vm in vms)):
        sub_vms[i_core] = list()
        for vm in vms:
            if vm['cpuset'] == i_core:
                sub_vms[i_core].append(vm)
    booted_vms = 0
    while len(sub_vms.keys()) > 0:
        vms_to_boot = []
        for i_core in sub_vms.keys():
            vms_to_boot.append(sub_vms[i_core][0])
            sub_vms[i_core].pop(0)
            if len(sub_vms[i_core]) == 0:
                del sub_vms[i_core]

        logger.info(
            style.Thread(host) + ': Starting VMS ' +
            ', '.join([vm['id'] for vm in sorted(vms_to_boot)]))
        start_vms(vms_to_boot).run()
        booted = wait_vms_have_started(vms_to_boot)
        if not booted:
            return False
        booted_vms += len(vms_to_boot)
        logger.info(
            style.Thread(host) + ': ' +
            style.emph(str(booted_vms) + '/' + str(n_vm)))
    return True
Exemplo n.º 2
0
    def workflow(self, comb, host, comb_dir):
        """ """
        comb_ok = False
        thread_name = style.Thread(host.split('.')[0]) + ': '
        logger.info(thread_name + 'Starting combination ' + slugify(comb))

        try:
            logger.info(thread_name + 'Generate conf file')
            param_str = self.create_string(comb)

            Remote(
                "python /home/Work/sgcbntier/paasage_demo/xml_gen_execo.py --cb "
                + param_str, [host]).run()

            logger.info(thread_name + 'Run code')
            Remote(
                "cd /home/Work/sgcbntier/paasage_demo/ ; python run_all_execo.py --cb %s"
                % param_str, [host]).run()

            logger.info(thread_name + 'Get results')

            traceFile = "ntier_" + param_str
            get_results = Get([host], [
                "/home/Work/sgcbntier/paasage_demo/csv/REQTASK_" + traceFile +
                ".csv"
            ],
                              local_location=comb_dir).run()

            for p in get_results.processes:
                if not p.ok:
                    logger.error(
                        host +
                        ': Unable to retrieve the files for combination %s',
                        slugify(comb))
                    exit()

            comb_ok = True
        finally:
            if comb_ok:
                self.sweeper.done(comb)
                logger.info(thread_name + ': ' + slugify(comb) + \
                             ' has been done')
            else:
                self.sweeper.cancel(comb)
                logger.warning(thread_name + ': ' + slugify(comb) + \
                            ' has been canceled')
        logger.info(style.step('%s Remaining'),
                    len(self.sweeper.get_remaining()))
    def workflow(self, comb, host, comb_dir):
        """ """
        comb_ok = False
        thread_name = style.Thread(str(host).split('.')[0]) + ': '
        logger.info(thread_name + 'Starting combination ' + slugify(comb))

        try:
            self.export = "source ~/aevol_binary/intel/linux/mkl/bin/mklvars.sh intel64; "

            bucketname = self.working_dir + '/raevol_5_mut_lat/' + slugify(
                comb) + '/'

            if os.path.isdir(bucketname) and os.path.exists(bucketname +
                                                            '/last_gener.txt'):
                logger.info(thread_name + "Resuming AEVOL from NFS backup")

                gen_file = open(bucketname + '/last_gener.txt', 'r')

                last_gen = gen_file.read()

                if int(last_gen) < 500000:
                    logger.info(thread_name + "Resuming AEVOL Run from " +
                                str(int(last_gen)))
                    rem = Remote(
                        self.export + 'cd ' + bucketname +
                        '; /home/jorouzaudcornabas/aevol_binary/aevol/src/aevol_run -p 16'
                        + ' -e 300000 -r ' + last_gen + ' >> aevol_run.log',
                        [host]).run()
                    if rem.ok:
                        comb_ok = True
                else:
                    comb_ok = True
            else:
                Remote('mkdir -p ' + bucketname, [host]).run()

                param_file = '/home/jorouzaudcornabas/aevol_binary/execo/mut_lat/param_tmpl.in'

                logger.info(thread_name + 'Generate config file ' + param_file)

                f_template = open(param_file)
                fd, outfile = mkstemp(dir='/tmp/',
                                      prefix=slugify(comb) + '_param')
                f = os.fdopen(fd, 'w')

                for line in f_template:
                    line = line.replace('SEED_NUMBER', str(comb['seed']))
                    line = line.replace('FUZZY_VERSION', str(comb['fuzzy']))
                    if comb['move']:
                        line = line.replace('FIRST_GAUSSIAN_MEDIAN', '0.25')
                        line = line.replace('THIRD_GAUSSIAN_MEDIAN', '0.65')
                    else:
                        line = line.replace('FIRST_GAUSSIAN_MEDIAN', '0.2')
                        line = line.replace('THIRD_GAUSSIAN_MEDIAN', '0.6')
                    line = line.replace('GAUSSIAN_HEIGHT', str(comb['height']))
                    f.write(line)

                f_template.close()
                f.close()

                put_file = Put([host], [outfile],
                               remote_location=bucketname).run()
                if not put_file.ok:
                    exit()

                os.remove(outfile)

                Remote(
                    'cd ' + bucketname + '; cp ' + outfile.split('/')[-1] +
                    ' param.in', [host]).run()

                logger.info(thread_name + "Launching AEVOL Create")
                Remote(
                    self.export + 'cd ' + bucketname +
                    '; /home/jorouzaudcornabas/aevol_diff_area/aevol/src/aevol_create > aevol_create.log',
                    [host]).run()

                logger.info(thread_name + "Launching AEVOL Run")
                rem = Remote(
                    self.export + 'cd ' + bucketname +
                    '; /home/jorouzaudcornabas/aevol_diff_area/aevol/src/aevol_run -p 16 -n 500000 > aevol_run.log',
                    [host]).run()
                if rem.ok:
                    comb_ok = True

            logger.info(thread_name + 'Get results ' + comb_dir + "/" +
                        slugify(comb))

        #try:
        #os.mkdir(comb_dir + "/" + slugify(comb))
        #except:
        #logger.warning(thread_name +
        #'%s already exists, removing existing files', comb_dir + "/" + slugify(comb))

#shutil.rmtree(comb_dir+ "/" + slugify(comb))
#try:
#os.mkdir(comb_dir + "/" + slugify(comb))
#except:
#logger.warning(thread_name +
#'%s already exists, recreating directory', comb_dir + "/" + slugify(comb))

#get_results = Get([host], [bucketname+ "/aevol_create.log", bucketname+ "/aevol_run.log", bucketname+'/stats/'],
#local_location=comb_dir + "/" + slugify(comb)).run()

#for p in get_results.processes:
#if not p.ok:
#logger.error(thread_name +
#': Unable to retrieve the files for combination %s',
#slugify(comb))
#exit()

        finally:
            if comb_ok:
                self.sweeper.done(comb)
                # shutil.rmtree(bucketname)
                logger.info(thread_name + ': ' + slugify(comb) + \
                             ' has been done')
            else:
                self.sweeper.cancel(comb)
                logger.warning(thread_name + ': ' + slugify(comb) + \
                            ' has been canceled')
        logger.info(style.step('%s Remaining'),
                    len(self.sweeper.get_remaining()))
Exemplo n.º 4
0
    def workflow(self, comb, host, comb_dir):
        """ """
        comb_ok = False
        thread_name = style.Thread(str(host).split('.')[0]) + ': '
        logger.info(thread_name + 'Starting combination ' + slugify(comb))
        if 'parapluie' in str(host):
            nb_proc = 24
        elif 'paranoia' in str(host):
            nb_proc = 20
        elif 'parapide' in str(host):
            nb_proc = 8
        else:
            nb_proc = 16

        try:
            self.export = "source ~/aevol_binary/intel/linux/mkl/bin/mklvars.sh intel64; "

            bucketname = self.working_dir + '/raevol_5_mut_lat/' + slugify(
                comb) + '/'

            logger.info(thread_name + "Killing other RAevol")

            killa = Remote("killall -9 aevol_run", [host])
            for killp in killa.processes:
                killp.ignore_error = True
            killa.run()

            if os.path.isdir(bucketname) and os.path.exists(bucketname +
                                                            '/last_gener.txt'):
                logger.info(thread_name + "Resuming AEVOL from NFS backup")

                gen_file = open(bucketname + '/last_gener.txt', 'r')

                last_gen = gen_file.read()

                if int(last_gen) < 300000:
                    logger.info(thread_name + "Resuming AEVOL Run from " +
                                str(int(last_gen)))
                    rem = Remote(
                        self.export + 'cd ' + bucketname +
                        '; /home/jorouzaudcornabas/aevol_binary/aevol/src/aevol_run -p '
                        + str(nb_proc) + ' -e 300000 -r ' + last_gen +
                        ' >> aevol_run.log', [host],
                        process_args={
                            'default_stdout_handler': False,
                            'default_stderr_handler': False
                        }).run()
                    if rem.ok:
                        comb_ok = True
                else:
                    comb_ok = True
            else:
                Remote('mkdir -p ' + bucketname, [host]).run()

                param_file = '/home/jorouzaudcornabas/aevol_binary/aevol/execo/mut_lat/param_tmpl.in'

                logger.info(thread_name + 'Generate config file ' + param_file)

                f_template = open(param_file)
                fd, outfile = mkstemp(dir='/tmp/',
                                      prefix=slugify(comb) + '_param')
                f = os.fdopen(fd, 'w')

                for line in f_template:
                    if 'CONFIGURE_ENVIRONMENT_VALUES' in line:
                        if comb['env'] == 'const':
                            line = line.replace('CONFIGURE_ENVIRONMENT_VALUES',
                                                'NB_ENVIRONMENTS 1')
                            f.write(line)
                            f.write('ENV_ADD_GAUSSIAN  1  0.5   0.2   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  1  0.5   0.4   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  1  0.5   0.6   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  1  0.5   0.8   0.05' +
                                    os.linesep)
                        elif comb['env'] == 'lat_3':
                            line = line.replace('CONFIGURE_ENVIRONMENT_VALUES',
                                                'NB_ENVIRONMENTS 2')
                            f.write(line)
                            f.write('ENV_ADD_GAUSSIAN  1  0.5   0.2   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  1  0.5   0.4   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  1  0.5   0.6   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  1  0.5   0.8   0.05' +
                                    os.linesep)

                            f.write('ENV_ADD_GAUSSIAN  2  0.5   0.2   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  2  0.5   0.4   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  2  0.5   0.65  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  2  0.5   0.8   0.05' +
                                    os.linesep)
                        elif comb['env'] == 'lat_all':
                            line = line.replace('CONFIGURE_ENVIRONMENT_VALUES',
                                                'NB_ENVIRONMENTS 16')
                            f.write(line)

                            #const

                            f.write('ENV_ADD_GAUSSIAN  1  0.5   0.2   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  1  0.5   0.4   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  1  0.5   0.6   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  1  0.5   0.8   0.05' +
                                    os.linesep)

                            # 1

                            f.write('ENV_ADD_GAUSSIAN  2  0.5   0.25  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  2  0.5   0.4   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  2  0.5   0.6   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  2  0.5   0.8   0.05' +
                                    os.linesep)

                            f.write('ENV_ADD_GAUSSIAN  3  0.5   0.2   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  3  0.5   0.45  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  3  0.5   0.6   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  3  0.5   0.8   0.05' +
                                    os.linesep)

                            f.write('ENV_ADD_GAUSSIAN  4  0.5   0.2   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  4  0.5   0.4   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  4  0.5   0.65  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  4  0.5   0.8   0.05' +
                                    os.linesep)

                            f.write('ENV_ADD_GAUSSIAN  5  0.5   0.2   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  5  0.5   0.4   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  5  0.5   0.6   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  5  0.5   0.85  0.05' +
                                    os.linesep)

                            # 2

                            f.write('ENV_ADD_GAUSSIAN  6  0.5   0.25  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  6  0.5   0.45  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  6  0.5   0.6   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  6  0.5   0.8   0.05' +
                                    os.linesep)

                            f.write('ENV_ADD_GAUSSIAN  7  0.5   0.25  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  7  0.5   0.4   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  7  0.5   0.65  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  7  0.5   0.8   0.05' +
                                    os.linesep)

                            f.write('ENV_ADD_GAUSSIAN  8  0.5   0.25  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  8  0.5   0.4   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  8  0.5   0.6   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  8  0.5   0.85  0.05' +
                                    os.linesep)

                            f.write('ENV_ADD_GAUSSIAN  9  0.5   0.2   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  9  0.5   0.45  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  9  0.5   0.65  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  9  0.5   0.8   0.05' +
                                    os.linesep)

                            f.write('ENV_ADD_GAUSSIAN  10  0.5   0.2   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  10  0.5   0.45  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  10  0.5   0.6   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  10  0.5   0.85  0.05' +
                                    os.linesep)

                            f.write('ENV_ADD_GAUSSIAN  11  0.5   0.2   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  11  0.5   0.4   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  11  0.5   0.65  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  11  0.5   0.85  0.05' +
                                    os.linesep)

                            # 3

                            f.write('ENV_ADD_GAUSSIAN  12  0.5   0.25  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  12  0.5   0.45  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  12  0.5   0.65  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  12  0.5   0.8   0.05' +
                                    os.linesep)

                            f.write('ENV_ADD_GAUSSIAN  13  0.5   0.25  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  13  0.5   0.45  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  13  0.5   0.6   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  13  0.5   0.85  0.05' +
                                    os.linesep)

                            f.write('ENV_ADD_GAUSSIAN  14  0.5   0.25  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  14  0.5   0.4   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  14  0.5   0.65  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  14  0.5   0.85  0.05' +
                                    os.linesep)

                            f.write('ENV_ADD_GAUSSIAN  15  0.5   0.2   0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  15  0.5   0.45  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  15  0.5   0.65  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  15  0.5   0.85  0.05' +
                                    os.linesep)

                            # 4

                            f.write('ENV_ADD_GAUSSIAN  16  0.5   0.25  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  16  0.5   0.45  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  16  0.5   0.65  0.05' +
                                    os.linesep)
                            f.write('ENV_ADD_GAUSSIAN  16  0.5   0.85  0.05' +
                                    os.linesep)
                    elif 'CONFIGURE_SIGNAL_VALUES' in line:
                        if comb['env'] == 'const':
                            line = line.replace('CONFIGURE_SIGNAL_VALUES', '')
                            f.write(line)

                        elif comb['env'] == 'lat_3':
                            line = line.replace(
                                'CONFIGURE_SIGNAL_VALUES',
                                'CREATE_SIGNAL h0 h0 h0 w0 m0 m1 m0 h1 h0 m0 h0 m1 h1 w0 h1 h0 m1 h1 m0 w0 w0 m0 w0 h0 h1 m1 w0 m0 m1 m0 w0 h1 h0 m0 h0 m1 h1 w0 h0 w0 m0 m1 m0 w0 h1 h0 w0 w0 h1'
                            )
                            f.write(line)

                            f.write('ENV_ADD_SIGNAL 2 1' + os.linesep)
                        elif comb['env'] == 'lat_all':
                            line = line.replace(
                                'CONFIGURE_SIGNAL_VALUES',
                                'CREATE_SIGNAL h0 w0 h1 m1 w0 h1 m0 h0 h1 w0 h0 m1 h1 h1 m1 m0 h0 w0 h1 m1 w0 h1 m0 h0 h1 w0 h0 m1 h1 h1 m1 m0 h1 m0 m1'
                            )
                            f.write(line)
                            f.write(
                                'CREATE_SIGNAL m0 h0 m1 h1 m1 w0 m0 m1 m0 h0 m1 h1 w0 h0 h0 h1 m1 m0 h1 w0 h1 h0 m1 h1 m0 w0 w0 m0 m1 w0 w0 h1 h0 w0 h1 h0 h0 m0 h0 w0 h0 m1 m0 w0 h1 w0 w0 h1 m0'
                                + os.linesep)
                            f.write(
                                'CREATE_SIGNAL h0 h0 h0 w0 m0 m1 m0 h1 h0 m0 h0 m1 h1 w0 h1 h0 m1 h1 m0 w0 w0 m0 w0 h0 h1 m1 w0 m0 m1 m0 w0 h1 h0 m0 h0 m1 h1 w0 h0 w0 m0 m1 m0 w0 h1 h0 w0 w0 h1'
                                + os.linesep)
                            f.write(
                                'CREATE_SIGNAL h1 h1 m0 w0 w0 h1 m1 h1 h1 m1 m0 w0 m1 m0 m0 w0 m0 h0 m0 h0 w0 h0 m0 h0 h1 m1 h0 h1 w0 h0 h1 m1 h1 m1 m0'
                                + os.linesep)

                            f.write('ENV_ADD_SIGNAL 2 1' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 3 2' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 4 3' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 5 4' + os.linesep)

                            f.write('ENV_ADD_SIGNAL 6 1' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 6 2' + os.linesep)

                            f.write('ENV_ADD_SIGNAL 7 1' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 7 3' + os.linesep)

                            f.write('ENV_ADD_SIGNAL 8 1' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 8 4' + os.linesep)

                            f.write('ENV_ADD_SIGNAL 9 2' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 9 3' + os.linesep)

                            f.write('ENV_ADD_SIGNAL 10 2' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 10 4' + os.linesep)

                            f.write('ENV_ADD_SIGNAL 11 3' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 11 4' + os.linesep)

                            f.write('ENV_ADD_SIGNAL 12 1' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 12 2' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 12 3' + os.linesep)

                            f.write('ENV_ADD_SIGNAL 13 1' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 13 2' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 13 4' + os.linesep)

                            f.write('ENV_ADD_SIGNAL 14 1' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 14 3' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 14 4' + os.linesep)

                            f.write('ENV_ADD_SIGNAL 15 2' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 15 3' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 15 4' + os.linesep)

                            f.write('ENV_ADD_SIGNAL 16 1' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 16 2' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 16 3' + os.linesep)
                            f.write('ENV_ADD_SIGNAL 16 4' + os.linesep)
                    else:
                        line = line.replace('SEED_NUMBER', str(comb['seed']))
                        line = line.replace('MUTATION_RATE_VALUE',
                                            comb['mutation'])
                        line = line.replace('SELECTION_PRESSURE',
                                            str(comb['selection']))
                        f.write(line)

                f_template.close()
                f.close()

                put_file = Put([host], [outfile],
                               remote_location=bucketname).run()
                if not put_file.ok:
                    exit()

                os.remove(outfile)

                Remote(
                    'cd ' + bucketname + '; cp ' + outfile.split('/')[-1] +
                    ' param.in; cp /home/jorouzaudcornabas/aevol_binary/aevol/execo/mut_lat/binding_matrix.rae .',
                    [host]).run()

                logger.info(thread_name + "Launching AEVOL Create")
                Remote(
                    self.export + 'cd ' + bucketname +
                    '; /home/jorouzaudcornabas/aevol_binary/aevol/src/aevol_create > aevol_create.log',
                    [host],
                    process_args={
                        'default_stdout_handler': False,
                        'default_stderr_handler': False
                    }).run()

                logger.info(thread_name + "Launching AEVOL Run")
                rem = Remote(
                    self.export + 'cd ' + bucketname +
                    '; /home/jorouzaudcornabas/aevol_binary/aevol/src/aevol_run -p '
                    + str(nb_proc) + ' -n 300000 > aevol_run.log', [host],
                    process_args={
                        'default_stdout_handler': False,
                        'default_stderr_handler': False
                    }).run()
                if rem.ok:
                    comb_ok = True

            logger.info(thread_name + 'Get results ' + comb_dir + "/" +
                        slugify(comb))

        #try:
        #os.mkdir(comb_dir + "/" + slugify(comb))
        #except:
        #logger.warning(thread_name +
        #'%s already exists, removing existing files', comb_dir + "/" + slugify(comb))

#shutil.rmtree(comb_dir+ "/" + slugify(comb))
#try:
#os.mkdir(comb_dir + "/" + slugify(comb))
#except:
#logger.warning(thread_name +
#'%s already exists, recreating directory', comb_dir + "/" + slugify(comb))

#get_results = Get([host], [bucketname+ "/aevol_create.log", bucketname+ "/aevol_run.log", bucketname+'/stats/'],
#local_location=comb_dir + "/" + slugify(comb)).run()

#for p in get_results.processes:
#if not p.ok:
#logger.error(thread_name +
#': Unable to retrieve the files for combination %s',
#slugify(comb))
#exit()

        finally:
            if comb_ok:
                self.sweeper.done(comb)
                # shutil.rmtree(bucketname)
                logger.info(thread_name + ': ' + slugify(comb) + \
                             ' has been done')
            else:
                self.sweeper.cancel(comb)
                logger.warning(thread_name + ': ' + slugify(comb) + \
                            ' has been canceled')
        logger.info(style.step('%s Remaining'),
                    len(self.sweeper.get_remaining()))