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

Floating invalid when "dble"ing a real function

abenson
Beginner
829 Views
I just switched from v9.1 of ifort to v10 (specifically 10.0.025) and found that a code that has, for a long time, run just fine when compiled with v9.1 crashed when compiled with v10. I was getting a floating invalid error in a simple line which summed various quantities. The line in question was:

mcold_tot=mcold_tot+dble(Galaxy_Cold_Mass(This_Galaxy))

where Galaxy_Cold_Mass() is a real function which simply sums a couple of the elements of the derived type variable This_Galaxy.

If I switch (in this line and similar lines) to doing:

Cold_Mass=Galaxy_Cold_Mass(This_Galaxy)
mcold_tot=mcold_tot+dble(Cold_Mass)

where Cold_Mass is a real, then it works just fine again.

My question is, is putting a real valued function inside of a dble() invalid Fortran, or could this be a bug in the compiler?

I can post more information if needed.

Thanks for any help you can offer!
-Andrew

-----

Intel Fortran Compiler for applications running on Intel 64, Version 10.0 Build 20070613 Package ID: l_fc_c_10.0.025
Copyright (C) 1985-2007 Intel Corporation. All rights reserved.

x86_64 GNU/Linux

Kernel: 2.6.9-55.ELsmp

Red Hat Enterprise Linux 4

gcc version 3.4.6 20060404 (Red Hat 3.4.6-8)




0 Kudos
4 Replies
Steven_L_Intel1
Employee
829 Views
No, that's a valid use. What is the declaration of Galaxy_Cold_Mass in the caller and in the routine itself?
0 Kudos
abenson
Beginner
829 Views
Galaxy_Cold_Mass() is as follows:

pure real function Galaxy_Cold_Mass(This_Galaxy)
!% Return the total cold mass of the specified galaxy.
implicit none
type (Galaxy), pointer :: This_Galaxy

Galaxy_Cold_Mass=This_Galaxy%mcold+This_Galaxy%mcold_ongoing_bursts
end function Galaxy_Cold_Mass

It's defined within a module, so is made available to the caller via a "use" statement.

Thanks!
-Andrew.
0 Kudos
Steven_L_Intel1
Employee
829 Views
In that case, please submit an issue to Intel Premier Support and attach a complete test case.
0 Kudos
abenson
Beginner
829 Views
OK - if I can find a self-contained test case that reproduces this I'll submit an issue.

Thanks,
Andrew.
0 Kudos
Reply