LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   unrecognized command line option ‘-r8’ (https://www.linuxquestions.org/questions/linux-newbie-8/unrecognized-command-line-option-%91-r8%92-4175463774/)

sryzdn 05-28-2013 10:21 AM

unrecognized command line option ‘-r8’
 
Hi,

I am installing a package. I have received the following error:

gfortran -c -O0 -r8 dlamch.f
gfortran: error: unrecognized command line option ‘-r8’
make[2]: *** [dlamch.o] Error 1
make[2]: Leaving directory `/home/sara/Packages/opium-v3.7-src/src/lapack'
make[1]: *** [all-subdirs] Error 1
make[1]: Leaving directory `/home/sara/Packages/opium-v3.7-src/src'
make: *** [all] Error 2


what does the option '-r8' stand for?

suicidaleggroll 05-28-2013 10:23 AM

Normally in fortran, setting up a variable as "real" makes it a 32-bit float, while "double precision" or "real*8" makes it a 64-bit float.

-r8 is a flag used by many compilers to force both "real" and "real*8" variables to be 64-bit floats. gfortran has this option too, but the flag is called "-fdefault-real-8" instead. It may also promote "double precision" variables to 128-bit, if possible on your system.

sryzdn 05-28-2013 10:33 AM

Quote:

Originally Posted by suicidaleggroll (Post 4960603)
Normally in fortran, setting up a variable as "real" makes it a 32-bit float, while "double precision" or "real*8" makes it a 64-bit float.

-r8 is a flag used by many compilers to force both "real" and "real*8" variables to be 64-bit floats. gfortran has this option too, but the flag is called "-fdefault-real-8" instead. It may also promote "double precision" variables to 128-bit, if possible on your system.

Thanks, what should I change to get rid of the error?

suicidaleggroll 05-28-2013 10:37 AM

Change -r8 to -fdefault-real-8

sryzdn 05-28-2013 10:48 AM

Quote:

Originally Posted by suicidaleggroll (Post 4960617)
Change -r8 to -fdefault-real-8

Thanks again. I have searched to alter -r8 with -fdefault-real-8 in the make file and in dlamch.f in lapack directory, but didn't find anything. Am I on the wrong track? Could you let me know where I should make this change?

suicidaleggroll 05-28-2013 10:54 AM

It should be in the makefile, probably the one in the lapack directory.

sryzdn 05-28-2013 11:15 AM

Quote:

Originally Posted by suicidaleggroll (Post 4960624)
It should be in the makefile, probably the one in the lapack directory.

This is the make file in lapack directory:

SHELL=/bin/sh
Quote:

include ../../makevars

objects = dbdsqr.o dcopy.o ddot.o dgebd2.o dgebrd.o dgelq2.o dgelqf.o dgemm.o dgemv.o dgeqr2.o dgeqrf.o dger.o dgesvd.o dlabrd.o dlacpy.o dlamch.o dlange.o dlapy2.o dlarf.o dlarfb.o dlarfg.o dlarft.o dlartg.o dlas2.o dlascl.o dlaset.o dlasq1.o dlasq2.o dlasq3.o dlasq4.o dlasq5.o dlasq6.o dlasr.o dlasrt.o dlassq.o dlasv2.o dlauu2.o dlauum.o dnrm2.o dorg2r.o dorgbr.o dorgl2.o dorglq.o dorgqr.o dorm2r.o dormbr.o dorml2.o dormlq.o dormqr.o dpotf2.o dpotrf.o dpotri.o drot.o dscal.o dswap.o dsyrk.o dtrmm.o dtrmv.o dtrsm.o dtrti2.o dtrtri.o ieeeck.o ilaenv.o xerbla.o lsame.o dgesv.o dgetf2.o dgetrf.o dgetrs.o dlaswp.o idamax.o

all_objects = $(objects)

this_dir = lapack

all: $(all_objects)
-rm -f objects
for i in $(all_objects); do echo $(this_dir)/$$i >> objects; done

clean:
rm -f $(objects) opium_lapack.a core* *~ objects
"Makefile" 21L, 936C
I can not find '-r8' anywhere !!!

sryzdn 05-28-2013 11:23 AM

Just found it, thanks for very useful help.


All times are GMT -5. The time now is 10:12 PM.