for line in recordfile: print line tip = raw_input("\npress any key to continue;\n") print('Now,users can start keep checking the progress of their tasks with checkProgs.py') print('When all the tasks are processed, users can press \'Enter\' to break the checking' +' loop and get the tasks Output in zip format') print('During checkProgs.py, users could break the checking loop by pressing \'Enter\' ' +'and use the record file to check the progress later.') print('Press any key to start checkProgs.check_task_progs(Workers,PROTOC.ping_interval):') print('=================== start check progs ======================') Workers = checkProgs.check_task_progs(Workers,PROTOC.ping_interval) print('================== check progs stoped ======================') tip = raw_input("\npress any key to continue;\n") print('=================== start downloading the output ===========') getOutput.get_output_socket(Workers,'./') print('=================== downloading finished ===================') print('If checkProgs finished by itself, you should find the output zip file in the same directory' + ' of the job recordfile.') print('If output checkProgs is exited by user\'s input. Just try \"sh checkProgs.sh\" ' ) print('And if every thing goes right, you will find the output in '+parent_dir)
# ***** Handle input/test part ***** if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('-i','--ifile') parser.add_argument('-p','--proj') parser.add_argument('-ef','--exfun') parser.add_argument('-sf','--serverfile') parser.add_argument('-wt','--walltime') parser.add_argument('-id','--tasks_id') args=parser.parse_args() if(args.ifile == None or args.proj == None or args.exfun == None or args.tasks_id==None): print('Essential information missing.') print('-id tasks_id -i inputfile -p project -ef external function -id tasks_id') exit() # put all the input arguments to a dict inputs_dict={} inputs_dict[def_config.bulk_assign_dict.ifile] = args.ifile inputs_dict[def_config.bulk_assign_dict.proj] = args.proj inputs_dict[def_config.bulk_assign_dict.exfun] = args.exfun inputs_dict[def_config.bulk_assign_dict.serverfile] = args.serverfile inputs_dict[def_config.bulk_assign_dict.walltime] = args.walltime inputs_dict[def_config.bulk_assign_dict.tasks_id] = args.tasks_id Workers = demoBulkAssign.assign_tasks_bulk(inputs_dict,taskmaster) print Workers Workers = checkProgs.check_task_progs(Workers,protocol.ping_interval) getOutput.get_output_socket(Workers,'./')