danieljprice / phantom

Phantom Smoothed Particle Hydrodynamics and Magnetohydrodynamics code
https://phantomsph.github.io
Other
103 stars 223 forks source link

Add wind tests to the test suite (non dusty winds) #446

Closed lsiess closed 1 year ago

lsiess commented 1 year ago

Type of PR: new test_wind.f90 routine

Description: Provide a test suite for non dusty winds from a single star

Testing: I ran make test and passed all the tests

Did you run the bots? yes

Did you update relevant documentation in the docs directory? no

danieljprice commented 1 year ago

some of the failing tests in #450 will also be fixed by merging this...

danieljprice commented 1 year ago

build failures are in phantomtest, e.g.:

 Checking balsarakim (phantomtest)... FAILED
  Error: More actual than formal arguments in procedure call at (1)
  make[1]: *** [Makefile:462: test_wind.o] Error 1
  make: *** [Makefile:17: phantomtest] Error 2

i.e. can reproduce with:

make phantomtest SETUP=balsarakim
lsiess commented 1 year ago

I really don't understand what's wrong ? The only thing I changed with respect to the previous commit was to add call init_step to fix the remaining problem with SETUP=testkd and now most of the MPI tests fail ???? I am not familiar with MPI. Could you have a look. I am out of ideas.

Also, on my laptop when I compile make SETUP=test MPI=yes DEBUG=no SYSTEM=gfortran OPENMP=no phantomtest I have many error messages

mpif90 `mpif90 --showme:compile` -c -O3 -Wall -Wno-unused-dummy-argument -frecord-marker=4 -gdwarf-2 -finline-functions-called-once -finline-limit=1500 -funroll-loops -ftree-vectorize -std=f2008 -fall-intrinsics -fPIC -fdefault-real-8 -fdefault-double-8 ../src/tests/phantomtest.f90 -o phantomtest.o
gfortran: error: unrecognized command-line option ‘--showme:compile’

I am using GNU Fortran (Ubuntu 12.2.0-17ubuntu1) 12.2.0

sorry and thanks for your help

danieljprice commented 1 year ago

I think it's just that the new wind test is not working in the MPI code, it's the wind test that's failing.

In other words this is a real problem, namely that the wind injection is currently not implemented properly in MPI. I can take a look at this.

The default flavour of MPI is openMPI, hence if you use a different one (like MPICH) the flags will be slightly different

danieljprice commented 1 year ago

the "build" failures are just some unused variable warnings left in test_wind.f90, since we now disallow compiler warnings on the master branch... you can reproduce these with

make NOWARN=yes

giving

Error: Unused module variable ‘icooling’ which has been explicitly imported at (1) [-Werror=unused-variable]
  Error: Unused module variable ‘iverbose’ which has been explicitly imported at (1) [-Werror=unused-variable]
  make[1]: *** [Makefile:462: test_wind.o] Error 1
danieljprice commented 1 year ago

am going to merge this into #451 so they become one big pull request, then I can fix things from my end

lsiess commented 1 year ago

Makes sense. Thanks!