Mohid icon indicating copy to clipboard operation
Mohid copied to clipboard

Correct type inconsistencies and stop using archaic intrinsic functions

Open RBCanelas opened this issue 5 years ago • 0 comments

Compiling Base1 & Base2 with GNU Fortran (GFortran) with naive compiler flags renders a list of errors related to type mismatches. Example:

ModuleFunctions.F90:6230:25: aux1 = dmod (aux, DTD) 1 Error: 'a' argument of 'dmod' intrinsic at (1) must be double precision

ModuleFunctions.F90:6231:33: MinError = min (dabs(aux1), dabs(DTD - aux1)) 1 Error: 'a' argument of 'dabs' intrinsic at (1) must be double precision

These are related to the use of dabs and dmod, that shouldn't be used (using abs and mod is enough).

ModuleVoronoi3D.f:71:72: * ipnti,iflpi,iarti,irani,ireci,iredi,nw,nt,icon,is) 1 Error: Type mismatch in argument 'x' at (1); passed REAL(8) to REAL(16)

ModuleVoronoi3D is laden with these issues. More might show elsewhere once these get corrected.

iFort and compilation flags for GFortran might work with this, but the outcome is typically a wildcard and might produce unstable results. This might be the reason GFort compiles but then execution throws segfaults.

RBCanelas avatar Feb 01 '19 11:02 RBCanelas