Fortran vs C - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Fortran vs C (/thread-16589.html) |
Fortran vs C - mistert - Mar-06-2019 Hi everybody and thanks for reading! My problem is the following. I have a Python program that, starting from a state machine (specified in a graphical language), automatically translate it in C-code OR Fortran-code. I compared the two generated codes statically, by code inspection. Now, I would like to compare the equivalence of the two generated codes by comparing the output of their execution, state-by-state. It means that I want to provide the same input to the C-application and to the Fortran-application and then compare the output at each state of the state machine, during its execution. To this aim, I was wondering if it is possible to embed in some way the C-code in the Fortran-code or viceversa, so to have one application that contains both codes and when I provide an input I get the output of both of them at the same run. Is this idea feasable? Any comments and/or suggestions are welcome. Thanks in advance! RE: Fortran vs C - DeaD_EyE - Mar-06-2019 I guess you would like to complie, generate Test-Data, getting the output and execution time for both sources in one shoot?
This could even done with a shell script. You should not put the c or frotran source code into your script. RE: Fortran vs C - mistert - Mar-07-2019 Thank you very much! I'm gonna try and let you know... |