Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26758 Discussions

Aspen User Kinetic Subroutine with Intel fortran compiler - Fortran divide by zero error

ayyappan__lakshmanan
475 Views

Hello Everyone ,

I am currently working on implementing the kinetic reactions in Aspen plus for reactive distillation through user kinetic subroutine with Fortran Compiler 2017 and VS 14/2015 . After writing the code , compilation and linking the subroutine with ASPLINK procedure . During running the simulations in Aspen , I am encountering Severe error  - Fortran divide by zero encountered. Severe error - Fortran invalid operations encountered . I am doubtful if this is due to error in linking of the subroutine or error due to parameters not passing from Aspen to Fortran (due to coding errors)  .

Please can some one help me with this . Looking forward to hear from you.

With Regards,

Lakshmanan

 

 

0 Kudos
2 Replies
Steve_Lionel
Black Belt Retired Employee
475 Views

Nobody here would be able to help with this given that we have no idea what your subroutine is doing. You will have to debug it - you can use the debugger or can add print statements to examine intermediate computations. Typically a zerodivide would result in a NaN - if you have compiled the Fortran code with the /fpe0 option, it might get a zerodivide on division by zero, But either way, division by zero is usually not intentional.

JohnNichols
Valued Contributor II
475 Views

add print statements to examine intermediate computations

This is a common feature in developing new code -- the print statements are usually the fastest way 

Trust me I do it a lot. 

Reply