- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
I set up the Redhat Enterprise Linux 4.0 and intel fortran complier 9.0.
I also beginer for Fortran based on Linux. After installing intel fortran complier, I add this command (source /opt/intel/fc/9.0/bin/ifortvars.sh) at /root/.bash_profile. This is correct or not? I donot know the difference of directorys between fc and fce. Do you know which is better?
I wonder why object files are not made, but I think complie is already done.
This is message after compling makefile for my code.
---------------------------------------------
ifort -c -O3 -tpp7 -Vaxlib -ip precision.f90
ifort -c -O3 -tpp7 -Vaxlib -ip global.f90
ifort -c -O3 -tpp7 -Vaxlib -ip global_param.f90
ifort -c -O3 -tpp7 -Vaxlib -ip global_app.f90
ifort -c -O3 -tpp7 -Vaxlib -ip main.f90
ifort -c -O3 -tpp7 -Vaxlib -ip init.f90
ifort -O3 -tpp7 -Vaxlib -ip -o sms precision.o global.o global_param.o global_app.o main.o init.o
mv ./sms ..
---------------------------------------------
However, I cannot find these files (sms precision.o global.o global_param.o global_app.o main.o init.o). I do not know what I do to solve my problem.
This is my makefile for complie.
Thanks.
----------------------------------------------
SRC = .
EXE = sms
SHELL = /opt/intel/fc/9.0/bin/ifortvars.csh ---> if the line is blanking, the make error
F90 = ifort
F90FLAGS = -O3 -tpp7 -Vaxlib -ip
LIBS =
.SUFFIXES:
.SUFFIXES: .f90 .o
.SUFFIXES: .f .o
.f.o:
$(F90) -c $(F90FLAGS) $
.f90.o:
$(F90) -c $(F90FLAGS) $
gt_les: $(EXE)
@echo ''
@echo $(EXE) program is now up to date.
@echo ''
MODS = precision.o global.o global_param.o global_app.o
precision.o: precision.f90
global.o: global.f90 precision.o
global_param.o: global_param.f90 precision.o
global_app.o: global_app.f90 precision.o
main.o: main.f90 global.o global_param.o
init.o: init.f90 global.o global_param.o global_app.o
OBJS =
main.o
init.o
$(EXE): $(MODS) $(OBJS)
$(F90) $(F90FLAGS) -o $@ $(MODS) $(OBJS) $(LIBS)
mv ./$(EXE) ..
# Type: make clean
# to remove executables, core files, object files, et cetera
clean:
rm -f $(EXE) *.o *.mod
cleano:
rm -f *.o *.mod
restart:
rm -f solu
rm -f conver
rm -f filestat
rm -f perf_monitor
rm -f history
cp -f filestat-restart filestat
andclean:
rm -f debug $(EXE) *.o
rm -f solu
rm -f time_history
rm -f conver
rm -f filestat
archive:
tar cvf $(EXE)_`date +%Y_%m_%d_%H%M`.tar
./util/*.f90
$(SRC)
filestat
ind3dmg.dat
makefile
gzip $(EXE)*.tar
I set up the Redhat Enterprise Linux 4.0 and intel fortran complier 9.0.
I also beginer for Fortran based on Linux. After installing intel fortran complier, I add this command (source /opt/intel/fc/9.0/bin/ifortvars.sh) at /root/.bash_profile. This is correct or not? I donot know the difference of directorys between fc and fce. Do you know which is better?
I wonder why object files are not made, but I think complie is already done.
This is message after compling makefile for my code.
---------------------------------------------
ifort -c -O3 -tpp7 -Vaxlib -ip precision.f90
ifort -c -O3 -tpp7 -Vaxlib -ip global.f90
ifort -c -O3 -tpp7 -Vaxlib -ip global_param.f90
ifort -c -O3 -tpp7 -Vaxlib -ip global_app.f90
ifort -c -O3 -tpp7 -Vaxlib -ip main.f90
ifort -c -O3 -tpp7 -Vaxlib -ip init.f90
ifort -O3 -tpp7 -Vaxlib -ip -o sms precision.o global.o global_param.o global_app.o main.o init.o
mv ./sms ..
---------------------------------------------
However, I cannot find these files (sms precision.o global.o global_param.o global_app.o main.o init.o). I do not know what I do to solve my problem.
This is my makefile for complie.
Thanks.
----------------------------------------------
SRC = .
EXE = sms
SHELL = /opt/intel/fc/9.0/bin/ifortvars.csh ---> if the line is blanking, the make error
F90 = ifort
F90FLAGS = -O3 -tpp7 -Vaxlib -ip
LIBS =
.SUFFIXES:
.SUFFIXES: .f90 .o
.SUFFIXES: .f .o
.f.o:
$(F90) -c $(F90FLAGS) $
.f90.o:
$(F90) -c $(F90FLAGS) $
gt_les: $(EXE)
@echo ''
@echo $(EXE) program is now up to date.
@echo ''
MODS = precision.o global.o global_param.o global_app.o
precision.o: precision.f90
global.o: global.f90 precision.o
global_param.o: global_param.f90 precision.o
global_app.o: global_app.f90 precision.o
main.o: main.f90 global.o global_param.o
init.o: init.f90 global.o global_param.o global_app.o
OBJS =
main.o
init.o
$(EXE): $(MODS) $(OBJS)
$(F90) $(F90FLAGS) -o $@ $(MODS) $(OBJS) $(LIBS)
mv ./$(EXE) ..
# Type: make clean
# to remove executables, core files, object files, et cetera
clean:
rm -f $(EXE) *.o *.mod
cleano:
rm -f *.o *.mod
restart:
rm -f solu
rm -f conver
rm -f filestat
rm -f perf_monitor
rm -f history
cp -f filestat-restart filestat
andclean:
rm -f debug $(EXE) *.o
rm -f solu
rm -f time_history
rm -f conver
rm -f filestat
archive:
tar cvf $(EXE)_`date +%Y_%m_%d_%H%M`.tar
./util/*.f90
$(SRC)
filestat
ind3dmg.dat
makefile
gzip $(EXE)*.tar
Message Edited by gtg330c on 05-08-200609:01 PM
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regarding the difference between fc and fce. Neither is "better". fc is the 32-bit compiler and fce is the 64-bit "Intel EM64T" compiler. If you are using an "x86_64" install of Linux on an Intel EM64T-based or AMD64-based system, then the fce directory would be the one to use.
I can't explain why the .o files are not found. If you run the commands you show manually, what happens?
I can't explain why the .o files are not found. If you run the commands you show manually, what happens?

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