# Help

**URL:** https://fortran-lang.discourse.group/c/help/5.md

[Latest](https://fortran-lang.discourse.group/latest.md) · [Categories](https://fortran-lang.discourse.group/categories.md)

---

## [About the Help category](https://fortran-lang.discourse.group/t/about-the-help-category/28)

<div class="topic-metadata">

**Author:** [@milancurcic](https://fortran-lang.discourse.group/u/milancurcic)\
**Replies:** 5\
**Last updated:** [February 7, 2026, 3:49pm UTC](https://fortran-lang.discourse.group/t/about-the-help-category/28 "2026-02-07T15:49:43Z")

</div>

Posts requests for help here. Please make sure to include: Question or description of your problem Exact error message (if applicable) Minimum working code that reproduces the problem (if applicable) A description of …

---

## [adding LFortran to nixpkgs, call for reviewers](https://fortran-lang.discourse.group/t/adding-lfortran-to-nixpkgs-call-for-reviewers/11111)

<div class="topic-metadata">

**Author:** [@taranarmo](https://fortran-lang.discourse.group/u/taranarmo)\
**Replies:** 1\
**Last updated:** [September 21, 2026, 3:16pm UTC](https://fortran-lang.discourse.group/t/adding-lfortran-to-nixpkgs-call-for-reviewers/11111 "2026-09-21T15:16:14Z")

</div>

I added LFortran package to NixOS’ packages repository and it’s awaiting review for almost a year now. I kindly ask nix users or anyone interested to review the package (it was my first experience adding a new compiler t…

---

## [Do concurrent + NVIDIA GPU offload: does it support external procedures?](https://fortran-lang.discourse.group/t/do-concurrent-nvidia-gpu-offload-does-it-support-external-procedures/11087)

<div class="topic-metadata">

**Author:** [@Shahid](https://fortran-lang.discourse.group/u/Shahid)\
**Replies:** 4\
**Last updated:** [September 8, 2026, 2:56am UTC](https://fortran-lang.discourse.group/t/do-concurrent-nvidia-gpu-offload-does-it-support-external-procedures/11087 "2026-09-08T02:56:59Z")

</div>

I’ve been experimenting with do concurrent and NVIDIA’s automatic GPU offload (nvfortran -stdpar=gpu), and I’ve run into a pattern that makes me think external module procedures called from a do concurrent construct aren…

---

## [PRIK: exposing non-TARGET Fortran arrays to C](https://fortran-lang.discourse.group/t/prik-exposing-non-target-fortran-arrays-to-c/11077)

<div class="topic-metadata">

**Author:** [@Said-H](https://fortran-lang.discourse.group/u/Said-H)\
**Replies:** 23\
**Last updated:** [September 2, 2026, 10:27pm UTC](https://fortran-lang.discourse.group/t/prik-exposing-non-target-fortran-arrays-to-c/11077 "2026-09-02T22:27:08Z")

</div>

I’ve been working on PRIK (Python Runtime Interop Kit), a tool that generates native Python bindings for Fortran and C, and I recently ran into an interesting Fortran interoperability question. Suppose an existing libra…

---

## [How to build dependencies for test program with fpm](https://fortran-lang.discourse.group/t/how-to-build-dependencies-for-test-program-with-fpm/11058)

<div class="topic-metadata">

**Author:** [@rwmsu](https://fortran-lang.discourse.group/u/rwmsu)\
**Replies:** 2\
**Last updated:** [August 21, 2026, 6:04am UTC](https://fortran-lang.discourse.group/t/how-to-build-dependencies-for-test-program-with-fpm/11058 "2026-08-21T06:04:46Z")

</div>

I’m trying to add fpm support for the HOHQMesh and FTObjectLibrary programs I reference in a previous thread. I have some fpm questions about how to set up and compile test and example programs that have local dependenci…

---

## [Ading stdlib as a dependency in fpm caused demo build to fail](https://fortran-lang.discourse.group/t/ading-stdlib-as-a-dependency-in-fpm-caused-demo-build-to-fail/11055)

<div class="topic-metadata">

**Author:** [@general\_rishkin](https://fortran-lang.discourse.group/u/general_rishkin)\
**Replies:** 1\
**Last updated:** [August 17, 2026, 10:52pm UTC](https://fortran-lang.discourse.group/t/ading-stdlib-as-a-dependency-in-fpm-caused-demo-build-to-fail/11055 "2026-08-17T22:52:19Z")

</div>

All I did was add stdlib as a dependency in fpm.toml and the example demo file failed to build and run. In fact, nothing builds successfully. Compilation reached 97% before failure: libstdlib.so …

---

## [Ported a C code to Fortran, etiquette around it?](https://fortran-lang.discourse.group/t/ported-a-c-code-to-fortran-etiquette-around-it/11052)

<div class="topic-metadata">

**Author:** [@jorgeg](https://fortran-lang.discourse.group/u/jorgeg)\
**Replies:** 4\
**Last updated:** [August 17, 2026, 11:26am UTC](https://fortran-lang.discourse.group/t/ported-a-c-code-to-fortran-etiquette-around-it/11052 "2026-08-17T11:26:56Z")

</div>

Hi all, over the weekend with the help of Claude I took a the libcint library for quantum chemistry whose main code is generated via a lisp script to produce Fortran instead of C. I did this mostly as an experiment to se…

---

## [Code compiles with nvfortran but fails with gfortran - derived type not recognized](https://fortran-lang.discourse.group/t/code-compiles-with-nvfortran-but-fails-with-gfortran-derived-type-not-recognized/11037)

<div class="topic-metadata">

**Author:** [@Shahid](https://fortran-lang.discourse.group/u/Shahid)\
**Replies:** 2\
**Last updated:** [August 6, 2026, 2:50pm UTC](https://fortran-lang.discourse.group/t/code-compiles-with-nvfortran-but-fails-with-gfortran-derived-type-not-recognized/11037 "2026-08-06T14:50:12Z")

</div>

I have a simple Fortran program with a derived type (TYPE). It compiles and runs perfectly with nvfortran, but gfortran gives me compilation errors about the derived type not being defined. module classmodule implicit n…

---

## [Ambiguous types message - correct?](https://fortran-lang.discourse.group/t/ambiguous-types-message-correct/11010)

<div class="topic-metadata">

**Author:** [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Replies:** 5\
**Last updated:** [July 22, 2026, 6:38am UTC](https://fortran-lang.discourse.group/t/ambiguous-types-message-correct/11010 "2026-07-22T06:38:45Z")

</div>

I am working on an interface for a rather larger C library and I encounter a problem with gfortran. The attached code is accepted by Intel Fortran oneAPI and Flang, but not by gfortran. I wonder whether my approach is co…

---

## [unable to link LAPACK routine from 19.1 to ifx 2025.3](https://fortran-lang.discourse.group/t/unable-to-link-lapack-routine-from-19-1-to-ifx-2025-3/11008)

<div class="topic-metadata">

**Author:** [@lamsonsh](https://fortran-lang.discourse.group/u/lamsonsh)\
**Replies:** 0\
**Last updated:** [July 20, 2026, 4:55pm UTC](https://fortran-lang.discourse.group/t/unable-to-link-lapack-routine-from-19-1-to-ifx-2025-3/11008 "2026-07-20T16:55:35Z")

</div>

Have used LAPACK roiutine in ifort 19.1 but unable to link them in in IFGX 2025.3 on Linux RH8. ifx -o p783 -I Includes -I . -I /pw/test/linux/intel/oneapi/2024.2/include/mkl/intel64/lp64 linux/Release/currentpath.o lin…

---

## [Fortran 90 debugger for MacOS Sonoma?](https://fortran-lang.discourse.group/t/fortran-90-debugger-for-macos-sonoma/8361)

<div class="topic-metadata">

**Author:** [@bredin54](https://fortran-lang.discourse.group/u/bredin54)\
**Replies:** 22\
**Last updated:** [June 26, 2026, 2:48pm UTC](https://fortran-lang.discourse.group/t/fortran-90-debugger-for-macos-sonoma/8361 "2026-06-26T14:48:25Z")

</div>

Hello, With VS Code, I can program, compile and execute my code in Fortran 90. Compile with a Makefile specific to the program + terminal then Execute via the terminal. or Compile and execute the programme with a butt…

---

## [Help in fixing the bug regarding xdp kind when used in a unique function](https://fortran-lang.discourse.group/t/help-in-fixing-the-bug-regarding-xdp-kind-when-used-in-a-unique-function/10981)

<div class="topic-metadata">

**Author:** [@Sinan](https://fortran-lang.discourse.group/u/Sinan)\
**Replies:** 4\
**Last updated:** [June 23, 2026, 6:48am UTC](https://fortran-lang.discourse.group/t/help-in-fixing-the-bug-regarding-xdp-kind-when-used-in-a-unique-function/10981 "2026-06-23T06:48:05Z")

</div>

Hi everyone, I’m working on an implementation for a unique function inside stdlib which returns unique values in an array. I implemented it and while testing, I am getting a bug for xdp kinds. I am giving a working ske…

---

## [Code Folding Support for fortls](https://fortran-lang.discourse.group/t/code-folding-support-for-fortls/10967)

<div class="topic-metadata">

**Author:** [@dgs](https://fortran-lang.discourse.group/u/dgs)\
**Replies:** 2\
**Last updated:** [June 15, 2026, 12:00pm UTC](https://fortran-lang.discourse.group/t/code-folding-support-for-fortls/10967 "2026-06-15T12:00:53Z")

</div>

Hi all, I recently implemented FoldingRange support for fortls, which enables code folding in VSCode (and other LSP clients, not tested though). The feature has already been tested on a large Fortran codebase and is av…

---

## [Using PyTorch in Fortran, which package to choose?](https://fortran-lang.discourse.group/t/using-pytorch-in-fortran-which-package-to-choose/10957)

<div class="topic-metadata">

**Author:** [@Albert](https://fortran-lang.discourse.group/u/Albert)\
**Replies:** 4\
**Last updated:** [June 9, 2026, 9:32pm UTC](https://fortran-lang.discourse.group/t/using-pytorch-in-fortran-which-package-to-choose/10957 "2026-06-09T21:32:55Z")

</div>

Hi all, I am extending an existing Fortran project with some machine learning routines. I was wondering if anyone has experience with existing Pytorch or Libtorch libraries for Fortran, such as FTORCH and TorchFort an…

---

## [Question about elemental procedures](https://fortran-lang.discourse.group/t/question-about-elemental-procedures/10950)

<div class="topic-metadata">

**Author:** [@RonShepard](https://fortran-lang.discourse.group/u/RonShepard)\
**Replies:** 10\
**Last updated:** [June 7, 2026, 1:16am UTC](https://fortran-lang.discourse.group/t/question-about-elemental-procedures/10950 "2026-06-07T01:16:06Z")

</div>

I have a question about elemental procedures. I’m not sure if this should be categorized as Help or as Language Enhancement. It could be either, or both. Look at this code: program elem implicit none integer :: …

---

## [Include fpm pkg-config libraries](https://fortran-lang.discourse.group/t/include-fpm-pkg-config-libraries/10932)

<div class="topic-metadata">

**Author:** [@egio](https://fortran-lang.discourse.group/u/egio)\
**Replies:** 2\
**Last updated:** [May 28, 2026, 8:14am UTC](https://fortran-lang.discourse.group/t/include-fpm-pkg-config-libraries/10932 "2026-05-28T08:14:12Z")

</div>

I have noticed that one can insert pkg-config calls in the flags in the fpm.toml like: imas.ifort.flags = “-vms -g $(pkg-config --cflags al-fortran xmllib)” imas.ifort.link-time-flags = " $(pkg-config --libs al-fortran …

---

## [ODE solvers and Autodiff](https://fortran-lang.discourse.group/t/ode-solvers-and-autodiff/10899)

<div class="topic-metadata">

**Author:** [@mcditoos](https://fortran-lang.discourse.group/u/mcditoos)\
**Replies:** 14\
**Last updated:** [May 27, 2026, 10:22pm UTC](https://fortran-lang.discourse.group/t/ode-solvers-and-autodiff/10899 "2026-05-27T22:22:15Z")

</div>

Hi, I’ve seen multiple discussions in the forum but they are all 3-5 years old (at least the ones I spotted). Do you guys have any recommendations for ODE solvers (anything close to DifferentialEquations.jl in performan…

---

## [Fpm conditional compilation](https://fortran-lang.discourse.group/t/fpm-conditional-compilation/10925)

<div class="topic-metadata">

**Author:** [@egio](https://fortran-lang.discourse.group/u/egio)\
**Replies:** 5\
**Last updated:** [May 24, 2026, 3:47pm UTC](https://fortran-lang.discourse.group/t/fpm-conditional-compilation/10925 "2026-05-24T15:47:04Z")

</div>

I’m trying some conditional compilation with fpm. I tried this approach but it doesn’t seem to work: I have the following tree: . ├── app │ └── main.f90 ├── fpm.toml ├── README.md └── src ├── iimas.f90 ├── lo…

---

## [Fortls bug with \`protected\` attribute?](https://fortran-lang.discourse.group/t/fortls-bug-with-protected-attribute/10917)

<div class="topic-metadata">

**Author:** [@Machalot](https://fortran-lang.discourse.group/u/Machalot)\
**Replies:** 3\
**Last updated:** [May 20, 2026, 4:56pm UTC](https://fortran-lang.discourse.group/t/fortls-bug-with-protected-attribute/10917 "2026-05-20T16:56:12Z")

</div>

I noticed the protected attribute seems to short-circuit the Fortran Language Server (fortls) when it provides hover text. Take the following example: module prot implicit none private real, public, dimens…

---

## [Transferring bits with different integer KINDs](https://fortran-lang.discourse.group/t/transferring-bits-with-different-integer-kinds/10909)

<div class="topic-metadata">

**Author:** [@RonShepard](https://fortran-lang.discourse.group/u/RonShepard)\
**Replies:** 18\
**Last updated:** [May 20, 2026, 3:09am UTC](https://fortran-lang.discourse.group/t/transferring-bits-with-different-integer-kinds/10909 "2026-05-20T03:09:54Z")

</div>

I have a question about how to transfer bits from one integer to another integer of a different kind. Let me use int64 and int32 as an example, but I would really like to know how to best do this for arbitrary integer ki…

---

## [Editors for Fortran development under Linux](https://fortran-lang.discourse.group/t/editors-for-fortran-development-under-linux/10867)

<div class="topic-metadata">

**Author:** [@Jcollins](https://fortran-lang.discourse.group/u/Jcollins)\
**Replies:** 53\
**Last updated:** [May 16, 2026, 9:48pm UTC](https://fortran-lang.discourse.group/t/editors-for-fortran-development-under-linux/10867 "2026-05-16T21:48:46Z")

</div>

Under Linux we use UltraEdit for Fortran development. It has syntax colouring, supports large number of open files and has all of the usual editing facilities including column format. But it crashes. Mean time between…

---

## [What automated code optimisations do people use or want?](https://fortran-lang.discourse.group/t/what-automated-code-optimisations-do-people-use-or-want/10905)

<div class="topic-metadata">

**Author:** [@Jcollins](https://fortran-lang.discourse.group/u/Jcollins)\
**Replies:** 1\
**Last updated:** [May 16, 2026, 12:44pm UTC](https://fortran-lang.discourse.group/t/what-automated-code-optimisations-do-people-use-or-want/10905 "2026-05-16T12:44:53Z")

</div>

The compiler-based software engineering tools - PlusFort, fpt, Codee etc. can make systematic changes to codes to provide optimisations for speed or maintainability. Some changes may also be made by AI tools. What auto…

---

## [Modern Fortran VSCode extension compatibility with Windsurf](https://fortran-lang.discourse.group/t/modern-fortran-vscode-extension-compatibility-with-windsurf/10904)

<div class="topic-metadata">

**Author:** [@Machalot](https://fortran-lang.discourse.group/u/Machalot)\
**Replies:** 0\
**Last updated:** [May 15, 2026, 7:02pm UTC](https://fortran-lang.discourse.group/t/modern-fortran-vscode-extension-compatibility-with-windsurf/10904 "2026-05-15T19:02:03Z")

</div>

I recently started a trial of Windsurf, which is a fork of VSCode that provides an integrated AI coding environment. It is compatible with most of the VSCode extensions I normally use. But Microsoft blocks their C/C++ …

---

## [Compiler support for one-trip do loops](https://fortran-lang.discourse.group/t/compiler-support-for-one-trip-do-loops/10889)

<div class="topic-metadata">

**Author:** [@rwmsu](https://fortran-lang.discourse.group/u/rwmsu)\
**Replies:** 17\
**Last updated:** [May 5, 2026, 4:50am UTC](https://fortran-lang.discourse.group/t/compiler-support-for-one-trip-do-loops/10889 "2026-05-05T04:50:45Z")

</div>

I’m trying to bring an old code circa 1975 that ran on an IBM system back to life and am battling a pesky seg fault. One thing I noticed is that one of the routine called occasionally has what in the old days would be a …

---

## [How lfortran finds subroutine in another file?](https://fortran-lang.discourse.group/t/how-lfortran-finds-subroutine-in-another-file/10775)

<div class="topic-metadata">

**Author:** [@Cean](https://fortran-lang.discourse.group/u/Cean)\
**Replies:** 107\
**Last updated:** [May 5, 2026, 4:49am UTC](https://fortran-lang.discourse.group/t/how-lfortran-finds-subroutine-in-another-file/10775 "2026-05-05T04:49:37Z")

</div>

Hi, I am playing with lFortran (ver 0.60) on an android phone within termux. Here is a simple code trying to call a sub in another file from the main file. But the main can’t find it. !lmain.f90 integer a,b,c a=1 b=…

---

## [Proper Usage of \`system\_clock\`](https://fortran-lang.discourse.group/t/proper-usage-of-system-clock/3245)

<div class="topic-metadata">

**Author:** [@everythingfunctional](https://fortran-lang.discourse.group/u/everythingfunctional)\
**Replies:** 23\
**Last updated:** [May 4, 2026, 6:54pm UTC](https://fortran-lang.discourse.group/t/proper-usage-of-system-clock/3245 "2026-05-04T18:54:21Z")

</div>

I thought I had figured out the correct usage for system\_clock, but now nagfor is giving me the following message. Questionable: example/expander/main.f90, line 23: Argument COUNT (no. 1) to intrinsic subroutine SYSTEM\_…

---

## [How to launch a coarray program on one cluster node with SLURM?](https://fortran-lang.discourse.group/t/how-to-launch-a-coarray-program-on-one-cluster-node-with-slurm/10876)

<div class="topic-metadata">

**Author:** [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Replies:** 6\
**Last updated:** [April 30, 2026, 7:00pm UTC](https://fortran-lang.discourse.group/t/how-to-launch-a-coarray-program-on-one-cluster-node-with-slurm/10876 "2026-04-30T19:00:04Z")

</div>

I am learning using coarrays on one node clusters, with typically 24 cores. I can make tests on an interactive machine with 10 bi-thread cores and it works fine with: $ module load intel/2024/compilers $ ifx -Ofast -coa…

---

## [Accessing derived-data type array components via pointers](https://fortran-lang.discourse.group/t/accessing-derived-data-type-array-components-via-pointers/10869)

<div class="topic-metadata">

**Author:** [@andris](https://fortran-lang.discourse.group/u/andris)\
**Replies:** 18\
**Last updated:** [April 27, 2026, 5:32pm UTC](https://fortran-lang.discourse.group/t/accessing-derived-data-type-array-components-via-pointers/10869 "2026-04-27T17:32:17Z")

</div>

Problem: Fortran’s OOP model makes it somewhat awkward to expose array components through accessor methods using pointers. Returning a pointer to an array component requires either the calling object to carry the target …

---

## [Is there a go-to code formatter for Fortran?](https://fortran-lang.discourse.group/t/is-there-a-go-to-code-formatter-for-fortran/9069)

<div class="topic-metadata">

**Author:** [@alvrogd](https://fortran-lang.discourse.group/u/alvrogd)\
**Replies:** 27\
**Last updated:** [April 27, 2026, 4:47pm UTC](https://fortran-lang.discourse.group/t/is-there-a-go-to-code-formatter-for-fortran/9069 "2026-04-27T16:47:56Z")

</div>

Hello Fortran community, We at Codee have observed that the Fortran ecosystem lacks a widely adopted code formatting tool. While options like fprettify are available, none seem to have achieved a widespread adoption com…

---

## [Zero iteration DO loop and OMP SIMD behavior](https://fortran-lang.discourse.group/t/zero-iteration-do-loop-and-omp-simd-behavior/8392)

<div class="topic-metadata">

**Author:** [@greenrongreen](https://fortran-lang.discourse.group/u/greenrongreen)\
**Replies:** 6\
**Last updated:** [April 24, 2026, 9:06pm UTC](https://fortran-lang.discourse.group/t/zero-iteration-do-loop-and-omp-simd-behavior/8392 "2026-04-24T21:06:03Z")

</div>

Consider this example of an interesting interaction of OMP SIMD and zero iteration DO loop: program foo implicit none integer(kind=4) :: i, j, me1, me2 me1 = 1 me2 = 1 i = me1 j = 42 !...dummy flag t…

[Next page](https://fortran-lang.discourse.group/c/help/5.md?page=1)
