gfortran

centos6.4 下安装numpy、scipy、matplotlib

跟風遠走 提交于 2020-03-24 08:00:16
各个安装包版本: scipy-0.11.0 numpy-1.6.2 nose-1.2.1 lapack-3.4.2 ##atlas-3.10.0 (http://pkgs.fedoraproject.org/repo/pkgs/atlas/) 依赖关系:scipy的安装需要依赖于numpy、lapack、atlas(后两者都是线性代数工具包,不清楚的自行google之。。。),而numpy和sci的测试程序的运行又依赖于nose,因此,整个安装过程必须要按顺序执行的,否则是无法执行下去的。 sudo yum -y install gcc gcc-c++ numpy python-devel scipy sudo pip install nose sudo pip install numpy 主要是在安装scipy时问题多多: 1. Blas(http://www.netlib.org /blas/) libraries not found. Directories to search for the libraries can be specified in the numpy/distutils/site.cfg file (section [blas])or by setting the BLAS environment variable. 找不到blas 解决: yum

What happens when calling external an Fortran function with the wrong type of arguments?

馋奶兔 提交于 2020-03-21 19:05:09
问题 If you have a standalone function in a file (not in a module) and you call it with a single-precision while it expects a double precision number: main.f90 : program main call test(1.0) end program main test.f90: subroutine test(a) double precision :: a print *, "a", a end subroutine How does the compiler "casts" from single to double precision in this case ? Using floating-point format, I would expect the bits to stay the same during the cast but additionnal zeroes to be appended. That is: 1

Fortran compiler error installing PyOptSparse

时光毁灭记忆、已成空白 提交于 2020-02-23 07:15:20
问题 I am trying to install the PyOptSparse package via the Anaconda Prompt using (FYP_py37_32bit) C:\Users\nilsg\pyoptsparse>python setup.py install --user but keep getting the following error compiling Fortran sources Fortran f77 compiler: C:\Users\nilsg\Miniconda3\envs\FYP_py37_32bit\Library\mingw-w64\bin\gfortran.exe -Wall -g -ffixed-form -fno-second-underscore -O3 -funroll-loops Fortran f90 compiler: C:\Users\nilsg\Miniconda3\envs\FYP_py37_32bit\Library\mingw-w64\bin\gfortran.exe -Wall -g

Fortran compiler error installing PyOptSparse

夙愿已清 提交于 2020-02-23 07:15:06
问题 I am trying to install the PyOptSparse package via the Anaconda Prompt using (FYP_py37_32bit) C:\Users\nilsg\pyoptsparse>python setup.py install --user but keep getting the following error compiling Fortran sources Fortran f77 compiler: C:\Users\nilsg\Miniconda3\envs\FYP_py37_32bit\Library\mingw-w64\bin\gfortran.exe -Wall -g -ffixed-form -fno-second-underscore -O3 -funroll-loops Fortran f90 compiler: C:\Users\nilsg\Miniconda3\envs\FYP_py37_32bit\Library\mingw-w64\bin\gfortran.exe -Wall -g

A fortran timing issue I cannot understand

℡╲_俬逩灬. 提交于 2020-02-12 05:01:28
问题 I wrote (for my class in Numerical Methods for Theoretical Physics) a very simple program for a Random Walk in dimension 2. Here it is: program random_walk implicit none integer, parameter :: Nwalker = 1000000 integer, parameter :: Nstep = 100 integer, parameter :: Nmeas = 10 integer :: posx, posy, move integer :: is, im, iw real :: start_time, stop_time double precision, dimension(Nmeas) :: dist, r2 real :: rnd do im = 1, Nmeas dist(im) = im*Nstep r2(im) = 0.0 end do call cpu_time(start_time

Ubuntu14.04下GAMIT10.6的安装

邮差的信 提交于 2020-02-09 10:18:46
#安装步骤 将ubuntu切换到root用户权限 1 $sudo -s ##安装必要软件 12345 $ apt-get install gcc$ apt-get install gfortran-4.7$ apt-get install csh$ apt-get install tcsh$ apt-get install libx11-dev 这里需注意: gfortran应该安装4.7版本,根据MIT的教程讲4.8以及版本编号后缀为0的编译器总有bug,建议安装4.7.3。在ubuntu14.04下apt-get可以用gfortran-4.7装之。安装时注意提示缺少什么依赖,就添加其依赖即可。gfortran 4.7安装完成后,由于其执行程序名为/usr/bin/gfortran-4.7,gamit里面编译命令用的gfortran,所以应该将gfortran-4.7建立一个关联,进入/usr/bin/下执行 12 $ln -s /usr/bin/gfortran /usr/bin/gfortran-4.7$ls -la /usr/bin/ | grep gcc大专栏 Ubuntu14.04下GAMIT10.6的安装v> ##安装GAMIT ###安装 首先将GAMIT包拷贝到待安装的位置,比如可以在/usr/local/gg/10.6/ 进入GAMIT目录,执行 1 $.

How can I debug a Fortran READ/WRITE statement with an implicit DO loop?

假装没事ソ 提交于 2020-02-06 02:43:11
问题 The Fortran program I am working is encountering a runtime error when processing an input file. At line 182 of file ../SOURCE_FILE.f90 (unit = 1, file = 'INPUT_FILE.1') Fortran runtime error: Bad value during integer read Looking to line 182 I see a READ statement with an implicit/implied DO loop: 182: READ(IT4, 310 )((IPPRM2(IP,I),IP=1,NP),I=1,16) ! read 6 integers 183: READ(IT4, 320 )((PPARM2(IP,I),IP=1,NP),I=1,14) ! read 5 reals Format statement: 310 FORMAT(1X,6I12) When I reach this code

Progress bar is not being written continuously in ifort while it is in gfortran

有些话、适合烂在心里 提交于 2020-02-01 09:09:40
问题 I have wrote a genetic algorithm in Fortran to be able to compute with a long double precision a generic fitness function. The first version (double precision) was written for gfortran where I implemented a progress bar. Now I have to compile with ifort because gfortran is not capable of performing real*16 calculations. All works fine but in this case (ifort) the progress bar does not work properly. Namely, only when the whole cycle is completed the progress bar is printed to std output. Here

Progress bar is not being written continuously in ifort while it is in gfortran

若如初见. 提交于 2020-02-01 09:09:37
问题 I have wrote a genetic algorithm in Fortran to be able to compute with a long double precision a generic fitness function. The first version (double precision) was written for gfortran where I implemented a progress bar. Now I have to compile with ifort because gfortran is not capable of performing real*16 calculations. All works fine but in this case (ifort) the progress bar does not work properly. Namely, only when the whole cycle is completed the progress bar is printed to std output. Here

Progress bar is not being written continuously in ifort while it is in gfortran

血红的双手。 提交于 2020-02-01 09:09:25
问题 I have wrote a genetic algorithm in Fortran to be able to compute with a long double precision a generic fitness function. The first version (double precision) was written for gfortran where I implemented a progress bar. Now I have to compile with ifort because gfortran is not capable of performing real*16 calculations. All works fine but in this case (ifort) the progress bar does not work properly. Namely, only when the whole cycle is completed the progress bar is printed to std output. Here