Runtime options - GabrielaCR/AGNfitter GitHub Wiki

Runtime options

You can see them with python RUN_AGNfitter_multi.py -h:

                XXXX
    ___________ XXX _________________________________________________
                XX      
                X     
                X                       AGNfitter                     
            __ X __                    ---------                
        /**\   |   /**\                                          
    ... (*** =  o  = ***) ...........................................
        \**/__ | __\**/                                     
                X              Fitting SEDs of AGN and Galaxies  
                X             in a MCMC Approach 
            xx              (Calistro Rivera et al. 2016)    
            xx               
    _______ xxx______________________________________________________
        xxxx

    usage: RUN_AGNfitter_multi.py [-h] [-c NCPU] [-n SOURCENUMBER] [-i] [-o]
                                AGNfitterSettings

    positional arguments:
    AGNfitterSettings     AGNfitter settings file

    optional arguments:
    -h, --help            show this help message and exit
    -c NCPU, --ncpu NCPU  number of cpus to use for multiprocessing
    -n SOURCENUMBER, --sourcenumber SOURCENUMBER
                            specify a single source number to run (this is the
                            line number in hte catalogue not the source id/name)
    -i, --independent     run independently per source, i.e. do not create a
                            global model dictionary
    -o, --overwrite       overwrite model files

Single source

To run AGNfitter for a single source in the catalog, specify the line number as the sourcenumber argument: e.g.

./RUN_AGNfitter_multi.py --sourcenumber 0 my_SETTINGS_AGNfitter.py

Working on a computer with multiple cores

To run AGNfitter in batch mode using python's multiprocessing capability and improve the efficiency, run e.g on a machine with 10 cpu cores

./RUN_AGNfitter_multi.py --ncpu 10 my_SETTINGS_AGNfitter.py

Working on a computer cluster with multiple different machines

To run AGNfitter in a distributed mode on a compute cluster with multiple machines, a shared filesystem and a queue system, e.g using a PBS array job to specify the calalog line numbers

./RUN_AGNfitter_multi.py --independent --sourcenumber $PBS_ARRAY_ID my_SETTINGS_AGNfitter.py

The --independent flag is required so that each job produces its own model dictionary at its own redshift (i.e. each machine does not recreate the model dictionaries for the entire catalog). This can be more efficient for large catalogs where the model dictionary creation (which is not paralellized) can take a long time.

Additionally, you can specify --overwrite if you wish to recreate any existing models dictionaries (in case you change the z arrays).