- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am developing an application using smarteiffel (compiled with and using icc) acessing some fortran routines (compiled with ifort). I have found a numerical multidimensional function integrator written in C (800 lines of code). My first thought is to translate manually the integrator to fortran in order to obtain better performance (for me, this is critical). Before start doing this, which will require a big effort, I would like to ask some opinion about this decision. Is it worth translating to fortran or not ?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My personal opinion is that if you have working code, it's almost never a good idea to translate it. Write the application using the C code, mixing Fortran and C is easy. Then analyze the performance with Intel VTune or some other performance analyzer and see where the program is spending most of its time. If some of the C code seems to be an issue, you can try rewriting it, but the results may not be worth the effort.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You don't give much information. If it is potentially vectorizable code, and you have rules against the changes in C code which might be required to make it run well, but no rules against efficient Fortran, you may wish to consider the translation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mixed programming is a burden, but sometimes it is worth the effort.
Another option for you is to simply find a multidimensional integrator in Fortran. Try GAMS and Netlib.
Another option for you is to simply find a multidimensional integrator in Fortran. Try GAMS and Netlib.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page