clawpack / classic

Classic single-grid Fortran routines
http://www.clawpack.org
BSD 3-Clause "New" or "Revised" License
11 stars 25 forks source link

Fix a NaN problem #17

Closed certik closed 11 years ago

certik commented 11 years ago

See the commit log. If you apply this patch

diff --git a/tests/advection/main.f90 b/tests/advection/main.f90
index 4f4c7f0..e06bfe1 100644
--- a/tests/advection/main.f90
+++ b/tests/advection/main.f90
@@ -41,8 +41,8 @@ program advection1d

     ! Initialize solver
     call new(solver,clawdata)
-    solver%rp1_ptwise => rp1_advection_ptwise
-!     solver%rp1_vectorized => rp1_advection_vectorized
+!    solver%rp1_ptwise => rp1_advection_ptwise
+    solver%rp1_vectorized => rp1_advection_vectorized
     solver%rp_data = c_loc(rp_aux)

     ! Start output loop

Then I am not getting any NaN in the file fort.q0010.

@mandli, can you have a look?

mandli commented 11 years ago

Huh, how was that breaking? Was the associate statement incorrect?

certik commented 11 years ago

I don't know, I just noticed something fishy with it. Can you verify that this fixes it for you as well?

It would be very nice to exactly understand what was going on, i.e. whether this was a bug in gfortran? If so, we should report it. If not, then what it was.