Running SPECFEM2D on multiple processors

Hi all,

I have been trying to run SPECFEM2D on multiple processors. I changed the NPROC parameter in the Par_file to 16. But the xspecfem2D run crashes with the following error. Can someone help me with this?

application called MPI_Abort(MPI_COMM_WORLD, 30) - process 0
[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=30
:
system msg for write_line failure : Bad file descriptor

Error: number of processors supposed to run on: 16
Error: number of MPI processors actually run on: 1

wrong number of MPI processes, must always have NPROC == nproc_read_from_database
Error detected, aborting MPIā€¦ proc 0