Compiler issues
Opened this issue · 1 comments
pjohnsonGNS commented
I have downloaded and attempted to install Voronoi and required dependencies. I have noted a couple of minor things and then issues that have resulted in failure to compile Voronoi.
- As of this writing, the build page (https://lanl.github.io/voronoi/docs/building/) returns a 404 error. I received build instructions separately.
- It would be helpful for said build page to include instructions on installing HDF5; the instructions for petsc are great.
The error that causes the actual crash is:
grid.F90:1899.50:
grid%vertex_ids(i) - 1, zero, INSERT_VALUES, ierr); i
1
Error: Type mismatch in argument 'va' at (1); passed INTEGER(4) to REAL(8)
pjohnsonGNS commented
Update. Have found issue here and solution.
The line of grid.F90 is a call:
call MatSetValue(grid%adjmatrix_full, grid%vertex_ids(i) - 1, &
grid%vertex_ids(i) - 1, zero, INSERT_VALUES, ierr); CHKERRQ(ierr)
where zero is set as PetscInt zero = 0
However, MatSetValue under PETSC asks for:
m | - the matrix | |
---|---|---|
row | - the row location of the entry | |
col | - the column location of the entry | |
value | - the value to insert | |
mode | - either INSERT_VALUES or ADD_VALUES |
where "value" expects a real.
The solution in this case was simply to adjust line 1898 of grid.F90 to instead:
call MatSetValue(grid%adjmatrix_full, grid%vertex_ids(i) - 1, &
grid%vertex_ids(i) - 1, 0.d0, INSERT_VALUES, ierr); CHKERRQ(ierr)