Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29487 Discussions

old 32-bit compiler vs 64-bit compiler trouble - array values

Diemer__Jacob
Beginner
1,178 Views

Hello, A program is seg faulting due to Common array values not being constant through subroutines.  This did not occur on our old 32-bit machine, but it has appeared in our new 64-bit machine.  

Old machine is running Intel(R) Fortran Compiler for 32-bit applications, Version 8.1.  New machine is running Intel(R) Fortran 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.0.090.

The same include files which initialize the array are found in both .f but the values are not constant though the program in the new machine like the old one.

Statements in the include file dealing with my array

      PARAMETER (N_I = 256)    !Number of integer constants

      COMMON/XXPERF/ PD(N_P),PN,RC(N_R),RN,IC(N_I),IN,
     *COMB,VHEAT,PSIN,PSIL,HPARAM



Value differences from subroutines.  The array values from the subroutine is populated are in the range of 0-460 and the values from the "corruption" array are in the millions+


ifort compiler flags that are used
FLAG_F = -g -assume nounderscore -assume no2underscores -lsvml -c -save -zero -warn nousage -132

If you would like snippets of the code I can display them, but this is very large program that does a lot of calculations for us and I don't know where to start with posting the code.  Any suggestions would be great.  Let me know what you want/need to help you

Note: I am not a Fortran programmer, but can read/debug code well.

0 Kudos
2 Replies
mecej4
Honored Contributor III
1,178 Views

Apart from alignment of common block variables, there should be no difference between 32-bit and 64-bit data layout, since all default integers are still 4-bytes with IFort-64 default flags and REAL is also 4-bytes.

Easy "can't hurt" type of check: Compile and using the 32-bit version of IFort-15.0, and compare to the results from the old compiler.

Posting package: upload a zip of all the sources+data files to a cloud service such as Dropbox, make the files accessible to all, and post a link. Or, if the zip is a few megabytes long, post here as an attachment.

0 Kudos
Diemer__Jacob
Beginner
1,178 Views

Thank you for the responce, I found out the problem with with a flag in one of the different Makefiles because this program using many different programs together.

Problem solved, user error.

0 Kudos
Reply