Given a matrix $\color{red}{\mathbf A} \in \mathbb{Z}_{\ge 0}^{m \times n}$, find the row vector $\color{red}{\mathbf v} \in \mathbb{R}_{>0}^{1 \times m}$ such that the elements of $\color{red}{\mathbf{vA}}$ are equal to one another (or as close as possible).
Usually, $m > n$, but in rare scenarios, $m < n$.
Motivation
The vector $\color{red}{\mathbf v}$ is used to give weights to a set of equations which are minimized in a machine learning context. Each equation contains a varying number of predictors, which are represented in the matrix $\color{red}{\mathbf A}$; the columns are the different predictors and the rows are the minimized equations. To ensure that each predictor has approximately the same weight in the minimization routine, the equations are multiplied by the vector $\color{red}{\mathbf v}$.
$\color{red}{\mathbf v} > 0$ since each equation should be included in the minimization.
The solution needs to be programmable given the large size of $\color{red}{\mathbf A}$ (e.g., $m > 100$ and $n > 10$).
Example
$$\color{red}{\mathbf A}=\begin{bmatrix}0&4&2\\1&0&1\\2&2&0\\1&1&1 \end{bmatrix}$$
By inspection, $\color{red}{\mathbf v}=\begin{bmatrix}1&4&1&1\end{bmatrix}$ so that $\color{red}{\mathbf{vA}} = \begin{bmatrix}7&7&7\end{bmatrix}$.
Another solution is $\color{red}{\mathbf v}=\begin{bmatrix}0.5&2&1&1\end{bmatrix}$ so that $\color{red}{\mathbf{vA}}= \begin{bmatrix}5&5&5\end{bmatrix}$.
Any solution is acceptable as long as $\color{red}{\mathbf v} > 0$. (The elements of $\color{red}{\mathbf{vA}}$ do not have to be an integer).
Solution attempt
I am not super familiar with linear algebra, so the only solution I can think of is to iteratively search for $\color{red}{\mathbf v}$ using optimization.
The mean squared error between every element pair of $\color{red}{\mathbf{vA}}$ is the objective function. In our example:
$$MSE=\frac {(\mathbf{vA}_1 - \mathbf{vA}_2)^2 + (\mathbf{vA}_1 - \mathbf{vA}_3)^2 + (\mathbf{vA}_2 - \mathbf{vA}_3)^2}{3}$$
Find the vector $\color{red}{\mathbf v}$ that minimizes the $MSE$ (and whose elements $> 0$).
However, the solution needs to be as fast as possible, so I hope that an analytical solution exists, or at least a very fast iterative solution.
We want $Av \approx k[1,1,...,1]^T$. This is a typical least squares problem and the solution $v$ which minimizes $||Av - k[1,1,1,\dots,1]^T||_2$ is $v = k(A^TA)^{-1}A^T[1,1,\dots,1]^T$.