Tuesday, September 27, 2016

Installing the gfortran compiler in Windows

The gfortran compiler is part of the GNU Compiler Collection (GCC). The first steps of creating a free and open source compiler were back in 2000. Starting from 2005 the compiler was stable enough to use it for production. Gfortran compiler supports the following variation of Fortran language:

  • Fortran 77 (Partial)
  • Fortran 95 
  • Fortran 2003
  • Fortran 2008 (Partial)

It is true that most people nowadays are running Windows, making it hard to use Unix-like tools in this environment. Fortunately, there is the Cygwin, a software package that provides the Unix-like environment and tools, including the FORTRAN and C compilers, in windows for free. I created these instructions for installing gfortran in windows.

The first step is to download the Cygwin installation from the site: cygwin.com/install.html. Depending on your operating system you can choose between 32 or 64bit. If you are not sure, try firstly the  64bit version and if it fails to start, use the 32bit.


Cygwin download page of the site.
Cygwin download page of the site.

After downloading the file you should execute it. Windows will complain that the binary is not verified, but you can safely ignore the message:

Warning windows message for unknown publisher
Warning windows message for unknown publisher. You can ignore it.

During the installation, the installer will ask you which server should use. Select one random. If you think it is slow, try to select something different. In the next important step, the installer will ask you about the packages to be downloaded. To select the FORTRAN compiler, go to "Devel" subtree and select the following packages: gcc-core, gcc-fortran, gdb.

Package selection of the Cygwin framework.
Package selection of the Cygwin framework.

Package selection of the Cygwin framework.
Selected GCC and Gfortran compilers.

In the next step, the installer will calculate the dependencies and it will suggest installing missing libraries and utilities:

Cygwin setup automatically calculated and installs the dependencies.
Cygwin setup automatically calculated and installs the dependencies.

The installation can take from few minutes up to an hour depending on the internet connection and the traffic on the selected server.

Installation process of the Cygwin
Installation process of the Cygwin

After installing the tools, you should check the options to create the desktop icon in both Desktop and start-menu. In your desktop you should have an icon with the title "Cygwin64 Terminal" or something similar, depending if you are using the 64 or 32bit version of tools.


After starting the terminal, you can go to your directory and compile your FORTRAN program. In my case, I had the source code in d:\fortran, so I went there and compile it, as you can see in the picture. I personally use the Notepad++ one of the best free editors you can find.

Compiling and executing a FORTRAN application in Cygwin using Notepad++ as an editor.
Compiling and executing a FORTRAN application in Cygwin using Notepad++ as an editor.

Installing gfortran on MAC. 


For installing the gfortran compiler in the MAC, the compiler team provides compilers on their site. You can visit gcc.gnu.org/wiki/GFortranBinaries and check the MacOS section. You should know what version of OS is installed on your machine.

MacOS installation packges for gfortran.
MacOS installation packges for gfortran.



Thursday, September 8, 2016

Nafpaktos

Nafpaktos or Naupactus (Ναύπακτος in Greek) is a small town in Aetolia-Acarnania, West Greece, Greece. It has around 31000 residents and it is very popular during the summer due to the beaches around. Last month i visited the town for a wedding. I enjoyed the sun and the sea of the area. The water is not so hot as in Cyprus or Rhodes. Even the nights the temperature was perfect and it was easy to sleep. Comming from a steady 32-34*C from Nicosia during the night, the change was perfect!

We didn't have time to visit the fortress (there is a nice view of the port and the town), but we managed to walk a bit on the beach and enjoy the sea. Here you can find some photos taken from Nafpaktos.

The entrance of the port with teenagers falling from the stone wall, in Nafpaktos, Greece.
The entrance of the port with teenagers falling from the stone wall, in Nafpaktos, Greece.

The stone wall of the port and the fortress on the hill behind in Nafpaktos, Greece.
The stone wall of the port and the fortress on the hill behind in Nafpaktos, Greece.
The stone wall of the port with the cannons in Nafpaktos, Greece.
The stone wall of the port with the cannons in Nafpaktos, Greece.
At the entry of the port in Nafpaktos, Greece.
At the entry of the port in Nafpaktos, Greece.

View of the Peloponnese from Nafpaktos, Greece.
View of the Peloponnese from Nafpaktos, Greece. Notice the small waves, it was a bit windy when we visited Nafpaktos.
Rio–Antirrio bridge view from Peloponnese.
Rio–Antirrio bridge view from Peloponnese



Friday, September 2, 2016

PROTEAS: Solar Research Facility

Proteas is a solar facility locate in Pentakomo, in the southern part of the island of Cyprus. The facility launched on 3rd October 2015 and it is currently used for scientific purposes. Some days ago we were lucky to attend a tour from the Cyprus institute researchers on the facility and have a close look at the installation. I include some photos from our visit.

The facility is actually a Concentrated Solar Power and thermal De-Salination of Sea Water. Mirrors reflect the solar rays to a specific point in the tower. It is designed to use molten salt, although it is still not operational. You can find more information regarding The Cyprus Institute and Proteras here

Reflecting mirrors at the Proteras solar facility in Cyprus.
Reflecting mirrors at the Proteras solar facility in Cyprus.

Solar tower of the Proteras solar facility in Cyprus. The white block at the top is used for calibrating and measurements, as it contains multiple temperature sensors.
Solar tower of the Proteras solar facility in Cyprus. The white block at the top is used for calibrating and measurements, as it contains multiple temperature sensors. Due to a small accident last week, more than one array was concentrated in the area, making it burn. Not operating at the moment we took the picture.

The control room of the Proteas Solar facility in Cyprus
The control room of the Proteas Solar facility in Cyprus. You have full control of the mirrors, operation of the machines, and multiple cameras for checking the situation outside.

Pump of molten salt in the Proteas solar facility in Cyprus.
Pump of molten salt in the Proteas solar facility in Cyprus.

Concentration area of solar rays in the Proteas solar facility in Cyprus.

Concentration area without the protective lid of solar rays in the Proteas solar facility in Cyprus.
Concentration area without the protective lid of solar rays in the Proteas solar facility in Cyprus.

Sensors of the facility in the Proteas solar facility in Cyprus
Sensors of the facility in the Proteas solar facility in Cyprus.
De-Salination machine in the Proteas solar facility in Cyprus.
De-Salination machine in the Proteas solar facility in Cyprus. Not active when we visit the facility. Can produce some 10s liters per day, ideal for using it for cleaning the reflecting mirrors.
View of the beach, back side of the Protes Solar facility/