loganoz / horses3d

HORSES3D: A high-order discontinuous Galerkin solver for flow simulations and multi-physics applications
https://loganoz.github.io/horses3d/
MIT License
112 stars 24 forks source link

Build build/MPI_Utilities.o had an error #167

Closed Autumn-Roy closed 10 months ago

Autumn-Roy commented 1 year ago

When I tried to make the horses3d, there is an error occurred in make all step.

My installtion step is:

  1. load gcc and openmpi: module load gcc/9.3.0 openmpi/4.1.1-gcc-9.3.0
  2. build the requirements: petsc, GKlib, METIS and add the path of these software in .bashrc
  3. cd Solver
  4. ./configure
  5. make all COMM=PARALLEL

Then I got an error below:

mpif90 -cpp -ffree-line-length-0 -O3 -ftree-vectorize  -ftree-vectorizer-verbose=0 -fbackslash -D_has_Quad -fopenmp -D_HAS_MPI_ -D_HAS_METIS_  -I/lustre/home/acct-saaxh/saaxh/horses3d/Solver/include -c MPI_Utilities.f90 -o build/MPI_Utilities.o -J ./include
MPI_Utilities.f90:77:9:

   77 |          select rank(x)
      |         1
Error: Unclassifiable statement at (1)
MPI_Utilities.f90:92:12:

   92 |          end select
      |            1
Error: Expecting END IF statement at (1)
MPI_Utilities.f90:123:12:

  123 |          end select
      |            1
Error: Expecting END IF statement at (1)
MPI_Utilities.f90:168:13:

  168 |          rank(0)
      |             1
Error: 'rank' at (1) is not a variable
MPI_Utilities.f90:170:13:

  170 |          rank(1)
      |             1
Error: 'rank' at (1) is not a variable
MPI_Utilities.f90:172:13:

  172 |          rank(2)
      |             1
Error: 'rank' at (1) is not a variable
MPI_Utilities.f90:174:13:

  174 |          rank(3)
      |             1
Error: 'rank' at (1) is not a variable
MPI_Utilities.f90:176:13:

  176 |          rank(4)
      |             1
Error: 'rank' at (1) is not a variable
MPI_Utilities.f90:178:12:

  178 |          end select
      |            1
Error: Expecting END IF statement at (1)
MPI_Utilities.f90:181:13:

  181 |          rank(0)
      |             1
Error: 'rank' at (1) is not a variable
MPI_Utilities.f90:184:13:

  184 |          rank(1)
      |             1
Error: 'rank' at (1) is not a variable
MPI_Utilities.f90:187:13:

  187 |          rank(2)
      |             1
Error: 'rank' at (1) is not a variable
MPI_Utilities.f90:190:13:

  190 |          rank(3)
      |             1
Error: 'rank' at (1) is not a variable
MPI_Utilities.f90:193:13:

  193 |          rank(4)
      |             1
Error: 'rank' at (1) is not a variable
MPI_Utilities.f90:196:12:

  196 |          end select
      |            1
Error: Expecting END IF statement at (1)
make[1]: *** [build/MPI_Utilities.o] Error 1
make[1]: Leaving directory `/myhomepath/horses3d/Solver/src/libs/mpiutils'
make: *** [horseslibs] Error 1
loganoz commented 1 year ago

Hi @Autumn-Roy,

May be the gcc version you are using is too old. Could you try compiling with a more recent version?

Best, Gonzalo

Autumn-Roy commented 1 year ago

Thanks @loganoz ,

I use gcc 11.2 instead of 9.3.0, but the error is still here. Fortunately, I change gcc to intel-oneapi-compilers/2021.4.0 can solve this problem and compiled successfully.

loganoz commented 1 year ago

Ok, good to know. @Andres-MG, do you have any input about the problem with gcc 11.2?

Andres-MG commented 1 year ago

I can try a different implementation, one that does not use these rank features.

loganoz commented 11 months ago

@Andres-MG, what's the status of this? Should we close this issue?

Andres-MG commented 11 months ago

Assumed-rank arrays are Fortran 2018, so I think we should implement this with interfaces. I will push the changes today.