def split_config_args(args):
    """
    Based on configuration parameters passed build configuration dictionary used by subprocess

    args: Dictionary
    All parameters passed in

    return: Dictionary, Dictionary, Dictionary
    3 dictionaries - one for perf tests, one for systemml specific args, one for backend options    
    """

    perftest_args_dict = {}

    perftest_args_dict['family'] = args['family']
    perftest_args_dict['algo'] = args['algo']
    perftest_args_dict['exec_type'] = args['exec_type']
    perftest_args_dict['mat_type'] = args['mat_type']
    perftest_args_dict['mat_shape'] = args['mat_shape']
    perftest_args_dict['config_dir'] = args['config_dir']
    perftest_args_dict['filename'] = args['filename']
    perftest_args_dict['mode'] = args['mode']
    perftest_args_dict['temp_dir'] = args['temp_dir']
    perftest_args_dict['file_system_type'] = args['file_system_type']

    systemml_args_dict = {}

    if args['stats'] is not None:
        systemml_args_dict['-stats'] = args['stats']
    else:
        systemml_args_dict['-stats'] = ''

    if args['explain'] is not None:
        systemml_args_dict['-explain'] = args['explain']
    else:
        systemml_args_dict['-explain'] = ''

    if args['config'] is not None:
        systemml_args_dict['-config'] = args['config']

    if args['gpu'] is not None:
        if args['gpu'] == 'no_option':
            systemml_args_dict['-gpu'] = ''
        else:
            systemml_args_dict['-gpu'] = args['gpu']

    backend_args_dict = {}
    exec_type = args['exec_type']
    
    if exec_type == 'hybrid_spark':
        if args['master'] is not None:
            backend_args_dict['--master'] = args['master']

        if args['deploy_mode'] is not None:
            backend_args_dict['--deploy-mode'] = args['master']

        if args['num_executors'] is not None:
            backend_args_dict['--num-executors'] = args['num_executors']

        if args['driver_memory'] is not None:
            backend_args_dict['--driver-memory'] = args['driver_memory']

        if args['executor_cores'] is not None:
            backend_args_dict['--executor-cores'] = args['executor_cores']

        if args['conf'] is not None:
            backend_args_dict['--conf'] = ''.join(args['conf'])

    elif exec_type == 'singlenode':
        if args['heapmem'] is not None:
            backend_args_dict['-heapmem'] = args['heapmem']

    return perftest_args_dict, systemml_args_dict, backend_args_dict