gfortran

Where can I get obscure DLL so py2exe will compile?

允我心安 提交于 2019-12-08 05:31:54
问题 I am running py2exe to convert a rather large (~20k lines) python file into an executable. It's an older program and is written in python 2.7, 32 bit, so it does not translate well to a minimum working example. On running py2exe I encounter the following error: error: [Errno 2] No such file or directory: 'libopenblas.UWVN3XTD2LSS7SFIFK6TIQ5GONFDBJKU.gfortran-win32.dll' Having this dll in the Python27/DLLs folder will solve this issue, but after scouring the depths of google I have been unable

How do I run gfortran code from sublime text?

不打扰是莪最后的温柔 提交于 2019-12-08 04:50:42
问题 I have a Fortran 95 code which I compile and run on my Linux OS through the terminal window, by first compiling the individual modules and then the main program. Now I am trying to run the same code from sublime text version 3.0, without using the terminal window. I got the motivation from this video: https://www.youtube.com/watch?v=_eZyTNthJG4 But when I ctrl+b , build the code, it gives the following console output: /tmp/cc4nYhyn.o: In function `MAIN__': problem_main.f95:(.text+0x2e5):

Fortran runtime error: End of file

一笑奈何 提交于 2019-12-08 03:06:31
I'm trying to understand how the READ statement works in Fortran. To do this, I've written the following simple program: program main integer a,b,c open(unit=10,file='test.txt',status='old') read(10,*)a,b,c print*,a,b,c close(10) end program main I run this on the terminal (using a Mac): gfortran Main.f95; open a.out I get the following error: At line 5 of file Main.f95 (unit = 10, file = 'test.txt') Fortran runtime error: End of file I've looked for solutions all around the web and came upon the suggestion of adding IOSTAT=... inside the READ specifiers, as follows: program main integer a,b,c

gfortran doesn't work after upgrading to El Capitan

谁说我不能喝 提交于 2019-12-08 02:20:41
问题 I tried upgrading to El-Capitan and Xcode 7.0 and now gfortran doesn't work. Everytime I run gfortran, I get errors which google search doesn't seem to resolve so I'm asking stack overflow: I'm trying to compile a minimal example program: program hello print *, "Hello World" end program hello When I run gfortran test.f gfortran: warning: couldn’t understand kern.osversion ‘15.0.0 ld: library not found for -lgcc_s.10.4 collect2: error: ld returned 1 exit status I'm not worried about the

Linking FORTRAN and C++ objects files

假如想象 提交于 2019-12-08 01:54:28
I am going to call a C++ function from FORTRAN, for which I am using ISO_C_Binding module. After compaction of the FORTRAN main file and C++ function with commands gfortran -c mlp8.f90 g++ -c mean_cpp.cc Which will create the objects files but in the linking phase as suggested by some members I am going to use the commands g++ mlp8.o mean_cpp.o -o main –lgfortran I.e. using C++ compiler with linking to FORTRAN libraries but it gives error like /Cygnus/cygwin-b20/H-i586-cygwin32/i586-win32/bin/ld: cannot open –lgfortran: No such a file or directory Collect2:ld return 1 exit status So I think

fortran operator overloading (=)

↘锁芯ラ 提交于 2019-12-07 13:24:24
问题 Is there a way to overload the = operator so that you can write an assignment like in this example: module constants_mod integer,parameter :: dpn = selected_real_kind(14) end module module vectorField_mod use constants_mod implicit none private public :: vectorField public :: allocateX,allocateY,allocateZ public :: delete ! public :: operator(=) type vectorField integer,dimension(3) :: sx,sy,sz real(dpn),dimension(:,:,:),allocatable :: x,y,z end type interface delete module procedure

gfortran: compiling 32-bit executable in 64-bit system

帅比萌擦擦* 提交于 2019-12-07 12:53:55
问题 I'm running Ubuntu 12.10 (64-bit), with Linux kernel 3.5.0-51-generic, on an AMD Athlon(tm) 64 X2 Dual Core Processor 5200+ ×2. I have GNU Fortran (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2. I'm trying to compile some code into a 32-bit executable. I've checked that all the needed libraries are installed on my system (I ran ldd on a program previously compiled on a 32-bit computer, and downloaded the missing packages). I tried running $ gfortran foo.f -m32 -L/lib/i386-linux-gnu, but I get the

How to provide an explicit interface to a library of Fortran 95+ modules, with implementation hiding

人盡茶涼 提交于 2019-12-07 10:06:59
问题 I'm using gfortran's 95+ extensions. I have a library of utility modules I'd like to link to other projects, i.e. as a library or shared object / dll. However, in Fortran, I don't understand how to split the interface from the implementation in Fortran without maintaining two copies of the module interface. In C, I would separate the interface from the implementation like: api.h ←includes← impl.h ↑ ↑ includes includes ↑ ↑ user.c impl.c Is there a way to achieve the same effects in modern