Fortran namelist is a I/O method introduced in Fortran 77. It later became a standard in Fortran 90. It allows to read/write data as a dictionary like in plain text files. See below for a simple example: Derived types are user defined types. They extend the basic types REAL, INTEGER and LOGICAL. They can be…

read more

Perf is a tool used to profile any code in Linux. By following the steps below, you will manage to profile your Fortran binary. It will only provide a simple overview of each function and how much time is spent there. However, this can be your first steps towards improving the execution time of your…

read more

Derived types are User-defined data types that allows to create complex data structures. It is defined with the TYPE statement. In addition, two different derived types exists: The use of PDT’s derived types can be useful in several ways: Its use allows to parametrize the following properties of an array: User types can be parametrized…

read more

Among several things, pointers can be used to represent an array from a specific shape into another one. It can be useful for certain situations. However, the use of pointers is generally not recommended. This is due to potential memory management risks. For instance, It is important to keep the same size when remapping arrays…

read more

Overloading a subroutine means to redefine its internal functionality for a customized behavior. Overall it adapts the class new characteristics to already wide-spread Fortran functionalities (==, =, + ,-, …). Specifically, this post only focus on the operators (+,-,*,/). In the following example, mynumber is generic class to hold any type of an integer number.…

read more

Valgrind is tool to analyze the memory on an application at runtime. For instance, It helps in the discovery memory issues. If it is not the case then random errors and/or behaviors might start showing up. It can be the case when working with pointers as they allow to do several tricks. Which it could…

read more