happy-labs / mpi

Matrix multiplication via mpi
3 stars 5 forks source link

Error after executing multi_process_multiplier code. #1

Open LokeshPullagura opened 4 years ago

LokeshPullagura commented 4 years ago

Hallo,

When I executed multi_process_multiplier code, am getting these errors as shown below.

Traceback (most recent call last): File "multi-process-multiplier.py", line 157, in master_operation() File "multi-process-multiplier.py", line 121, in master_operation distribute_matrix_data() File "multi-process-multiplier.py", line 92, in distribute_matrix_data rows = split_matrix(mtrx1, workers) File "multi-process-multiplier.py", line 86, in split_matrix rows.append(seq[b:e]) TypeError: slice indices must be integers or None or have an index method

Can anyone help me in solving these errors?

Thanks in Advance.

KarimEssam1 commented 4 years ago

hello,

the correction is very sample : just replace the line: n = len(seq) / p with n = len(seq) // p