Fixed a bug of undeclared variable when LM_MPI is disabled