Compilation error: Rank mismatch
Nobody has claimed this yet.
- Dominant language
- Fortran
- Stars
- 61
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
Description
When running "make" i get the following errors:
mpifort -I../../mod -I/usr/local/include -fPIC -std=f2008 -fdefault-real-8 -O2 -I/opt/petsc/petsc_git/include -I/opt/petsc/petsc_git/arch-linux-c-debug/include -I/opt/petsc/petsc_git -c 3D_elliptic.F90 -o ../../obj/3D_elliptic.o
3D_code.F90:1020:44:
1020 | call MatSetValuesBlocked(hypMat, 1, i - 1, 1, j - 1, blk, ADD_VALUES, ierr)
| 1
Error: Rank mismatch in argument ‘c’ at (1) (rank-1 and scalar)
3D_code.F90:1020:54:
1020 | call MatSetValuesBlocked(hypMat, 1, i - 1, 1, j - 1, blk, ADD_VALUES, ierr)
| 1
Error: Rank mismatch in argument ‘e’ at (1) (rank-1 and scalar)
make[3]: *** [../../rulesSources.mk:19: 3D_code.o] Error 1
make[3]: *** Waiting for unfinished jobs....
3D_elliptic.F90:520:47:
520 | call MatSetValues(ellipMat, 1, j + iStart - 1, 1, i - 1, phi, INSERT_VALUES, ierr)
| 1
Error: Rank mismatch in argument ‘c’ at (1) (rank-1 and scalar)
3D_elliptic.F90:520:66:
520 | call MatSetValues(ellipMat, 1, j + iStart - 1, 1, i - 1, phi, INSERT_VALUES, ierr)
| 1
Error: Rank mismatch in argument ‘e’ at (1) (rank-1 and scalar)
3D_elliptic.F90:520:73:
520 | call MatSetValues(ellipMat, 1, j + iStart - 1, 1, i - 1, phi, INSERT_VALUES, ierr)
| 1
Error: Rank mismatch in argument ‘f’ at (1) (rank-1 and scalar)
3D_elliptic.F90:532:49:
532 | call MatSetValues(ellipPCMat, 1, j + iStart - 1, 1, i - 1, phi, INSERT_VALUES, ierr)
| 1
Error: Rank mismatch in argument ‘c’ at (1) (rank-1 and scalar)
3D_elliptic.F90:532:68:
532 | call MatSetValues(ellipPCMat, 1, j + iStart - 1, 1, i - 1, phi, INSERT_VALUES, ierr)
| 1
Error: Rank mismatch in argument ‘e’ at (1) (rank-1 and scalar)
3D_elliptic.F90:532:75:
532 | call MatSetValues(ellipPCMat, 1, j + iStart - 1, 1, i - 1, phi, INSERT_VALUES, ierr)
| 1
Error: Rank mismatch in argument ‘f’ at (1) (rank-1 and scalar)
make[3]: *** [../../rulesSources.mk:19: 3D_elliptic.o] Error 1
I tried the -fallow-argument-mismatch flag but it still produces errors.
Code versions
Operating System: Linux 6.6.52-gentoo-gentoo-dist #10 SMP PREEMPT_DYNAMIC Mon Nov 11 10:26:45 CET 2024 x86_64 Intel(R) Core(TM) i7-14700 GenuineIntel GNU/Linux
cmake: 3.30.5
Gcc: (Gentoo 13.3.1_p20241025 p1) 13.3.1 20241024
Fortran Compiler: GNU Fortran (Gentoo 13.3.1_p20241025 p1) 13.3.1 20241024
Python: 3.12.7
OpenMPI: openmpi-4.2.3
MPICH: 4.2.3
CGNS: CGNS-4.5.0
PETSc: petsc-3.22.1
- This repository:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the build with the reported GNU Fortran, OpenMPI, and PETSc versions, then inspect the calls in 3D_code.F90 and 3D_elliptic.F90 at the reported lines. Compare the MatSetValues and MatSetValuesBlocked interfaces used by the installed PETSc Fortran bindings. Done means make completes without the rank-mismatch errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fortran
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100