Related articles |
---|
RE: Performance constraints in translating Fortran 90 programs to C naveens@noida.hcltech.com (Naveen Sharma, Noida) (2003-01-04) |
From: | "Naveen Sharma, Noida" <naveens@noida.hcltech.com> |
Newsgroups: | comp.compilers |
Date: | 4 Jan 2003 22:42:50 -0500 |
Organization: | Compilers Central |
Keywords: | C, Fortran, translator, performance |
Posted-Date: | 04 Jan 2003 22:42:50 EST |
Hi,
> What will be the performance problems/constraints
> in translating fortran programs to C and then
> compiling it using a C compiler. Consider that the
> translator does a fairly good job.
> I referred to a similar question in comp.compilers
> earlier with subject
> "Pros and cons of high-level intermediate languages"
> can someone show me other disadvantages when
> translating a language like fortran 90 to C especially
> with respect to Performance.
Well, there are several issues.
1. The most important one is translation of Fortran-90/95 array syntax into
efficient C.
F90 array statements would be internally converted into C loops.
so you would like to reduce number of loops.
In the most simple cases you would need to combine the array
loops in F90, combine with do loops etc.
2. Temporary Arrays. You will need a lot of temporary arrays
while generating C code. Copying to and fro from these will
effect performance.
3. Masked assignments, present another potential problem area.
4. Fortran 90 intrinsic functions can be very tricky. Your algorithms
should be as good as hand coded functions for atleast the most
common cases.
> We intended to use this compiler in a high
> performance computing environment.
Some optimizations may be done depending your HPC environment.
Normally, these should have some sort of ability to handle vector data
and using it effectively presents a good challenge.
Best Regards,
Naveen Sharma.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.