1. Reads in a meraculous config file and outputs all of the associated config
       files to $PWD/configs
    2. The name of each run and the path to the directory is passed to a
       multiprocessing core that controls which assemblies are executed and when.

def main():
    """
    1. Reads in a meraculous config file and outputs all of the associated config
       files to $PWD/configs
    2. The name of each run and the path to the directory is passed to a
       multiprocessing core that controls which assemblies are executed and when.

    """
    parser = CommandLine()
    #this block from here: http://stackoverflow.com/a/4042861/5843327
    if len(sys.argv)==1:
        parser.parser.print_help()
        sys.exit(1)
    parser.parse()
    myArgs = parser.args

    #Figure out how many processors to give to each assembly since we will be
    # running some things in parallel. The MerParse class will handle overriding
    # whatever is found in the config file in the read_config() method.
    procsPerAssembly = int(myArgs.maxProcs / myArgs.simultaneous)
    setattr(myArgs, "maxProcs", procsPerAssembly)

    # 1. Reads in a meraculous config file and outputs all of the associated config
    #    files to $PWD/configs

    merparser = MerParse(myArgs.inputConfig, myArgs.sweep, myArgs.sstart,
                         myArgs.sstop, myArgs.sinterval, myArgs.maxProcs,
                         asPrefix = myArgs.prefix,
                         asSI = myArgs.index,
                         genus = myArgs.genus,
                         species = myArgs.species)
    configPaths = merparser.sweeper_output()

    #make the assemblies dir ONCE to avoid a race condition for os.makedirs()
    cwd = os.path.abspath(os.getcwd())
    allAssembliesDir = os.path.join(cwd, "assemblies")
    if not os.path.exists(allAssembliesDir):
        os.makedirs(allAssembliesDir)

    #instantiate all of the classes that we will be using in parallel processing.
    # configPaths above returns a dict with the run name and abs path of config
    # as key:value pairs
    instances = []
    for runName in configPaths:
        configPath = configPaths.get(runName)
        thisInstance = MerRunner(runName, configPath, myArgs.cleanup)
        instances.append(thisInstance)

    if len(instances) == 0:
        print("There are no meraculous folders in this directory. Exiting")
    elif len(instances) > 0:
        # run the program for each instance
        # pool size is the number of simultaneous runs for the server
        pool = ThreadPool(myArgs.simultaneous)
        results = pool.map(mer_runner_dummy, instances)
        pool.close()
        pool.join()