The Swiss spa that serves as the primary setting for the creepy, but otherwise pointless horror exercise, “A Cure for Wellness” (Fox) operates, it seems, on the Hotel California plan.

As fans of the Eagles’ 1977 hit will recall, that means “you can check out anytime you like, but you can never leave.”

The audience may pick up on this unusual policy well before the film’s protagonist — a junior Wall Street business executive the dialogue identifies only by his last name, Lockhart (Dane DeHaan) — ever does.

Callous young Lockhart has been dispatched to the Alps to convince a higher-ranking colleague called Pembroke (Harry Groener) to break his recently announced resolution to make his stay at the resort permanent. There’s a big merger in the works, and his fellow board members need Pembroke to sign off on it.

Corrupt machinations add urgency to Lockhart’s mission since Pembroke is to be made the fall guy for Lockhart’s own misdeeds in the lead up to the pending deal. Needless to say, rare is the capitalist who comes off well in a Hollywood movie these days.

Despite the soothing manner of the facility’s director, Dr. Volmer (Jason Isaacs), Lockhart eventually discovers that something is profoundly amiss, and his own chances of ever departing the place are remote.

Working from a script by Justin Haythe, director Gore Verbinski effectively conjures up a sinister atmosphere. But the subtlety with which he initially unsettles viewers is lost as he attempts to ratchet up the tension, in part by subjecting Lockhart to the kind of unpleasant hallucinations the Haight-Ashbury set used to term a bad trip.

Some of these delusions take place in a large complex of steam baths, where people for whom the virtue of modesty would be a wise choice, wander around in the altogether. The resulting imagery is more reminiscent of the work of British painter Lucien Freud than anything Hugh Hefner ever had in mind.

The mildly unnerving gives way to the gothic as a backstory about the evil nobleman who once owned the land on which the spa stands takes on increased significance. From there, the proceedings become downright lurid via plot developments involving Volmer’s daughter, Hannah (Mia Goth).

By this stage, many moviegoers will wonder why they’ve subjected themselves to this ultimately hellish journey in the first place. In fact, as its logically unsatisfying wrap-up approaches, “A Cure for Wellness” hovers on the border of the offensive. In the judgment of some, at least, it may cross that line — despite the relatively respectable overall intentions of its creators.

Either way, why be a prisoner of your own device?

The film contains some gory violence, a scene of torture, strong sexual content including a graphic incestuous assault and masturbation, much nudity in a nonsexual context, a couple of uses of profanity, and about a dozen instances each of rough and crude language. The Catholic News Service classification is L — limited adult audience, films whose problematic content many adults would find troubling. The Motion Picture Association of America rating is R — restricted. Under 17 requires accompanying parent or adult guardian.