Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
Filter by
Sorted by
Tagged with
Filter by Employee ID
-1 votes
0 answers
55 views

In the following code, ekk, vkk, and tau are read from external files and stored as arrays. The code works fine serially but in parallel gives NaN for all the tot_delta. I would appreciate any hints ...
-3 votes
0 answers
98 views

When I try to read a CSV (comma-separated values) file in a Fortran program I get an end-of-file execution error. I have tried including the commas as literals in the format declaration and the ...
-1 votes
1 answer
103 views

I have a module which takes any number of months as integers. I want to convert the integers into characters. In a different program I'm using both integers and characters, so I need the conversion. ...
2 votes
1 answer
91 views

In my Fortran program below I am trying to construct an array of abbreviated month names from month numbers. I enter a month number and immediately call a subroutine to convert the number to an ...
Advice
1 vote
4 replies
112 views

(UPDATE: I found one answer, see code at end) Fortran has native built-in parallel features. I'm trying to use them in a program that does a search for a solution. program do_co implicit none real(...
1 vote
1 answer
192 views

UPDATE: See the answer I added, for a "somewhat acceptable" solution For a 2-dimensional array, the expression transpose(x) is not acceptable in "variable context" so you can't ...
0 votes
1 answer
124 views

I have a subroutine that uses MPI_Type_indexed as a type to set a file view to output data out of a CFD program. The subroutine has one input, local_data_array, it identifies the type of ...
Best practices
2 votes
3 replies
94 views

I often write code like this allocate(a(n), stat=stat) if (stat /= 0) then write(*,*) "Allocation failed, stat =", stat stop 1 end if I understand that I should check stat, if I ...
Advice
2 votes
3 replies
80 views

This is an odd OpenMP question triggered by a possible compiler bug (?) we are chasing down. For a long time, we've had code that had: !$omp masked ... !$omp end masked that didn't have an explicit ...
Best practices
1 vote
6 replies
194 views

I am puzzled by all the possibilities. After some research it appeared to me that in the end the best thing is to declare integers without an explicit kind, since the default kind is essentially ...
Advice
0 votes
0 replies
25 views

For the flang implementation of OpenMP, we are discussing the following program. At issue is whether e.g. ii, iii, and iiii should be consider private or lastprivate, and if the former, whether the ...
Advice
0 votes
2 replies
78 views

I'm seeking opinions on what appears to be an inconsistency between the OpenMP 5.2 specification and an official example regarding the declare simd directive with the linear(p: ref) clause. 1. The ...
Tooling
3 votes
4 replies
190 views

I am working on a library designed to work with fortran allocated memory in C. I want to add support for the derived types. For that I need an equivalent type hardcoded in C, that is what a library ...
4 votes
0 answers
152 views

I want to parallelize modular reduction using floating-point arithmetic over a matrix with coefficients over a quotient ring Z/pZ. The modular reduction using floating-point arithmetic algorithm has ...
1 vote
1 answer
184 views

I have been searching the Internet for sample code on how to open a basic window using just Fortran without any 3rd party libraries. I want to do it from scratch. But there are no tutorials or posts ...
user avatar

15 30 50 per page
1
2 3 4 5
881