gfortran

How to install libgfortran.so.4 on ubuntu 16.06

限于喜欢 提交于 2019-12-22 04:46:26
问题 An app I use just updated and it no longer runs on my system. When I try to run the application I get the error: error while loading shared libraries: libgfortran.so.4: cannot open shared object file: No such file or directory I looked on my system and only libgfortran.so.3 is available. Do you know what should I do to have the next version also? Which package should I install? (my system is ubuntu 16.04) 回答1: This is an inverse problem to R v3.4.0-2 unable to find libgfortran.so.3 on Arch So

IEEE_UNDERFLOW_FLAG IEEE_DENORMAL in Fortran 77

一世执手 提交于 2019-12-21 17:48:07
问题 I am new to Fortran and coding in general so I apologize if my terminology is not correct. I am using a Linux machine with the gfortran compiler. I am doing research this summer which involves me getting a program written in about 1980 working again. It is written in Fortran 77. I have all the code as well as some documentation about it. In its current form it I am receiving a "IEEE_UNDERFLOW_FLAG IEEE_DENORMAL" error. My first thought is that this code was meant to be developed under a

How to create a makefile for a Fortran program using modules

删除回忆录丶 提交于 2019-12-21 06:22:50
问题 The challenge is to create a makefile which takes a list of modules and does not require me to sort out precendence. For example, the modules are mod allocations.f08 mod precision definitions.f08 mod unit values.f08 mod blocks.f08 mod shared.f08 mod parameters.f08 mod timers.f08 The main program is characterize.f08 . The error message is Fatal Error: Can't open module file ‘mprecisiondefinitions.mod’ for reading at (1): No such file or directory The first statement in the main program is use

Shared library in Fortran, minimal example does not work

拈花ヽ惹草 提交于 2019-12-20 10:44:08
问题 I am trying to understand how to dynamically create and link a shared library in Fortran under Linux. I have two files: The first one, liblol.f90 , looks like this: subroutine func() print*, 'lol!' end subroutine func I compile it with gfortran -shared -fPIC -o liblol.so liblol.f90 The second file, main.f90 , looks like this: program main call func() end program main When I now try to compile that with the command gfortran -L. -llol main.f90 -o main , I get the following error: /tmp/ccIUIhcE

How to compile distributable Fortran binaries on Mac OS X Mountain Lion?

别说谁变了你拦得住时间么 提交于 2019-12-20 09:41:05
问题 Since Apple have stopped distributing gfortran with Xcode, how should I compile architecture independent Fortran code? I have Mac OS X Mountain Lion (10.8), and XCode 4.4 installed, with the Command Line Tools package installed. Apple's Native Compilers As far as I can tell, the Xcode C / C++ / ObjC compilers use a fork of the GNU compiler collection, with llvm as a backend; the latter I figure enables compiling and optimising "universal" binaries, for both Intel and PPC architectures. 3rd

Gfortran complex actual to real dummy argument

左心房为你撑大大i 提交于 2019-12-20 04:27:10
问题 I am trying to use fftpack with gfortran, but I am getting errors that i think relate to that some routines are passed complex arrays when the dummy argument is declared as real. I read a comment on an intel fortran page that one could disable " check routine interface ". Does anyone know if there is a similar option for gfortran? I would like to not have to edit the fftpack... ( i guess this is because complex in memory is represented by two reals and the array arguments are passed as

Floating-point exceptions are signalling in new gfortran version

僤鯓⒐⒋嵵緔 提交于 2019-12-20 04:07:09
问题 I am currently working to debug a subroutine of some software that my boss has written back in the 90s. There seems to be a floating-point exception that occurs in a do loop of a particular subroutine: 16 irad=1,incmax rr1=rr2 rr2=rr2+rdiv if(rr1.gt.rlimit) goto 16 if(pts(irad).gt.0.0) then discrm=(rmsden(mt,irad)/pts(irad)) 1 -((average(mt,irad)**2)/(pts(irad)**2)) else discrm=0.0 endif if(discrm.ge.0.0) then rmsden(mt,irad)=sqrt(discrm) else rmsden(mt,irad)=0.0 endif average(mt,irad)

Unclassifiable statement and other errors in an IF in Fortran

你。 提交于 2019-12-20 03:52:19
问题 I have the code: if i < n then x = topsep(1) y = topsep(2) realvor(n,1) = x + dx realvor(n,2) = x + dy imvor(n,1) = (realvor(n,1)*(a**2))/((realvor(n,1))**2+(realvor(n,2))**2) imvor(n,2) = (realvor(n,2)*(a**2))/((realvor(n,1))**2+(realvor(n,2))**2) tf = .TRUE. else x = botsep(1) y = botsep(2) realvor(n,1) = x + dx realvor(n,2) = y - dy imvor(n,1) = (realvor(n,1)*(a**2))/((realvor(n,1))**2+(realvor(n,2))**2) imvor(n,2) = (realvor(n,2)*(a**2))/((realvor(n,1))**2+(realvor(n,2))**2) tf = .FALSE.

Fortran - find loc method - implicit type

耗尽温柔 提交于 2019-12-20 03:34:14
问题 I am learning fortran and need my program to find specific values in an array. A simple program like below: program hello implicit none integer :: x x = findloc([4,9,0,2,-9,9,1],9) end program hello is giving me the following error: Error: Function 'findloc' at (1) has no IMPLICIT type I am compiling it using gfortran on macbook. Will really appreciate if I can get some help regarding findloc 回答1: The standard intrinsic findloc was introduced to Fortran in the 2008 revision. Support for this

Floating point exception when reading real values from an input file

六月ゝ 毕业季﹏ 提交于 2019-12-20 02:56:23
问题 I try to read a float value from an input file in Fortran . To do so I use this code : ... INTEGER :: nf REAL :: re OPEN(newunit=nf, file='toto.txt') READ(unit=nf, fmt=*) re ... with toto.txt a text file containing my real value : 10.1001 ! this value is supposed to be read by the Fortran program If I compile and execute like this, everything works well. But I get some trouble when I compile and execute with fpe option. I have a error at the readding line that looks like: Program received