- #1
saleemhasan
- 9
- 0
Hello,
I must start by stating that I know almost nothing about fortran. I am trying to help port a fortran program to linux. It compiles and runs fine on irix (64 bit sgi origin 2000). There are two make files and both of them give padding warnings.
---------
Padding of 4 bytes required before `eln' in common block `option' at (^) -- consider reordering members, largest-type-size first
---------
I searched the Internet and found that in order to improve performance and to minimize the number of cpu fetches, padding is needed if variables are not stored from the largest type-size to the smallest. Since the program is very large, it is not possible to re-arrange the order of the variables from large to small in the COMMON blocks. I found a couple of options (for different compilers) that align (pad) the storage however, none of these options worked on my compilers. I tried these options on a Centos 5.9 linux and a Redhat EL 5 machine.
I entered the align option in the make file.
maindpx.exe: maindpx.o exerfc.o saxbi.o tred2.o cavxcor.o diagovlp.o
f77 -o32 -falign-commons -o maindpx.exe maindpx.o exerfc.o saxbi.o tred2.o cavxcor.o diagovlp.o
maindpx.o: maindpx.f
f77 -o32 -c maindpx.f
exerfc.o: exerfc.f
f77 -o32 -c exerfc.f
.....
....
I tried -falign-commons from a gnu fortran compiler site
I also tried -fno-align-commons to prevent the compiler from padding but there was no change. I got the same warnings. I tried a couple of other versions of the same option such as -aligncommon[=4 or 8] but that did not help.
Is it that I am entering the option on the wrong line?
Thank you very much in advance for your help.
Saleem
I must start by stating that I know almost nothing about fortran. I am trying to help port a fortran program to linux. It compiles and runs fine on irix (64 bit sgi origin 2000). There are two make files and both of them give padding warnings.
---------
Padding of 4 bytes required before `eln' in common block `option' at (^) -- consider reordering members, largest-type-size first
---------
I searched the Internet and found that in order to improve performance and to minimize the number of cpu fetches, padding is needed if variables are not stored from the largest type-size to the smallest. Since the program is very large, it is not possible to re-arrange the order of the variables from large to small in the COMMON blocks. I found a couple of options (for different compilers) that align (pad) the storage however, none of these options worked on my compilers. I tried these options on a Centos 5.9 linux and a Redhat EL 5 machine.
I entered the align option in the make file.
maindpx.exe: maindpx.o exerfc.o saxbi.o tred2.o cavxcor.o diagovlp.o
f77 -o32 -falign-commons -o maindpx.exe maindpx.o exerfc.o saxbi.o tred2.o cavxcor.o diagovlp.o
maindpx.o: maindpx.f
f77 -o32 -c maindpx.f
exerfc.o: exerfc.f
f77 -o32 -c exerfc.f
.....
....
I tried -falign-commons from a gnu fortran compiler site
I also tried -fno-align-commons to prevent the compiler from padding but there was no change. I got the same warnings. I tried a couple of other versions of the same option such as -aligncommon[=4 or 8] but that did not help.
Is it that I am entering the option on the wrong line?
Thank you very much in advance for your help.
Saleem