A proper CAT(0) metric space X is cocompact if it has a compact generating domain with respect to its full isometry group. Any proper CAT(0) space, cocompact or not, has a compact metrizable boundary at infinity partial derivative infinity X; indeed, up to homeomorphism, this boundary is arbitrary. However, cocompactness imposes restrictions on what the boundary can be. Swenson showed that the boundary of a cocompact X has to be finite-dimensional. Here we show more: the dimension of a,,X has to be equal to the global tech cohomological dimension of partial derivative infinity X. For example: a compact manifold with non-empty boundary cannot be partial derivative infinity X with X cocompact. We include two consequences of this topological/geometric fact: (1) The dimension of the boundary is a quasi-isometry invariant of CAT(0) groups. (2) Geodesic segments in a cocompact X can "almost" be extended to geodesic rays, i.e. X is almost geodesically complete. (C) 2007 Elsevier Ltd. All rights reserved.