For $\sum _{k=1}^M x_k=1$, notice that:
$$\sum _{i=1}^n i-\sum _{j=1}^{M-n} j=1 \Leftrightarrow \sum _{i=1}^n i=1+\sum _{j=1}^{M-n} j=A\text{, (}1\leq n < M\text{)}$$
so IntegerPartitions
on A
and A-1
can be used to generate the solution set. For large $M$ it should be well efficient.
Take $M=10$ for example:
Module[{M = 10},
Module[{A = 10, n = #, m = M - #},
Outer[Join,
IntegerPartitions[A, {n}],
-IntegerPartitions[A - 1, {m}],
1]
] & /@ Range[M - 1] //
Flatten[#, 2] &
]
{{10, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {9,
1, -2, -1, -1, -1, -1, -1, -1, -1}, {8,
2, -2, -1, -1, -1, -1, -1, -1, -1}, {7,
3, -2, -1, -1, -1, -1, -1, -1, -1}, {6,
4, -2, -1, -1, -1, -1, -1, -1, -1}, {5,
5, -2, -1, -1, -1, -1, -1, -1, -1}, {8, 1,
1, -3, -1, -1, -1, -1, -1, -1}, {8, 1,
1, -2, -2, -1, -1, -1, -1, -1}, {7, 2,
1, -3, -1, -1, -1, -1, -1, -1}, {7, 2,
1, -2, -2, -1, -1, -1, -1, -1}, <<134>>}
With an arbitrary A
large enough, any size of solution set can be obtained.
Edit:
As the previous answers showed, for $M=3$ the solution set can be visualized as points on plane $x+y+z=1$. The following is the correspond graphics for different $A$:
solSet = Table[Module[{M = 3},
Module[{n = #, m = M - #},
Outer[Join,
IntegerPartitions[A, {n}],
-IntegerPartitions[A - 1, {m}],
1]
] & /@ Range[M - 1] //
Flatten[#, 2] &
], {A, 2, 20}];
Shallow[solSet, {5, 3}]
{{{1, 1, -1}}, {{3, -1, -1}, {2, 1, -2}}, {{4, -2, -1}, {3,
1, -3}, {2, 2, -3}}, <<16>>}
Module[{solSet = solSet, min, max},
{min, max} = Through[{Min, Max}[Flatten@solSet]];
Show[
ContourPlot3D[x + y + z == 1,
{x, min, max}, {y, min, max}, {z, min, max},
MeshStyle -> GrayLevel[.9], BoundaryStyle -> GrayLevel[.6],
ContourStyle -> None, PlotRange -> All,
AxesLabel -> (Style[#, 20, Red, Bold] & /@ {x, y, z})],
Graphics3D[{PointSize[.015],
MapIndexed[{
ColorData["Rainbow"][(#2[[1]] - 1)/(Length[solSet] - 1)],
Point[#1]} &, solSet]
}, PlotRange -> All] ]
]

Same color corresponds to same $A$.
By taking permutations, more solution can be obtained:
Module[{solSet = solSet, min, max},
{min, max} = Through[{Min, Max}[Flatten@solSet]];
Show[
ContourPlot3D[x + y + z == 1,
{x, min, max}, {y, min, max}, {z, min, max},
Mesh -> None, BoundaryStyle -> GrayLevel[.6],
ContourStyle -> None, PlotRange -> All,
AxesLabel -> (Style[#, 20, Red, Bold] & /@ {x, y, z})],
Graphics3D[{PointSize[.011],
MapIndexed[{
ColorData["Rainbow"][(#2[[1]] - 1)/(Length[solSet] - 1)],
Point[Flatten[Permutations /@ #1, 1]]} &, solSet]
}, PlotRange -> All]
]
]

Note the blank bands correspond to solutions containing $0$, which won't be considered by IntegerPartitions
. (But it should be easy to construct them from solution set for $M=2$.)