There is no record of Nietzsche ever mentioning Karl Marx, or vice versa. The film is set in 1889, and the Marxist Social Democratic Party could not operate openly in Germany till 1890. And their ideas were based on utterly different assumptions, even if some people later tried to merge them.