Giter VIP home page Giter VIP logo

fortran_training's Introduction

What this repository is about?

This repository will cover the most features in Fortran.

stick to 3 advices:

  1. To get good at anything you have to practice every day, and eventually it'll be easier and fun.

  2. If you break the problem down into small exercises and lessons, and do them every day, you can learn to do almost anything. If you focus on slowly improving and enjoying the learning process, then you will benefit no matter how good you are at it.

  3. People hearing without listening.

Strive to 3 standards

  • Spend time on program design instead of getting a head start in coding first.
  • Code with modern Fortran features and fix previous bugs.
  • Polish this repository until it become well tested and useful subprograms.

Learn from curly selected project

Search from the recently updated Fortran program for inspiration.

  • OOP. Main newly added feature in Fortan 2003 standard
  • Coarray. Main newly added feature in Fortan 2008 standard
    • UCY-parallel-fortran
    • fortran2018-examples
  • Algorithms

Right way to begin with Fortran

gfortran is used in most times, nevertheless, Situation of using multiple compiler can also happen. As some Fortran features are not implemented in gfortran.

gfortran compiler wiki.

What's new in gfortran 8?

  • Fortran 2003
    • Parameterized derived types are now supported.
    • Transformational intrinsic are now fully supported in initialization expressions.
  • Fortran 2008
    • The maximum rank for arrays has been increased to 15.
  • Fortran 2018
    • TS18508: Partial support is provided for teams, which are hierarchical subsets of images that execute independently of other image subsets. ...
  • A new flag -std=f2018 is available.

Debug method

  • Debugging tools

    • gdb
  • Useful compiling options

    gfortran options

    -g -Wall -Wextra -Warray-temporaries -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan

Documentation for Fortran Project

Ford , which is written in Python, can be used to automatically generate documentation for Fortran projects.

Recommendation of People

fortran_training's People

Contributors

complicatedphenomenon avatar szaghi avatar

Watchers

 avatar  avatar

Forkers

kassabnova

fortran_training's Issues

What it means we have installed `forbear` ? If so, why we can't use it directly?

I have installed tools written by Fortran, take FoBiS.py and forbear for example,

FoBiS.py is a KISS tool for automatic building modern Fortran projects.
forbear is a KISS pure Fortran Library for building and running fancy progress bar.

The question is how to apply them to your own program, like using intrinsic module ISO_FORTRAN_ENV or ISO_C_BINDING. For the first time we see the effects brought by the tools via trying examples under test directory belongs to the tool repository. The question confused me is that how we let the compiler know we have already installed the package (toolbox)? I mean when we use the module(tool) from that package(toolbox), The gnu fortran compiler is aware of what we are doing

It is a right way building the project at level src.

wm@vampire:~/playground/example/forbear/src$ FoBiS.py build
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./tests/forbear_test.F90
Compiling ./third_party/FACE/src/lib/face.F90 ./lib/forbear_kinds.F90 serially
Compiling ./lib/forbear_element_object.F90 serially
Compiling ./lib/forbear_bar_object.F90 serially
Compiling ./lib/forbear.f90 serially
Compiling ./tests/forbear_test.F90 serially
Linking ./forbear_test
Target ./tests/forbear_test.F90 has been successfully built
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./third_party/FACE/src/tests/face_test_styles.f90
Compiling ./third_party/FACE/src/tests/face_test_styles.f90 serially
Linking ./face_test_styles
Target ./third_party/FACE/src/tests/face_test_styles.f90 has been successfully built
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./third_party/FACE/src/tests/face_test_ucs4.F90
Compiling ./third_party/FACE/src/tests/face_test_ucs4.F90 serially
Linking ./face_test_ucs4
Target ./third_party/FACE/src/tests/face_test_ucs4.F90 has been successfully built
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./third_party/FACE/src/tests/face_test_colors.f90
Compiling ./third_party/FACE/src/tests/face_test_colors.f90 serially
Linking ./face_test_colors
Target ./third_party/FACE/src/tests/face_test_colors.f90 has been successfully built
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./third_party/FACE/src/tests/face_test_basic.f90
Compiling ./third_party/FACE/src/tests/face_test_basic.f90 serially
Linking ./face_test_basic
Target ./third_party/FACE/src/tests/face_test_basic.f90 has been successfully built

Rather than test

wm@vampire:~/playground/example/forbear/src/tests$ FoBiS.py build 
Attention: the file './forbear_test.F90' depends on 'forbear' that is unreachable
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./forbear_test.F90
Compiling ./forbear_test.F90 serially
./forbear_test.F90:6:4:

 use forbear, only : bar_object, UCS4
    1
Fatal Error: Can't open module file ‘forbear.mod’ for reading at (1): No such file or directory
compilation terminated.

./forbear_test.F90:6:4:

 use forbear, only : bar_object, UCS4
    1
Fatal Error: Can't open module file ‘forbear.mod’ for reading at (1): No such file or directory
compilation terminated.

That's because we need to compile the module before using it, making sure the compiler know where the module is .

Go to Top

But we definately don't want to put our program under the pakage repository to ensure everthing in need is there when we compile our program

wm@vampire:~/playground/example/forbear/src$ ls tests/
forbear_test.F90  test.f90
wm@vampire:~/playground/example/forbear/src$ FoBiS.py build
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./tests/test.f90
Compiling ./tests/test.f90 serially
Linking ./test
Target ./tests/test.f90 has been successfully built
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./tests/forbear_test.F90
Compiling ./tests/forbear_test.F90 serially
Linking ./forbear_test
Target ./tests/forbear_test.F90 has been successfully built
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./third_party/FACE/src/tests/face_test_styles.f90
Compiling ./third_party/FACE/src/tests/face_test_styles.f90 serially
Linking ./face_test_styles
Target ./third_party/FACE/src/tests/face_test_styles.f90 has been successfully built
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./third_party/FACE/src/tests/face_test_ucs4.F90
Compiling ./third_party/FACE/src/tests/face_test_ucs4.F90 serially
Linking ./face_test_ucs4
Target ./third_party/FACE/src/tests/face_test_ucs4.F90 has been successfully built
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./third_party/FACE/src/tests/face_test_colors.f90
Compiling ./third_party/FACE/src/tests/face_test_colors.f90 serially
Linking ./face_test_colors
Target ./third_party/FACE/src/tests/face_test_colors.f90 has been successfully built
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./third_party/FACE/src/tests/face_test_basic.f90
Compiling ./third_party/FACE/src/tests/face_test_basic.f90 serially
Linking ./face_test_basic
Target ./third_party/FACE/src/tests/face_test_basic.f90 has been successfully built
wm@vampire:~/playground/example/forbear/src$ ls
face_test_basic  face_test_colors  face_test_styles  face_test_ucs4  forbear_test  lib  mod  obj  test  tests  third_party
wm@vampire:~/playground/example/forbear/src$ ./test
progress |++++++++++++++++++++++++++++++++| 100%

By the way @szaghi, you mispelled a word in the test program A Taste of forbear. It's suffix_string='| not suffi_stringx='|

From the experience of installing packages in an integrated way, by means of pip.

the python installer that search into the PyPI (Python Package Index) for packages and automatically install them (and their dependencies).

We don't need to worry how the Python interpreter know what the third party package is, once installed, we can use it immediately.

So how can we use the package once and for all?

Go to Top

Test forbear

Test forbear for inexperienced guy.

manually download and build

download

To download all the available releases and utilities (fobos, license, readme, etc...), it can be convenient to clone whole the project:

git clone https://github.com/szaghi/forbear
cd forbear
git submodule update --init

Alternatively, you can directly download a release from GitHub server, see the ChangeLog.

build

The most easy way to compile forbear is to use FoBiS.py within the provided fobos file.

Consequently, it is strongly encouraged to install FoBiS.py.

| Build by means of FoBiS | Build by means of GNU Make | Build by means of CMake |


build by means of FoBiS

FoBiS.py is a KISS tool for automatic building of modern Fortran projects. Providing very few options, FoBiS.py is able to build almost automatically complex Fortran projects with cumbersome inter-modules dependency. This removes the necessity to write complex makefile. Moreover, providing a very simple options file (in the FoBiS.py nomenclature indicated as fobos file) FoBiS.py can substitute the (ab)use of makefile for other project stuffs (build documentations, make project archive, etc...). forbear is shipped with a fobos file that can build the library in both static and shared forms and also build the Test_Driver program. The provided fobos file has several building modes.

listing fobos building modes

Typing:

FoBiS.py build -lmodes

the following message should be printed:

The fobos file defines the following modes:
 - "shared-gnu"
  - "static-gnu"
  - "test-driver-gnu"
  - "shared-gnu-debug"
  - "static-gnu-debug"
  - "test-driver-gnu-debug"
  - "shared-intel"
  - "static-intel"
  - "test-driver-intel"
  - "shared-intel-debug"
  - "static-intel-debug"
  - "test-driver-intel-debug"

The modes should be self-explicative: shared, static and test-driver are the modes for building (in release, optimized form) the shared and static versions of the library and the Test Driver program, respectively. The other 3 modes are the same, but in debug form instead of release one. -gnu use the GNU gfortran compiler while -intel the Intel one.

building the library

The shared or static directories are created accordingly to the form of the library built. The compiled objects and mod files are placed inside this directory, as well as the linked library.

release shared library
FoBiS.py build -mode shared-gnu
release static library
FoBiS.py build -mode static-gnu
debug shared library
FoBiS.py build -mode shared-gnu-debug
debug static library
FoBiS.py build -mode static-gnu-debug

After this procedure, then you need to build the project to show the effect of forbear

wm@vampire:~/playground/example/forbear$ FoBiS.py build
Builder options
  Directories
    Building directory: "shared"
    Compiled-objects .o   directory: "shared/obj"
    Compiled-objects .mod directory: "shared/mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-cpp -c -fPIC -frealloc-lhs -O3 -DUCS4_SUPPORTED -DASCII_SUPPORTED"
    Linking flags: "-shared -O3"
    Preprocessing flags: "-DUCS4_SUPPORTED -DASCII_SUPPORTED"
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building src/lib/forbear.f90
Nothing to compile, all objects are up-to-date
Linking shared/libforbear.so
Target src/lib/forbear.f90 has been successfully built

Wrong place to build

wm@vampire:~/playground/Fortran/exercise/fobis$ FoBiS.py build
Attention: the file './FXNqq.f90' depends on 'juicy.m' that is unreachable
Building ./CT14Pdf.for
Compiling ./CT14Pdf.for serially
Warning: compiling file ./CT14Pdf.for fails! Removing from the list of non-module libraries linked into the target!
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "intel"
    Compiler command: "ifort"
    Module directory switch: "-module"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./MAINqq.f90
Compiling ./FXNqq.f90 ./MC_VEGAS.f90 serially
/bin/sh: 1: ifort: not found

/bin/sh: 1: ifort: not found

/bin/sh: 1: ifort: not found
/bin/sh: 1: ifort: not found

The promotion seems familiar

Aside, I just see that the default behavior of FoBiS is to try to use Intel Fortran: in the next release I will change it making GNU the default one.

So I update my FoBis.py

git pull
cd release/FoBiS-master/ 
sudo -H python setup.py install

P.S

usage: FoBiS.py build [-h] [-compiler {gnu,intel,g95,opencoarrays-gnu,custom}]
                      [-fc FC] [-cflags CFLAGS] [-lflags LFLAGS]
                      [-modsw MODSW] [-mpi] [-openmp] [-coarray] [-coverage]
                      [-profile] [-mklib {static,shared}] [-ch] [-tb]
                      [-s SRC [SRC ...]] [-dbld BUILD_DIR] [-dobj OBJ_DIR]
                      [-dmod MOD_DIR] [-dlib LIB_DIR [LIB_DIR ...]]
                      [-i INCLUDE [INCLUDE ...]]
                      [-ed EXCLUDE_DIRS [EXCLUDE_DIRS ...]] [-drs] [-t TARGET]
                      [-o OUTPUT] [-e EXCLUDE [EXCLUDE ...]]
                      [-libs LIBS [LIBS ...]] [-vlibs VLIBS [VLIBS ...]]
                      [-ext_libs EXT_LIBS [EXT_LIBS ...]]
                      [-ext_vlibs EXT_VLIBS [EXT_VLIBS ...]]
                      [-dependon DEPENDON [DEPENDON ...]] [-inc INC [INC ...]]
                      [-extensions EXTENSIONS [EXTENSIONS ...]] [-build_all]
                      [-f FOBOS] [-fci] [-mode MODE] [-lmodes]
                      [--print_fobos_template] [-preprocessor [PREPROCESSOR]]
                      [-p PREPROC] [-dpp PREPROCESSOR_DIR]
                      [-epp PREPROCESSOR_EXT [PREPROCESSOR_EXT ...]]
                      [-force_compile] [-colors] [-l] [-graph] [-q] [-verbose]
                      [-j JOBS] [-m MAKEFILE_name]

Now the default compiler becomes gnu.

Then I build again

wm@vampire:~/playground/Fortran/exercise/fobis$ FoBiS.py build
Attention: the file './FXNqq.f90' depends on 'juicy.m' that is unreachable
Building ./CT14Pdf.for
Compiling ./CT14Pdf.for serially
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./MAINqq.f90
Compiling ./FXNqq.f90 ./MC_VEGAS.f90 serially
Compiling ./MAINqq.f90 serially
Linking ./MAINqq
Target ./MAINqq.f90 has been successfully built

Run the executable file ./mainqq , it works well, and show me the power of FoBiS,py, it's really convenient to make you get rid of writing MAKEFILE.
Then back to the question at the beginning, show how forbear works.

wm@vampire:~/playground/example/forbear/src$ FoBiS.py build
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./tests/forbear_test.F90
Compiling ./third_party/FACE/src/lib/face.F90 ./lib/forbear_kinds.F90 serially
Compiling ./lib/forbear_element_object.F90 serially
Compiling ./lib/forbear_bar_object.F90 serially
Compiling ./lib/forbear.f90 serially
Compiling ./tests/forbear_test.F90 serially
Linking ./forbear_test
Target ./tests/forbear_test.F90 has been successfully built
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./third_party/FACE/src/tests/face_test_styles.f90
Compiling ./third_party/FACE/src/tests/face_test_styles.f90 serially
Linking ./face_test_styles
Target ./third_party/FACE/src/tests/face_test_styles.f90 has been successfully built
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./third_party/FACE/src/tests/face_test_ucs4.F90
Compiling ./third_party/FACE/src/tests/face_test_ucs4.F90 serially
Linking ./face_test_ucs4
Target ./third_party/FACE/src/tests/face_test_ucs4.F90 has been successfully built
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./third_party/FACE/src/tests/face_test_colors.f90
Compiling ./third_party/FACE/src/tests/face_test_colors.f90 serially
Linking ./face_test_colors
Target ./third_party/FACE/src/tests/face_test_colors.f90 has been successfully built
Builder options
  Directories
    Building directory: "."
    Compiled-objects .o   directory: "obj"
    Compiled-objects .mod directory: "mod"
  Compiler options
    Vendor: "gnu"
    Compiler command: "gfortran"
    Module directory switch: "-J"
    Compiling flags: "-c"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  Preprocessor used: None
  Preprocessor output directory: None
  Preprocessor extensions processed: []

Building ./third_party/FACE/src/tests/face_test_basic.f90
Compiling ./third_party/FACE/src/tests/face_test_basic.f90 serially
Linking ./face_test_basic
Target ./third_party/FACE/src/tests/face_test_basic.f90 has been successfully built

Done!

Unsolicited advice for new Fortraner

Daer @complicatephenomenon ,

It seems that you are learning Fortran programming language (if not, please forgive me). This language is, in my opinion, the best one for formula translation: I am focused on math/physics thus programming is tool not the aim. Fortran allows to achieve clearness, conciseness, portability and efficiency even to not expert programmers like me. You can achieve most of the same goals with C, but you have to be a very good expert programmer distracting your self from math/physics... You can achieve clearness and conciseness in Python, but you have to say good bye to performance... You can achieve the same goals with Julia, but it is a very young programming language compared to Fortran that is still playing after 60 years. This boring introduction is devoted to only convey the idea that Fortran is really a good option for mathematicians and physicists, please consider it even the first approach could seem frustrating.

I am giving such an unsolicited advice because reading your Fortran repositories I see that you are using a strange mixture of old concepts (Fortran born in 1954...) and modern ones. If you a new Fortraner (as I hope), you should learn the so called modern Fortran (no worries, Fortran is essentially bacward compatible, it is highly probable that you can successful compile/ran code of 50 years ago with modern compilers): modern Fortran allows for a lot of modern programming style that help your daily programming life, e.g. OOP, allocatable, modularization, abstraction! This is not our parents Fortran, Fortran could be modern as much as Python (not as fancy, but quite friendly). In the meanwhile Fortran retains its main advantage, it is really efficient, the fastest in the west. So, this is the unsolicited advice:

start learning modern Fortran not the Fortran of our parents.

With modern Fortran you can focus on what counts, math/physics, e.g.

https://github.com/Fortran-FOSS-Programmers/FOODIE

https://github.com/Fortran-FOSS-Programmers/FOODIE/wiki/High-Level-Programming

https://github.com/Fortran-FOSS-Programmers/WenOOF

https://github.com/francescosalvadore/openpde

https://github.com/szaghi/FORESEER

https://github.com/szaghi/OFF/tree/testing

There are many books that are a good starting point, let me know it you are interested and let me know if you like to join our Fortran group where interesting discussion about fortran are usual.

Good luck!

My best regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.