pyhyp icon indicating copy to clipboard operation
pyhyp copied to clipboard

Compilation error: Rank mismatch

Open chi86 opened this issue 1 year ago • 1 comments

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:

chi86 avatar Nov 13 '24 16:11 chi86

Hi, the flag -fallow-argument-mismatch you mentioned should take care of this issue. Can you retry and post the build log? However, the code versions you posted have conflicting packages and versions (e.g., OpenMPI/MPICH and CGNS 4.5.0). Please take a look at our documentation for currently supported and tested versions https://mdolab-mach-aero.readthedocs-hosted.com/en/latest/installInstructions/install3rdPartyPackages.html

eirikurj avatar Nov 29 '24 12:11 eirikurj