gfortran

gfortran for mac error. ld: library not found for -lSystem

折月煮酒 提交于 2021-02-05 09:27:07
问题 I use gfortran in Mac to compile cfd codes. But there exists the following error(picture attached)enter image description here I could compile successfully with visual studio in win64. I think there is any error in my gfortran compiler. How can I handle it. please help me Thank you very much. 来源: https://stackoverflow.com/questions/63076385/gfortran-for-mac-error-ld-library-not-found-for-lsystem

Error linking C and Fortran in installation of library

家住魔仙堡 提交于 2021-02-05 09:11:20
问题 I'm installing LoopTools version 2.15 (http://www.feynarts.de/looptools/LT25Guide.pdf), a library which evaluates special functions needed in physics. I had already installed it on a computer with Linux, and am now trying to install it on a Mac. I had to install a fortran compiler, which I did easily through macports. However, the following error appears when I try to install the package: looking for gcc... /usr/bin/clang looking for g++... /usr/bin/clang++ looking for fortran... /opt/local

Error linking C and Fortran in installation of library

女生的网名这么多〃 提交于 2021-02-05 09:01:32
问题 I'm installing LoopTools version 2.15 (http://www.feynarts.de/looptools/LT25Guide.pdf), a library which evaluates special functions needed in physics. I had already installed it on a computer with Linux, and am now trying to install it on a Mac. I had to install a fortran compiler, which I did easily through macports. However, the following error appears when I try to install the package: looking for gcc... /usr/bin/clang looking for g++... /usr/bin/clang++ looking for fortran... /opt/local

Insert vector into matrix at specific columns

别等时光非礼了梦想. 提交于 2021-02-05 08:31:25
问题 How would I insert a vector b into a matrix at column col? I cannot find any syntax for and insert or append function in Fortran. So far all I have done is reassigned the values in the column, but I only want to insert the vector. real :: M(n,n) integer :: n, col real :: b(n) M(n:col) = b(:) 回答1: If I understood of your problem, you want to: increase the number n of columns of the matrix m by 1; insert the content of a vector b in m as a new column, at index col ; right-shift the remaining

Insert vector into matrix at specific columns

こ雲淡風輕ζ 提交于 2021-02-05 08:31:11
问题 How would I insert a vector b into a matrix at column col? I cannot find any syntax for and insert or append function in Fortran. So far all I have done is reassigned the values in the column, but I only want to insert the vector. real :: M(n,n) integer :: n, col real :: b(n) M(n:col) = b(:) 回答1: If I understood of your problem, you want to: increase the number n of columns of the matrix m by 1; insert the content of a vector b in m as a new column, at index col ; right-shift the remaining

gfortran linking c libraries with conda

喜你入骨 提交于 2021-02-05 08:28:08
问题 I am trying to compile a C++/Fortran program using conda on an Ubuntu 18.04 server where I do not have superuser rights. I am able to compile correctly the program with the same source code on my Ubuntu 18.04 PC (using conda too), but on the server I get a bunch of errors. At the moment, I am stuck with a "library not found - undefined reference" error: gfortran -o glm -Wl,--export-dynamic obj/glm_globals.o obj/glm_util.o obj/glm_csv.o obj/glm_mobl.o obj/glm_mixu.o obj/glm_wqual.o obj/glm

Extraneous output when using an unlimited format item

旧时模样 提交于 2021-02-05 07:57:05
问题 This is my code: Program Output_Format Implicit none Integer::k Integer,parameter:: Br_nn_mre = 5 Character(56),parameter:: FMT_01 = '(1x,"NN_DM:",1x,*("NN_",i2.2,1x))' Open( 15 , File = 'Output.txt' , Status = 'Unknown' , Action = 'Write' ) Write( 15 , FMT_01 ) ( k , k = 1 , Br_nn_mre ) Close( 15 , Status = 'Keep' ) End Program Output_Format The content of Output.txt file is: NN_DM: NN_01 NN_02 NN_03 NN_04 NN_05 NN_ I want to get this content in Output.txt : NN_DM: NN_01 NN_02 NN_03 NN_04 NN

Ambiguous interface when using optional arguments in Gfortran

白昼怎懂夜的黑 提交于 2021-02-05 06:03:31
问题 I've just stumbled across this error when compiling a bit of code that I've been using without problems for ages now. I'm using Gfortran 8.2 on Linux and I suspect that a compiler update has caused the issue. When I define an interface with an optional argument that has a different number of non-optional arguments, Gfortran complains that the interface is ambiguous. For example, if I compile the following, I get "Ambiguous interfaces in generic interface 'test' for ‘testinit1’ at (1) and

This FORTRAN code shouldn't compile. Is there a reason why it does?

邮差的信 提交于 2021-02-05 05:55:26
问题 The following code compiles, but I do not think that it should. As you can see, the output is garbage. This is a minimal failing example of something that bit me hard in a large project I work on. My question is - why does the compiler not complain? Is this a compiler limitation, or is this somehow "expected behaviour", and I've missed something? I'm using gfortran 4.6.3. module dataModule integer :: datum1 = int(1) integer :: datum2 = int(2) end module dataModule program moduleTest use

gfortran can't find OpenMP library (omp_lib.mod) using MinGW

天涯浪子 提交于 2021-02-04 21:39:55
问题 I am trying to compile a Fortran code including OpenMP. I am replicating the use of OpenMP from a different code. It built successfully once yesterday and then the next time I built it I get the following error: ../MAXBRG3D.f90:3:4: USE OMP_LIB ! USED WITH OMP FUNCTIONS 1 Fatal Error: Can't open module file 'omp_lib.mod' for reading at (1): No such file or directory compilation terminated. subdir.mk:329: recipe for target 'MAXBRG3D.o' failed make: *** [MAXBRG3D.o] Error 1 The only changes I