I think I read this (probably in an anthology) around 1972. As I remember it -- this sentient submarine battleship is left over from a war and awakens when challenged. Is this Van Vogt?
Okay, I just found this by scanning an anthology of Van Vogt. The short story is very short and called ITSELF.
May be T. J. Bass' The Godwhale?
from the Amazon link:
Rorqual Maru was a cyborg—part organic whale, part mechanized ship—and part god. She was a harvester: a vast plankton rake, now without a crop, abandoned by earth society when the seas died. So she selected an island for her grave, hoping to keep her carcass visible for salvage. Although her long ear heard nothing, she believed that man still lived in his hive. If he should ever return to the sea, she wanted to serve. She longed for the thrill of a human's bare feet touching the skin of her deck. She missed the hearty hails, the sweat, and the laughter. She needed mankind. But all humans were long gone—or were they?