Comments (3)
This works for me:
#include <cmath>
#include <iostream>
#include "dense/DistributedMatrix.hpp"
#include "HSS/HSSMatrixMPI.hpp"
#include "kernel/Kernel.hpp"
using namespace strumpack;
using namespace strumpack::HSS;
int main(int argc, char * argv[]) {
MPI_Init(&argc, &argv);
int N = atoi(argv[1]);
HSSOptions<double> hss_opts;
hss_opts.set_verbose(false);
hss_opts.set_from_command_line(argc, argv);
{
BLACSGrid grid(MPI_COMM_WORLD);
// DistributedMatrix<double> A;
DenseMatrix<double> vector(N, 1); // data for a 1D laplace kernel
for (int i = 0; i < N; ++i) {
vector(i, 0) = i;
}
auto laplace1d = kernel::LaplaceKernel<double>(vector, N, N);
HSSMatrixMPI<double> HSS(laplace1d, &grid, hss_opts);
}
scalapack::Cblacs_exit(1);
MPI_Finalize();
}
Note I used the correct sizes here:
auto laplace1d = kernel::LaplaceKernel<double>(vector, N, N);
And I put everything using the BLACSGrid in a separate scope, to make sure that is destroyed before calling Cblacs_exit and MPI_Finalize.
from strumpack.
@pghysels I tried your solution but now I get the following error:
# ANN search quality = 1 after 0 iterations
# ANN search quality = 1 after 0 iterationsterminate called after throwing an instance of '
std::bad_array_new_length'
what(): std::bad_array_new_length
# ANN search quality = # ANN search quality = 1 after 1 after 0 iterations0 iterations
{ 1, 0}: On entry to
DESCINIT parameter number 6 had an illegal value
ERROR: Could not create DistributedMatrix descriptor!
terminate called after throwing an instance of 'std::bad_array_new_length'
terminate called after throwing an instance of 'std::bad_array_new_length'
what(): std::bad_array_new_length
what(): std::bad_array_new_length
===================================================================================
= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
= RANK 0 PID 131297 RUNNING AT g0082
= KILLED BY SIGNAL: 6 (Aborted)
===================================================================================
===================================================================================
= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
= RANK 1 PID 131298 RUNNING AT g0082
= KILLED BY SIGNAL: 6 (Aborted)
===================================================================================
===================================================================================
= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
= RANK 2 PID 131299 RUNNING AT g0082
= KILLED BY SIGNAL: 6 (Aborted)
===================================================================================
===================================================================================
= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
= RANK 3 PID 131300 RUNNING AT g0082
= KILLED BY SIGNAL: 6 (Aborted)
===================================================================================
Also, I tried running make tests
followed by make test
inside the build directory, and all the tests fail.
BTW I'm using the intel completely (Intel MPI, MKL and ScaLAPACK from intel).
This is my modified program:
#include <cmath>
#include <iostream>
#include "mpi.h"
#include "dense/DistributedMatrix.hpp"
#include "HSS/HSSMatrixMPI.hpp"
#include "kernel/Kernel.hpp"
using namespace strumpack;
using namespace strumpack::HSS;
int main(int argc, char * argv[]) {
MPI_Init(&argc, &argv);
int N = atoi(argv[1]);
int nprocs;
int rank;
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
std::cout << "nprocs: " << nprocs << " rank: " << rank << std::endl;
HSSOptions<double> hss_opts;
hss_opts.set_verbose(false);
hss_opts.describe_options();
hss_opts.set_from_command_line(argc, argv);
int nr, nc;
{
BLACSGrid grid(MPI_COMM_WORLD, nprocs);
DenseMatrix<double> vector(N, 1); // data for a 1D laplace kernel
for (int i = 0; i < N; ++i) {
vector(i, 0) = i;
}
auto laplace1d = kernel::LaplaceKernel<double>(vector, N, N);
HSSMatrixMPI<double> HSS(laplace1d, &grid, hss_opts);
}
scalapack::Cblacs_exit(1);
MPI_Finalize();
}
from strumpack.
What version of icc are you using?
There was an issue with icc after 19. I was previously unable to compile STRUMPACK 3.2.0 with icc 19.something.
#20
Also does it happen if you compile everything with gcc?
from strumpack.
Related Issues (20)
- Fortran Interface for Finite Element nonlinear solver HOT 4
- Windows 10 support HOT 6
- Iterate Cluster Tree HOT 5
- mpi_type for std::pair leads to memory leaks HOT 3
- MSVC: Cannot convert from strumpack::EliminationTreeMPIDist<scalar_t,integer_t> *' to 'const strumpack::EliminationTree<scalar_t,integer_t> *' HOT 1
- Including ButterflyPACK HOT 2
- Segmentation fault during forward solve with CUDA HOT 4
- STRUMPACK with > 1 GPU per node HOT 11
- Crash with updated PETSc interface using version 7.1.3 HOT 2
- Does STRUMPACK support the 'long double' data type? HOT 1
- Symmetric support HOT 1
- Access elements in HODLRMatrix HOT 2
- Inconsistant diagonal entries for dense matrix and corresponding HODLR matrix HOT 7
- namespace "thrust" has no member "stable_sort_by_key" HOT 1
- Input matrix NAN in ComputeRange HOT 8
- HODLR OpenMP support HOT 1
- std::length_error', when total nonzeros is higher than maximum of integer4, Fortran use of STRUMPACK_MPIdist HOT 23
- HSSMatrix HSSMatrix log determinant HOT 2
- construct_partially_matrix_free for MPI HOT 2
- [error] Cmake based build with intel mkl library HOT 35
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strumpack.