Skip to main content
Filter by
Sorted by
Tagged with
-2 votes
0 answers
70 views

I’m running WRF with nested domains (down to ~100 m) and I’m stuck at a namelist parsing error that I can’t get rid of. Setup WRF (ARW core) compiled on Linux (Ubuntu, gfortran + OpenMPI) WPS + WRF ...
Anand's user avatar
  • 1
0 votes
1 answer
130 views

I am attempting to compile and run a Fortran 90 program using command line (bash). In the past, when I've run gfortran /path/to/file, a file a.out and a file program_name are created, and I can run ...
JDoe's user avatar
  • 11
1 vote
0 answers
69 views

In Fortran, parameters are compile-time constants. Let's say I have two files, main.f90 and params.f90. Is it possible for params.f90 to define some parameters that will be used in main.f90? E.g. in C/...
FusRoDah's user avatar
  • 149
0 votes
0 answers
122 views

For educational purposes, I have written some Fortran 90 code that I compile with gfortran. Is there any way I can make sure that the code will not compile if I use any features not supported by ...
Scene's user avatar
  • 519
0 votes
0 answers
37 views

I'm an amateur in Fortran. I met a strange error when immitating youtube tutorial of FORTRAN in 100 Seconds to write a simple program: 1 program myApp 2 implicit none 3 integer :: jeff 4 jeff =...
Rabbiiiiit's user avatar
0 votes
1 answer
231 views

I try to modify my program to read lines that contain blank charaters (written with space) at the end of the line. I'm using Intel compiler (Fortran 95). In the program i'm using the command line: ...
Mikko T's user avatar
0 votes
0 answers
328 views

I have recieved some code from a colleague which is written in Fortan .f90 files, and was used before on Linux. I am trying to get the code to function on Windows 10 using Code::Blocks. The problem is ...
lhemz's user avatar
  • 1
1 vote
1 answer
231 views

I'm trying to use the LAPACK package to compute the inverse of a matrix. For this end, I've employed the routines sgetrf and sgetri. However, when testing the code, it doesn't return the expected ...
Leo's user avatar
  • 15
0 votes
1 answer
100 views

program analysis implicit none integer i, j, k, l double precision a, b, c, d, e integer binb(1:20),binc(1:20),bind1(1:20),bine(1:20) real lower(1:20),...
Garrett Leigh's user avatar
1 vote
1 answer
294 views

I have recently tried compacting an older version of my program to make it more efficient by using the "count" function. However, when I try to compile the program, I get the error for each ...
Garrett Leigh's user avatar
1 vote
5 answers
842 views

I have a 2D real number array and I want to locate the n highest values and assign these highest values to 1 and all others to 0. The following code does this correctly by using MAXLOC inside a loop ...
richjh's user avatar
  • 21
1 vote
1 answer
250 views

I am facing a difficult to debug problem in this Fortran 90 code - keeping or commenting out write(*,*) statements is changing the output of the code! Here are the details and the code (cannot ...
Deb S. B.'s user avatar
1 vote
3 answers
171 views

In my computational methods class, our homework problems are given as Python scripts, however my instructor said as long as we can translate them into our language of choice, we can solve them in our ...
Kajmunso's user avatar
1 vote
0 answers
104 views

Why am I getting slightly different results when I do the inverse of a matrix and multiply it by the original matrix? C++ (Eigen Library) vs Fortran (Using old Microsoft Developer Studio, Fortran ...
Yerlan Amir's user avatar
0 votes
1 answer
116 views

I have a fortran 90 function that is meant to parse a time stamp in the form day as %Y%m%d.%f where %f is fraction of a day /48 and return an array with year, month, day, fraction of day. function ...
Daniel Mutton's user avatar
-1 votes
1 answer
161 views

I have a 300x178 matrix and I want to find the minimum of each column of that matrix (1x178). Then I want that, on the location/pixel of the minimum value in each column, the sum is taken from all ...
Yoni Verhaegen's user avatar
0 votes
0 answers
174 views

I wrote the following program that find roots of a given function using the bisection method. The program looks like to be correct. But, one error is produced during the compilation process. MODULE ...
Lucas Morais's user avatar
0 votes
0 answers
21 views

:) Currently new to the Fortran language, I am currently on a question of migration from Fortran 90 to Fortran 2003, where a p1 pointer containing itself a p2 pointer generates the error message ...
user19337642's user avatar
0 votes
0 answers
502 views

I have a large program (many modules, subroutines) and receive the error "Program received signal SIGABRT: Process abort signal." The odd thing about this error is that it occurs maybe e.g. ...
Socorro's user avatar
  • 91
0 votes
1 answer
1k views

Today I'm trying to evaluate this differential equation for internal energy in a gas in Fortran 90: du / dt = dT / dt = - λ / ρ Where u is the internal energy and λ is the cooling function (and they ...
Marco Leonardi's user avatar
1 vote
0 answers
69 views

Written two modules: conjugate gradient method band matrix-vector multiplication they work separately (with machine error difference due to addition nonassociativity being around 1e-14 to 1e-15) But ...
2Napasa's user avatar
  • 380
2 votes
1 answer
225 views

How do I read only every tenth set of lines in a large file? A simple example is shown below. I thought I could use the increment for the do loop, but it seems that only changes the index T below, but ...
user avatar
1 vote
2 answers
691 views

I like how it's implemented in Python. Example(Python): x = 1 y = 2 print(f"{x = }, {y = }") # x = 1, y = 2 Im want to handle the errors and then print the variable name. Example(Fortran): ...
Wexel's user avatar
  • 45
0 votes
1 answer
294 views

I am writing some data in a text file using Fortran code. The output data I want to have should look like the following. ITEM: ATOMS id type xs ys zs 1 1 0.004775 0.074550 0.697303 2 1 0.017240 0....
Magic_Number's user avatar
0 votes
0 answers
190 views

I am writing this linear system solver for an university assignment, and I have incurred in quite a weird problem. I have defined a recursive function for calculating the determinant of a square ...
Guglielmo's user avatar
4 votes
1 answer
171 views

I've building a library with Fortran Package Manager and it's packing up the test code from test/ as part of the final library - everything works okay but I'd prefer to omit the test code from the ...
tschumann's user avatar
  • 3,326
3 votes
1 answer
151 views

Is there a way to make Fortran Package Manager compile code as 32 bit (i.e. pass -m32 to gfortran?) I can't see anything obvious in the documentation so I've resorted to copying the output running ...
tschumann's user avatar
  • 3,326
1 vote
1 answer
552 views

I am playing around with selected_real_kind() against real(kind=8) to check how much extra processor time I require to improve numerical precision. The set of parameters I use are: module param ...
ferro11001's user avatar
1 vote
1 answer
311 views

So we were taught bubble sort in our class and I have this code !Sorting n real numbers program bubblesort implicit none integer::i,j,n integer,allocatable,dimension(:)::A write(*,*)"Enter ...
Ignis Vizsla's user avatar
3 votes
1 answer
1k views

I have a Fortran90 code that compiles and works great with gfortran 4.8.5. However, when I try to compile it with newer gfortran versions (I've tested from 6.3 to 11.2), it does not work!! If I don't ...
moser's user avatar
  • 456
1 vote
1 answer
343 views

I am learning to program in fortran and was making a basic program. In it I am trying to return an array from a function in my program, which is resulting in this error: Interface mismatch in global ...
blunty6363's user avatar
2 votes
0 answers
39 views

I have three pieces of code Everything in the main.f90 file program main implicit none integer, parameter :: N = 10 real :: x(N), y(N), z(N) integer :: i do i = 1, N x(i) = i ...
MaPo's user avatar
  • 887
0 votes
0 answers
630 views

I'm trying to compile Amber'18 molecular dynamic simulation program. One can find some installation instructions here: https://ambermd.org/InstUbuntu.php and in Amber's manual. I have a problem with ...
Andrey Buglak's user avatar
2 votes
0 answers
27 views

I have some Fortran error code in (open) statement like the following: !IF ITS THE FIRST CALL TO THIS UNIT, DO SOME BOOKKEEPING IF (INFO(7).GE.0) GO TO 100 !FIRST CALL OF SIMULATION, CALL THE TYPECK ...
TSC BME's user avatar
  • 21
1 vote
0 answers
57 views

I am trying to produce the mean, variance and standard deviation of a user input array, but I am trying to keep everything in the subroutine other than gathering the data. Program dyn_array implicit ...
ChefP905's user avatar
0 votes
0 answers
513 views

I am trying to compile some Fortran code using intel oneapi compiler (ifort -v 2021.2.0) and linking it with another Fortran library (MultiZ) previously coded. I am using the following makefile: # ...
Juan David Navarro's user avatar
0 votes
1 answer
107 views

I was trying to write a program to calculate the average without considering the minimum and average of the columns, what is the best way to do this? To begin with, I wanted to simply output the ...
HUR1EY's user avatar
  • 1
1 vote
1 answer
539 views

I am trying to read a binary file consisting of signed 16 bit integers and there are exactly 51840000 of them. The code in C that accomplishes this looks like this: #include<stdio.h> #include<...
atapaka's user avatar
  • 1,400
0 votes
0 answers
161 views

I need to calculate the number steps to calculate a numerical method in such a way that for i=0 the time be t=tstart and for i=nsteps the time be t=tstop. I know the real numbers tstart, tstop and dt, ...
user106306's user avatar
0 votes
0 answers
967 views

I have a Fortran 90 code. I have tried to allocate a r(5000000,5000,3) array with real numbers in my code. After compiling with double precision (I am using gfortran compiler), I received this error: ...
quantax's user avatar
  • 11
0 votes
1 answer
616 views

I need to compile the following project on a mac: cost733clas-1.4_rev23.tgz (download link) The problem is, I have never worked with fortran or C and for the most part just worked with IDE's which ...
Anton's user avatar
  • 821
1 vote
0 answers
53 views

I have two text files. File_1 has huge data in 100 columns(formatted) and file_2 has mistakes in data entry, has 20 columns and first 15 are same format as data and last 5 contains text like "...
Aar's user avatar
  • 11
0 votes
0 answers
36 views

So I wrote some Fortran in the .f90 format and I need the file extension to be .f for compilation reason. Im under the assumption that ive written the fortran in iin the newest fortran 90 way and i ...
user avatar
3 votes
0 answers
220 views

Consider a module that generates the first few primes: module module_primes contains function is_prime(n) ! Function to check if a number is prime. implicit none integer :: n, m ...
duality's user avatar
  • 41
0 votes
2 answers
84 views

I have no experience with fortran, but I need to define the variable error. a = 3.086e18 error = ABS(((xCoord / a)**2 + (9 / 4)*(yCoord / a)**2 + (zCoord / a)**2 -1)**3 - (xCoord / a)**2 * (yCoord / a)...
simonblaha's user avatar
0 votes
1 answer
889 views

I'm trying to install a package through ifort on Mac since it requires ifort to compile and run the code and I am and getting error ld: library not found for -lSystem I don't know if oneAPI comes ...
manish's user avatar
  • 43
0 votes
1 answer
310 views

I have two subroutines in a DLL. To call them in C#, they are changed to STDCALL like this: SUBROUTINE MoveToZero(X, N) !DEC$ ATTRIBUTES DLLEXPORT::MoveToZero !DEC$ ATTRIBUTES STDCALL,...
Chen's user avatar
  • 33
0 votes
1 answer
73 views

Working with Fortran90 in Unix... I have a programme which needs to read in the input parameters from a file "input-deck.par". This filename is currently hard-coded but I want to run a ...
DoctorPressure's user avatar
0 votes
0 answers
380 views

I want to add a new fortran module into an existing fortran90 program. The existing fortran90 program is compiled by firstly running ./configure, then run the make and make install. If I want to ...
Xu Shan's user avatar
  • 325
0 votes
0 answers
730 views

Currently I am running an atmospheric model which was written by Fortran 90. In some subroutines I made some innovations using python (mainly tensorflow). Now I need to implement this python code into ...
Xu Shan's user avatar
  • 325

1
2 3 4 5
32