1

I am again struggling to find mistakes in my code with visual studio under windows. Now an assignment of an unallocated allocatable variable to another variable was messing up all my code and visual studio never detected the error. I lost 2 days to find it. What tool can I use that can catch errors like this? I see there are many alternative for Valgrind for Windows ( Is there a good Valgrind substitute for Windows? ), which one would you suggest for these kinda problems? thanks.

Community
  • 1
  • 1
Millemila
  • 1,612
  • 4
  • 24
  • 45

1 Answers1

2

When debugging or testing, compile and run with the appropriate error checking and diagnostic options (in the project properties under Fortran > Diagnostics set Compile Time Diagnostics to "Show All (/warn:all)" and under Fortran > "Run-time" set Runtime Error Checking to "All (/check:all)".

As an observation only - the Intel Fortran compiler is sometimes sold in a bundle with another Intel product (Inspector XE) that allows more intensive memory and concurrency correctness checking. The runtime mode of this has similar capabilities to valgrind.

IanH
  • 21,026
  • 2
  • 37
  • 59
  • it was already /check:all . I will recreate the mistake in the code and I ll see if Inspector XE finds it. i let you know. – Millemila Feb 06 '14 at 13:55