def _setup_variables(self, compute_indices=False):
        """
        Returns copies of our params and unknowns dictionaries,
        re-keyed to use absolute variable names.

        Args
        ----

        compute_indices : bool, optional
            If True, call setup_distrib() to set values of
            'src_indices' metadata.

        """
        to_prom_name = self._sysdata.to_prom_name = {}
        to_abs_uname = self._sysdata.to_abs_uname = {}
        to_abs_pnames = self._sysdata.to_abs_pnames = OrderedDict()
        to_prom_uname = self._sysdata.to_prom_uname = OrderedDict()
        to_prom_pname = self._sysdata.to_prom_pname = OrderedDict()

        if MPI and compute_indices and self.is_active():
            if hasattr(self, 'setup_distrib_idxs'):
                warnings.simplefilter('always', DeprecationWarning)
                warnings.warn("setup_distrib_idxs is deprecated, use setup_distrib instead.",
                              DeprecationWarning,stacklevel=2)
                warnings.simplefilter('ignore', DeprecationWarning)

                self.setup_distrib_idxs()
            else:
                self.setup_distrib()
            # now update our distrib_size metadata for any distributed
            # unknowns
            sizes = []
            names = []
            for name, meta in iteritems(self._init_unknowns_dict):
                if 'src_indices' in meta:
                    sizes.append(len(meta['src_indices']))
                    names.append(name)
            if sizes:
                if trace:   # pragma: no cover
                    debug("allgathering src index sizes:")
                allsizes = np.zeros((self.comm.size, len(sizes)), dtype=int)
                self.comm.Allgather(np.array(sizes, dtype=int), allsizes)
                for i, name in enumerate(names):
                    self._init_unknowns_dict[name]['distrib_size'] = np.sum(allsizes[:, i])

        # key with absolute path names and add promoted names
        self._params_dict = OrderedDict()
        for name, meta in iteritems(self._init_params_dict):
            pathname = self._get_var_pathname(name)
            self._params_dict [pathname] = meta
            meta['pathname'] = pathname
            to_prom_pname[pathname] = name
            to_abs_pnames[name] = (pathname,)

        self._unknowns_dict = OrderedDict()
        for name, meta in iteritems(self._init_unknowns_dict):
            pathname = self._get_var_pathname(name)
            self._unknowns_dict[pathname] = meta
            meta['pathname'] = pathname
            to_prom_uname[pathname] = name
            to_abs_uname[name] = pathname

        to_prom_name.update(to_prom_uname)
        to_prom_name.update(to_prom_pname)

        self._post_setup_vars = True

        self._sysdata._params_dict = self._params_dict
        self._sysdata._unknowns_dict = self._unknowns_dict

        return self._params_dict, self._unknowns_dict
dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/core/component.py/Component._setup_variables/original