LutzGross / esys-escript.github.io

Other
30 stars 13 forks source link

Error building with MPI #24

Open dliptai opened 3 years ago

dliptai commented 3 years ago

Versions: esys-escript 5.8 gcc 9.2.0 openmpi 4.0.2

Error: Compiling with mpi = 'OPENMPI' throws the following error

...
paso/src/SystemMatrix_copyRemoteCoupleBlock.cpp: In member function 'void paso::SystemMatrix<T>::copyRemoteCoupleBlock(bool) [with T = double]':
paso/src/SystemMatrix_copyRemoteCoupleBlock.cpp:268:34: error: expected type-specifier before 'SparseMatrix'
  268 |     remote_coupleBlock.reset(new SparseMatrix(row_coupleBlock->type,
      |                                  ^~~~~~~~~~~~
scons: *** [build/posix/paso/src/SystemMatrix_copyRemoteCoupleBlock.os] Error 1
scons: building terminated because of errors.
...

It appears SparseMatrix is missing the type specifier <double>.

Suggested fix:

--- paso/src/orig.SystemMatrix_copyRemoteCoupleBlock.cpp
+++ paso/src/SystemMatrix_copyRemoteCoupleBlock.cpp
@@ -265,7 +265,7 @@
     // allocate pattern and sparse matrix for remote_coupleBlock
     Pattern_ptr pattern(new Pattern(row_coupleBlock->pattern->type,
                         overlapped_n, num_couple_cols, ptr_ptr, ptr_idx));
-    remote_coupleBlock.reset(new SparseMatrix(row_coupleBlock->type,
+    remote_coupleBlock.reset(new SparseMatrix<double>(row_coupleBlock->type,
                              pattern, row_block_size, col_block_size, false));

     // send/receive value array
LutzGross commented 2 years ago

I have the feeling this has been fixed.