[numerics] debug message in NM_MUMPS
#include "NumericsMatrix_internal.h"
#include "NumericsMatrix.h"
#include "NumericsSparseMatrix.h"
-
-#include "debug.h"
#include "numerics_verbose.h"
#include "NM_MPI.h"
+/* #define DEBUG_MESSAGES */
+#include "debug.h"
+
void NM_MUMPS_free(void* p)
{
NSM_linear_solver_params* params = (NSM_linear_solver_params*) p;
@@ -88,9 +89,13 @@ void NM_MUMPS(NumericsMatrix* A, int job)
{
NM_MUMPS_id(A)->job = job;
/* we send the job number for listening processes */
+ DEBUG_PRINTF("MPI: %d sending job %d\n", NM_MPI_rank(A),job);
CHECK_MPI(NM_MPI_comm(A), MPI_Bcast(&job, 1, MPI_INT, 0, NM_MPI_comm(A)));
+ if (job)
+ {
dmumps_c(NM_MUMPS_id(A));
}
+ }
else
{
int ijob=-1;
@@ -102,11 +107,15 @@ void NM_MUMPS(NumericsMatrix* A, int job)
while(ijob)
{
/* I am a listening process, I will stop when ijob = 0 */
- CHECK_MPI(NM_MPI_comm(A), MPI_Recv(&ijob, 1, MPI_INT, 0, 0, NM_MPI_comm(A), MPI_STATUS_IGNORE));
- NM_MUMPS_id(A)->job = job;
+ CHECK_MPI(NM_MPI_comm(A), MPI_Bcast(&ijob, 1, MPI_INT, 0, NM_MPI_comm(A)));
+ DEBUG_PRINTF("MPI: %d receiving job %d\n", NM_MPI_rank(A),ijob);
+ if (ijob)
+ {
+ NM_MUMPS_id(A)->job = ijob;
dmumps_c(NM_MUMPS_id(A));
}
}
+ }
#else
NM_MUMPS_id(A)->job = job;
dmumps_c(NM_MUMPS_id(A));
