NGA2 icon indicating copy to clipboard operation
NGA2 copied to clipboard

Some example cases cannot be compiled

Open linysh1997 opened this issue 1 year ago • 2 comments

Hello. I found some example cases cannot be compiled. The problem seems to be that some variables of certain types are not assigned values with correct type, or the subroutines being called are not assigned arguments with correct type.

For example, in examples/drop_breakup, at line 893 in examples/drop_breakup/src/simulation.f90, the code has: lp%p(np)%col =0.0_WP. In examples/drop_breakup/src/simulation.f90, lp is declared of type(lpt) at line 27, p(np) is of type(part), and type(part) has members of Acol and Tcol, but here it assigns values to a non-existing member col.

Similar case for examples/vdjet. At line 157 in examples/vdjet/src/simulation.f90, the code has: call fs%setup(pressure_ils=pcg_amg,implicit_ils=pcg_amg). But the fs is declared of type(lowmach), which has the subroutine subroutine setup(this,pressure_solver,implicit_solver) in src/variable_density/lowmach_class, not setup(pressure_ils=pcg_amg,implicit_ils=pcg_amg).

So if I run, for example the drop_breakup case, I would get such errors:

[linysh1997@tinkercliffs1 drop_breakup]$ make
Loading ../../tools/GNUMake/comps/gnu.mak...
Loading ../../tools/GNUMake/sites/Make.unknown...
Loading ../../tools/GNUMake/packages/Make.hypre...
Loading ../../tools/GNUMake/packages/Make.lapack...
Loading ../../tools/GNUMake/packages/Make.irl...
Loading ../../tools/GNUMake/Make.local...
Taking user code from:  src
Taking base code from: particles core subgrid two_phase data solver config grid libraries
Compiling simulation.f90 ...
mpifort  -O3 -fno-tree-vectorize -ffast-math -funroll-loops -fomit-frame-pointer -pipe -fopenmp -ffree-line-length-none -fno-range-check -fno-second-underscore -Jbuild/o/dp.gnu.opt.mpi -I build/o/dp.gnu.opt.mpi -fimplicit-none  -fcheck=array-temps -I. -Isrc -I/home/linysh1997/packages/dependencies/hypre/hypre-2.27.0//include -I/home/linysh1997/packages/dependencies/interface-reconstruction-library//include/irl_fortran -I../../src/particles -I../../src/core -I../../src/subgrid -I../../src/two_phase -I../../src/data -I../../src/solver -I../../src/config -I../../src/grid -I../../src/libraries -c src/simulation.f90 -o build/o/dp.gnu.opt.mpi/simulation.o
src/simulation.f90:893:31:

  893 |                   lp%p(np)%col =0.0_WP                                     !< Give zero collision force
      |                               1
Error: ‘col’ at (1) is not a member of the ‘part’ structure; did you mean ‘acol’?
src/simulation.f90:916:28:

  916 |                lp%p(np)%col =0.0_WP                                     !< Give zero collision force
      |                            1
Error: ‘col’ at (1) is not a member of the ‘part’ structure; did you mean ‘acol’?
src/simulation.f90:514:38:

  514 |             call fs%get_strainrate(Ui=Ui,Vi=Vi,Wi=Wi,SR=SR)
      |                                      1
Error: Keyword argument ‘ui’ at (1) is not in the procedure
src/simulation.f90:516:77:

  516 |             call sgs%get_visc(dt=time%dtold,rho=resU,Ui=Ui,Vi=Vi,Wi=Wi,SR=SR)
      |                                                                             1
Error: Missing actual argument for argument ‘type’ at (1)
src/simulation.f90:275:36:

  275 |          call fs%setup(pressure_ils=gmres_amg,implicit_ils=gmres_amg)
      |                                    1
Error: Keyword argument ‘pressure_ils’ at (1) is not in the procedure; did you mean ‘pressure_solver’?
make: *** [build/o/dp.gnu.opt.mpi/simulation.o] Error 1

The branch that I used is the master branch, and the compilers I've tried include GCC 10 and GCC 12.

linysh1997 avatar Dec 01 '23 19:12 linysh1997

Using the develop branch should take care of this. The master branch is only rarely updated at the moment.

desjardi avatar Sep 03 '24 13:09 desjardi

It worked. Thank you.

linysh1997 avatar Sep 06 '24 01:09 linysh1997