Let $X$ be a convex set. Let $f:\mathbb{R}^n \to \mathbb{R}$ a $C^1$ function. The idea is to minimize f subject to $x \in X$.
Let $x^* \in X$ be a point such that $$\nabla f(x^*)^T (x-x^*) \geq 0$$ for all $x \in X$. Then can I conclude that $x^*$ is a local minimum? If not, is there an obvious counterexample?