#1591: Simfactory: add -Wall and '-warn all' options to warning flags for intel compilers -------------------------+-------------------------------------------------- Reporter: bmundim | Owner: eschnett Type: defect | Status: new Priority: major | Milestone: Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by bmundim):
Hi Roland,
here it is a sample of the error message:
{{{ /home/astro/mundim/tmp/einstein_test/Cactus/arrangements/EinsteinEvolve/GRHydro/src/GRHydro_Wrappers.F90(252): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic. [DDENS] call prim2conM(handle, gxx, gxy, gxz, gyy, gyz, gzz, sdetg, dens,& -------^ }}} the same error message applies for the following variables: [DSX], [DSY], [DSZ], [DTAU], [DBCONSX], [DBCONSY], [DBCONSZ], [DRHO], [DVELX], [DVELY], [DVELZ], [DEPS], [DPRESS],[DBVCX], [DBVCY], [DBVCZ].
One example of how not checking the argument passing might lead to a problem can be seen in this simple example from the site I mentioned above. Consider the following piece of code:
{{{ real a(10) call sub(a(3)) ... subroutine sub (b) real b(8) }}}
if we declare b to be 'real b(10)' for example it might lead to problems when you try to access memory location associated with the elements b(9) and b(10). The compiler might or not detect this error. In case of the intel compiler it does detect this error if we set '-warn interfaces' or '-warn all' options.