An earthquake with a magnitude of 7.1 struck off the coast of Papua New Guinea on Wednesday, the United States Geological Survey reported.