gfortran Questions

2

Solved

I've always been using the -fdefault-real-8 option of gfortran to automatically promote every single REAL declared anywhere in the program to double precision, along with any constant, e.g. 1.23. I...
Turpentine asked 31/3, 2018 at 14:39

2

Solved

Is there a way of disabling the line length limit in the gfortran compiler? I am porting from ifort to gfortran and I wonder if there is an easy way to do so without going through the code and intr...
Unidirectional asked 11/10, 2013 at 6:37

4

I am trying to deploy a python application on aws lambda. It has several large python dependencies, the largest being scipy and numpy. The result is that my application is significantly larger than...
Whittington asked 13/11, 2018 at 5:18

3

I have tried many workarounds (brew upgrade/update, brew doctor, reinstalling gcc and gfortran, exporting libraries path etc.) to solve this issues, but none of them succeeded. When I try to execut...
Pitarys asked 25/7, 2019 at 17:30

3

Solved

It is my understanding that Fortran, when reading data from file, will skip lines starting with and asterisk (*) assuming that they are a comment. Well, I seem to be having a problem with achieving...
Travel asked 21/4, 2012 at 14:20

1

Solved

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 U...
Roselani asked 7/10, 2020 at 10:45

4

Solved

I'm looking for a bulletproof way of converting logical type variables to real type that will work in both ifort and gfortran. The following works in ifort, but not in gfortran: logical :: a real ...
Sunup asked 24/2, 2013 at 22:29

1

I recently started using f2py and python2.7 for working on some codes related to an ocean model (ROMS) in Fortran. My workstation specifics are Ubuntu 16.04 with python2.7, anaconda2 and gfortran. ...
Teno asked 22/12, 2016 at 20:20

2

I am working with a source code that might have been written before the most recent version of gfortran. I'm aware that the way DO, END DO, and CONTINUE has changed so that there can not be shared ...
Nigh asked 3/9, 2020 at 19:35

3

Solved

I'm learning Fortran and I'd like to encapsulate an array and a subroutine in a type. The problem appears to be in the type definition of the self-object. This is the minimal test case I came up w...
Fairfax asked 6/10, 2018 at 10:46

6

I have recently learned how to work with basic files in Fortran and I assumed it was as simple as: open(unit=10,file="data.dat") read(10,*) some_variable, somevar2 close(10) So I can't underst...
Alice asked 22/3, 2014 at 22:9

1

Solved

Modern Fortran contains various object-oriented ideas, including a concepts of "destructors" through the FINAL keyword. MODULE mobject TYPE :: tobject ! Data declarations CONTAINS FINAL :: fin...
Championship asked 30/1, 2020 at 11:54

1

Solved

I am currently working with old code, that calls the iand function with integers of different kinds as arguments. Here's a small example of what the code includes: program test integer*1 i integ...
Trochal asked 15/1, 2020 at 17:17

2

My supervisor has asked that I install a fortran compiler on my mac and suggested using MacPorts to install gcc6. I have tried to install gcc6 a number of times but each time it doesn't seem to com...
Bracey asked 13/8, 2018 at 12:59

4

Solved

I am running a loop in a Fortran program compiled with gfortran that outputs numerical values to an output file for each iteration of the loop. The problem is that the output is not saved to the fi...
Cully asked 7/10, 2009 at 19:36

0

Here is a funny problem I am encountering with R and Fortran. Consider the following Fortran subroutine: ! foo.f90 subroutine fun(n, x) implicit none integer, intent(in) :: n logical, intent(i...
Rarotonga asked 12/10, 2019 at 13:10

2

It is very simple query but I'm not able to find the exact solution. How to break to new line when printing in Fortran? for example print*,'This is first line' print*,'This is second line' I w...
Bel asked 28/9, 2019 at 5:31

3

Solved

I have a simple fortran function that computes the Kronecker product: function kron(A, B) implicit none real, intent(in) :: A(:, :), B(:, :) integer :: i, j, ma, na, mb, nb real, dimension(:, ...
Pathe asked 12/9, 2013 at 16:39

1

I'm currently using gfortran 4.9.2 and I was wondering if the compiler actually know hows to take advantage of the DO CONCURRENT construct (Fortran 2008). I know that the compiler "supports" it, bu...
Szechwan asked 28/4, 2015 at 19:32

3

Solved

The GNU Extension to the GNU Fortran compiler provides the subroutine GETCWD() that well, gets the current working directory. However, my code has to be portable to the ifort and nagfor compiler as...
Labile asked 16/5, 2015 at 18:24

2

Solved

I can call compile this fortran code 'test.f90' subroutine test(g,o) double precision, intent(in):: g double precision, intent(out):: o o=g*g end subroutine with gfortran -shared -fPIC test.f90...
Rosalynrosalynd asked 3/10, 2016 at 22:23

1

Solved

In a Fortran program, I need to compute several expressions like M · v, MT · v, MT · M, M · MT, etc ... Here, M and v are 2D and 1D arrays of small size (less than 100, ...
Rim asked 18/3, 2019 at 13:18

2

Is there is a way to put .mod files, generated by gfortran (GCC), into a separate output directory? I know how to place object files or other output with the -o flag as in: gfortran -c test.f03 -o...
Caddis asked 28/1, 2009 at 16:30

2

Solved

Is there a way to force flush-to-zero of underflows in gfortran? I can't believe this is the first time someone has asked this, but I couldn't find anything on it anywhere. Mea culpa if this is a ...
Aphasic asked 29/9, 2015 at 18:58

3

Solved

Experience: fortran for about 3 months python - intermediate : never used the ctypes module in python before this I was looking for a way to use the fortran code for my doctoral work in python - s...
Moraceous asked 8/4, 2013 at 9:20

© 2022 - 2025 — McMap. All rights reserved.