Hello
I only recently learnt to compile my using a makefile and modules. My problem is that I have to use two systems Linux and Mac.
Now my makefile works a charm on the Linux box: compiles fast and the file is only about 800 kb in size.
When I use the same makefile on my 10.6 MacBook. It takes much longer to compile and creates a massive executable almost 600MB in size. This is insane!!! And I don't know why it occurs.
One thing I noticed is that one of the object files created is also about the same size.
The executable runs but 600MB is a problem. Can anybody shed some advice? I would be immensely grateful.
Compiler: gfortran (from HPC Mac website)
libraries: FFTW3
Here is the makefile
*********************************
OBJS = dis.o \
var.o \
evo.o \
grd.o \
ini.o \
str.o \
ino.o \
gsf.o \
fft.o
FC=gfortran
FFLAGS= -O3 -I"/usr/local/include" -L"/usr/local/lib"
DIS: ${OBJS} Makefile
${FC} -o $@ ${OBJS} ${FFLAGS} -lfftw3
var.mod: var.o var.f
${FC} -c var.f
var.o: var.f
${FC} -c var.f
dis.o: var.mod dis.f
${FC} -c dis.f
evo.o: var.mod evo.f
${FC} -c evo.f
grd.o: var.mod grd.f
${FC} -c grd.f
ini.o: var.mod ini.f
${FC} -c ini.f
str.o: var.mod str.f
${FC} -c str.f
ino.o: var.mod ino.f
${FC} -c ino.f
gsf.o: var.mod gsf.f
${FC} -c gsf.f
fft.o: fft.f
${FC} -c fft.f ${FFLAGS} -lfftw3
clean:
rm -f *.o *~ *.mod
cleanall:
rm -f *.o *~ DIS *.dat fort.* *.prf *.med *.nh *.dis
I only recently learnt to compile my using a makefile and modules. My problem is that I have to use two systems Linux and Mac.
Now my makefile works a charm on the Linux box: compiles fast and the file is only about 800 kb in size.
When I use the same makefile on my 10.6 MacBook. It takes much longer to compile and creates a massive executable almost 600MB in size. This is insane!!! And I don't know why it occurs.
One thing I noticed is that one of the object files created is also about the same size.
The executable runs but 600MB is a problem. Can anybody shed some advice? I would be immensely grateful.
Compiler: gfortran (from HPC Mac website)
libraries: FFTW3
Here is the makefile
*********************************
OBJS = dis.o \
var.o \
evo.o \
grd.o \
ini.o \
str.o \
ino.o \
gsf.o \
fft.o
FC=gfortran
FFLAGS= -O3 -I"/usr/local/include" -L"/usr/local/lib"
DIS: ${OBJS} Makefile
${FC} -o $@ ${OBJS} ${FFLAGS} -lfftw3
var.mod: var.o var.f
${FC} -c var.f
var.o: var.f
${FC} -c var.f
dis.o: var.mod dis.f
${FC} -c dis.f
evo.o: var.mod evo.f
${FC} -c evo.f
grd.o: var.mod grd.f
${FC} -c grd.f
ini.o: var.mod ini.f
${FC} -c ini.f
str.o: var.mod str.f
${FC} -c str.f
ino.o: var.mod ino.f
${FC} -c ino.f
gsf.o: var.mod gsf.f
${FC} -c gsf.f
fft.o: fft.f
${FC} -c fft.f ${FFLAGS} -lfftw3
clean:
rm -f *.o *~ *.mod
cleanall:
rm -f *.o *~ DIS *.dat fort.* *.prf *.med *.nh *.dis