- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I write three program, one main program pro1.f90,two subroutine pro2.f90 pro3.f90. then I use makefile tocompile it.The following is my makefile
================================
FC = ifort
OP = -O3
LIB = -L/opt/intel/mkl/8.1/lib/em64t -lmkl -lmkl_lapack -lguide -lpthread
a.out : pro1.f.f90 pro2.o pro3.o
$(FC) $(OP) -o a.out pro1.f90 pro2.o pro3.o $(LIB)
pro2.o : pro2.f
$(FC) $(OP) -c pro2.f90 $(LIB)
pro3.o : pro3.f
$(FC) $(OP) -c pro3.f90 $(LIB)
clean :
rm *.o
==========================================================
After compiling,I excute ./a.out and get such error:
====================================================
n= 100 particleN 1 L= 0 parL= 5
n= 100 L= 5 parL= 5
end of Pl(theta)
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
libifcore.so.5 0000002A959C45FC Unknown Unknown Unknown
libpthread.so.0 000000373870C4F0 Unknown Unknown Unknown
libifcore.so.5 0000002A959C45D5 Unknown Unknown Unknown
libpthread.so.0 000000373870C4F0 Unknown Unknown Unknown
============================================================
If I past the program pro2.f90 after the pro1.f90 in the same file,and compiler
ifort O3 -L/opt/intel/mkl/8.1/lib/em64t -lmkl -lmkl_lapack -lguide lpthread pro1.f90 pro3.o
it give me the correct answer.
For this reason, my progam should be right. Is there some problem with my compiler setting or makefile? Thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page