- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As some of my recent posts indicate, I am porting a system of g77 applications to Intel Fortran (about 30-40 programs). These apps were previously ported from Alpha OpenVMS.
The original "porter" had to make many low-level tweaks to existing and new low-level C code. At the moment, all code compiles and links under Intel Fortran (after some small changes), and a few high-level apps execute successfully. But for some applications, segfaults, loops, hangs, etc., seem to occur in the lowest-level code, e.g., raw terminal input.
My general question: Are there potential advantages in using Intel C/C++ for the low-level C code than gnu C? I know that there is no way to answer this definitively for every case, but have developers found this to be advisable?
Jay
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel Fortran for Linux can be mixed with code compiled by either Intel C++ or GNU C/C++ (or a mix of all three if you are so inclined.) Intel C++ typically provides better performance and has advanced parallelism features.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So no particular advantage in terms of compatibility, e.g., when passing arguments from Fortran to low-level C functions? I'm thinking not, i.e., you still have the same fundamental language issues to resolve, e.g., pass-by-reference vs. pass-by-value. But in case my managers ask: "Would these interfaces be easier if you used Intel C?", I think the answer is no -- Intel C/C++ would be chosen for performance and parallelism.
Thanks,
Jay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's difficult to make a definitive statement about choice between gcc and icc.
Software vendors I've worked with don't require the performance features of current gcc or icc and are satisfied with the gcc supplied with even the oldest linux distros. Also, when using open source MPI, it may be easier to deal with the combination of ifort and gcc than to get icpc involved. Some of the past difficulties with icc have gone away with the more recent system of keeping ifort and icc versions in lock step. You will still have trouble if you don't update them together.
Intel comparisons usually assume the oldest available version of gcc (vs. the latest icc), in part because you take on some responsibility yourself for maintaining gcc when you update. Another reason is that Intel personnel may be familiar with the idiosyncracies of icc vectorization but not the corresponding ones of gcc.
The Intel OpenMP library for linux handles all the OpenMP calls from gcc, so there's no problem with using gcc together with ifort OpenMP as long as you take care not to link libgomp in addition to (or in place of) libiomp5. On linux, icc and gcc are sufficiently interoperable that you can mix them effectively.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There's no difference in call compatibility between Intel C++ and gcc. I do recommend using the C Interoperability features of Fortran 2003, supported by Intel Fortran, for the best result. Your choice of C/C++ compilers is independent of Fortran. Intel C++ will tend to give you the best performance overall, but from Fortran's perspective they are interchangeable.

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