Germany, especially MAN, build several different large diesel engines for warship use. Most of the ship these engines were supposed to power were finished, or even started.
All these large main engines were double-acting-two-stroke Diesels, to minimize the required weight and space.
The first one was a 12000 hp 6-cylinder, but by the time it was "war-ready" in 1917 it's ship the "SMS Prinzregent Luitpold
" hat already been commissioned without its third shaft.
After that came the 7100 hp 9-cylinder (type MZ 42/58) which powered the Deutschland-class.
Based on these, a V-Version (type VZ 42/58) was developed and build. This engine made a 200 hour endurance run at 10000 hp in 1939.
Some engines for the H-class battleships were also build. Some parts like a piston with connecting rod are on display in museums. Each shaft should have been driven by four 9-cylinder (Type MZ 65/95
) motors with a combined power of 50000 to 55000 shp. Therefore a single engine produced between 13400 and 15000 hp (without gearing losses).
A different engine was build and tested during WW2. It's a 24-cylinder-V-engine (type ZV 32/44) producing 10000 hp (endurance), 12600 hp (max) and 15000 hp with an exhaust-turbo-charger which allowed a weight to power ratio of 4 kg/hp. Six of these engine were planned to power the destroyer Z51. One engine is at display at Sinsheim
As far as I know are the U-Boat (submarine) and S-Boat (MTB) engines unrelated.
P.S.: The numbers in the MAN type designations represent the bore and stroke in centimeters.