sangamesh

openf90-4.2.2: Segfaults, but with ifort the program runs well

Discussion created by sangamesh on May 7, 2009
Latest reply on Jun 17, 2009 by dgilmore
A fortran program runs well with ifort, but segfaults with openf90

Hi,

  On an AMD processor (dual core, dual processor) on Cent OS Linux 5 (Rocks 5), with x86 open64-4.2.2, the fortran program compiles fine but fails to run with the error "Segmentation Fault". But it works well with Intel Fortran compiler.



# make -f makefile 
openf90 -c -O3 MAIN.f
openf90 -c -O3 coef.f
openf90 -c -O3 initial_conditions.f
openf90 -c -O3 collide.f
openf90 -c -O3 interpolate.f
openf90 -c -O3 boundary_update.f
openf90 -c -O3 int_boundary_update.f
openf90 -c -O3 write_binary.f
openf90 -c -O3 read_binary.f
openf90 -c -O3 plotter.f
opencc -c -O3 test_for_nan.c
openf90 -O3 MAIN.o coef.o initial_conditions.o collide.o interpolate.o boundary_update.o int_boundary_update.o write_binary.o read_binary.o plotter.o test_for_nan.o -o a.out -lm
# ./a.out 
 Re = 140.
 Tau = 0.585714281
 Program Begins.....
Segmentation fault
#
 

The makefile is:

# cat makefile 
FLAGS = -O3 
MP_FLAGS = -lm
OBJECTS = MAIN.o coef.o initial_conditions.o collide.o interpolate.o boundary_update.o int_boundary_update.o write_binary.o read_binary.o plotter.o test_for_nan.o
a.out: $(OBJECTS)
  openf90 $(FLAGS) $(OBJECTS) -o $@ $(MP_FLAGS)
.f.o: header array_sizes $@ 
  openf90 -c $(FLAGS) $<
.c.o: $@
  opencc -c $(FLAGS) $<

cleanall:
  -rm *.o
  -rm *.dat
  -rm *.bin
  -rm a.out

What's the wrong here? and how to resolve it?

Outcomes