I am seeking the title (and author) of a novel whose chief character travels through time (and space?) to a place where he is alone in a large environment but cannot escape from it. At one stage he glimpses another distant person but cannot make contact. It eventually turns out that the other person is himself, much older, still trapped in the same situation.
I read the book many years ago and would like to find it again to re-read.