gfortran

Passing an array of undefined size to a subroutine [duplicate]

爷,独闯天下 提交于 2019-12-13 03:19:07
问题 This question already has an answer here : Procedure with assumed-shape dummy argument must have an explicit interface [duplicate] (1 answer) Closed 2 years ago . I am trying to pass an array of unspecified size to a subroutine like so PROGRAM GOL IMPLICIT NONE INTEGER, PARAMETER :: size_x = 16, size_y = 16 LOGICAL, DIMENSION(1:size_x,1:size_y) :: universe universe(:,:) = .FALSE. CALL COUNT_NEIGHBOURS(universe, 1, 1) END PROGRAM GOL SUBROUTINE COUNT_NEIGHBOURS (universe, x, y) LOGICAL,

GLIBC_2.11' not found (required by /path_name/bin/gfortran)

偶尔善良 提交于 2019-12-13 02:03:33
问题 I already have GCC and Gfortran installed. It is gcc version 4.1.2 20080704 (Red Hat 4.1.2-52). However, I am trying to install a more recent gfortran compiler. Here is what I did so far. From the http://gfortran.meteodat.ch/download/x86_64/ I downloaded the nightly "gcc-trunk.tar.xz" and I extracted it into the directory "opt." This created the directory "gcc-trunk". I then downloaded the "gcc-5-infrastructure.tar.xz" and extracted it into "gcc-trunk." I then input PATH="$HOME/gcc-trunk/bin"

gfortran - Is unspecified decimal length allowed for real output?

我只是一个虾纸丫 提交于 2019-12-12 22:08:22
问题 Is there a way to format a real number for output such that both the width and decimal parts are left unspecified? This is possible with ifort by just doing the following: write (*, '(F)') num ...but I understand that that usage is a compiler-specific extension. Gfortran does accept the standard-compliant 0-width specifier, but I can't find anything in the standard nor in gfortran's documentation about how to leave the decimal part unspecified. The obvious guess is to just use 0 for that as

Writing and calling pure subroutines in Fortran 90 using gfortran

混江龙づ霸主 提交于 2019-12-12 16:59:32
问题 When writing and calling pure subroutines in Fortran 90 using gfortran, how do I find out why the compiler emits this error? Error: Subroutine call to XXXX at (1) is not PURE I'll try to pose my question as specifically as I can while at the same time being general enough to be useful to others, so I'll avoid pasting in my actual code and instead will sketch what happened. I understand there are various rules about pure procedures in Fortran 90, which I think basically boil down to not

Correctly setting random seeds for repeatability

让人想犯罪 __ 提交于 2019-12-12 13:23:10
问题 The method for setting random seeds using the Fortran 90 subroutine random_seed is quite straightforward. call random_seed( put=seed ) But I can't find any information about guidelines for setting the seed (which is absolutely necessary when you want repeatability). Folklore I've heard in the past suggested that scalar seeds should be large. E.g. 123456789 is a better seed than 123. The only support for this I can find on the web is that it is suggested for the ifort extension function ran()

Fortran sources but no Fortran compiler found

安稳与你 提交于 2019-12-12 10:35:11
问题 I'm trying to install pyOpt in Python and I got this error : error: library algencan has Fortran sources but no Fortran compiler found I'm using Anaconda on windows 7, I tried to install "Microsoft Visual C++ Compiler for Python 2.7", but I got the same error. 回答1: You should install a Fortran compiler, e.g. gfortran (via MinGW/Cygwin on Windows). See here for details. A C++ compiler won't help here. MinGW includes gfortran as part of the distribution, with Cygwin, you need to install the

Python Error : File … spherical.py… import f_utils…ImportError: DLL load failed: The specified module could not be found

心已入冬 提交于 2019-12-12 06:43:30
问题 I am running some codes in python 2.7 with MIN-GW - gfortran of fortran77 codes and Visual Studio 2010 .I installed all requirements with pip , so when I do this: python setup.py install everything is successful . f2py -c f_utils.for Creates libf_utils.DLYOMDEGIW6SZRJNEZ2ZMRYPGQZ75ZH3.gfortran-win_amd64.dll in ..\untitled\.libs and untitled.pyd but As python spherical.py install Now I get this error: Traceback (most recent call last): File "spherical.py", line 4, in <module> import f_utils

Openmp and Fortran, crashing code

混江龙づ霸主 提交于 2019-12-12 05:27:53
问题 This is related to a previous question. I am trying to parallelize a code with mixed syntax (f77 and f90) I've added into one of the many routines this portion in the code !$omp parallel shared (xdif,cdiff, dg,bfvisc,r,ro,xm ) private ( l ) !$omp do DO L=2,n-1 xdif(l)=cdiff(l)*fjc+(dg(l)+bfvisc(l))* & (4.d0*pi*r(l)**2*ro(l)/xm(n))**2 ENDDO !$omp end do !$omp end parallel After compiling (using -fopenmp ) the code runs but just for a few seconds and the only error I'm getting is: Segmentation

gfortran makefile 'can't open included file'

扶醉桌前 提交于 2019-12-12 04:24:17
问题 I'm having an issue with a makefile compiling and I'm not sure where to start diagnosing this. It was generated for a colleague's OS X system, and I'm trying to implement it on my linux system. It worked on the OS X computer. I've updated library locations to represent where they live on my computer - and this is likely the biggest source of error, as gfortran procedure shouldn't be different, no? The included files: file0.i, ... fileN.i all live in the same directory as the makefile. I'm

Problems with quadruple precision Fortran code compiled with 64-bit anaconda mingw

删除回忆录丶 提交于 2019-12-12 04:22:08
问题 I've been using f2py to "pythonize" some Fortran codes for use on a 64-bit Windows 7 machine. I'm working with 64-bit Anaconda 4.2.0 and using MinGW installed via conda install mingw (the associated folders use the name "x86_64-w64-mingw32"). It was working well until I tried a program with quadruple precision (REAL*16) numbers. I found that the program crashed (libquadmath-0.dll was cited in the ProblemSignature of the Windows-generated crash report). I tried to identify the simplest case