Skip to content

ipqa-research/FortranCodespace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FortranCodespace

Pre-configured Codespace to work with Fortran codes used by the GTF group at IPQA.

Motivation

Sometimes getting a proper setup to run Fortran codes for a new learner can be problematic, here we made a template with the basics things that any new Modern Fortran project should have (and some extra things that we use on our research group)

Setting up the Codespace

To set up the Codespace on your account just click on "Open in a Codespace" from the "Use this template button". If you want to keep your developed codes for later it is better to select the "Create a repository" option. Setting up the Codespace can take several (even up to 15/20) minutes, this will happen only on the first time it is set up.


image

Running code

Once the Codespace is set up, run:

fpm run

in the terminal to run the example program defined in app/main.f90.

Extra programs can be created on the app directory and be run like

fpm run "your-file-name-here"

Debugging

This Codespace comes with three pre-configured debugging options:

image

  • (gdb) Launch: Debugs the app/main.f90 program
  • (gdb) Launch Example: Debugs the example/example.f90 program
  • (gdb) Launch Test: Debugs the currently open test file (that should be on the test directory)