Two decomposition algorithms for nonconvex optimization problems with global variables