Marlon
Marlon

Reputation: 1

inability to compile fortran 90 codes

I am using a bash shell on my Mac OS X. I have fortran95 compiler installed in /sw/bin/gfortran. every time I attempt to access the compiler, I receive the error:

"Segmentation fault: 11". I cannot call any programs the regular way i.e. "gfortran program.f90 -o executable_name "

I am not sure about the problem. Even simple programs which print "hello world" to screen will not work.

Upvotes: 0

Views: 86

Answers (1)

Wes
Wes

Reputation: 1840

May be a problem with your installation as already mentioned. A couple things I would try:

  1. Make sure the shared libraries it is compiled against are being found:

    otool -L /sw/bin/gfortran

  2. Compile with some switches that might give you more helpful info. I found using the backtrace option really helps especially to debug seg. faults. You might try to compile with some options such as:

    gfortran -g -fbounds-check -Wall -fbacktrace program.f90

Upvotes: 0

Related Questions