Fortran Compilers

In order to use the Poisson-Drift-diffusion solver, it will be necessary to have a suitable fortran compiler installed and correctly configured in your system. After that, you do not need to worry about the compilation process: it is done automatically by the installation script.

Linux

Most linux systems have a Fortran compiler already installed, typically part of GCC, the GNU compiler collection. If not, you will need to check how to install it for your particular linux distribution.

Mac OS X

For Mac OS X we have used the gfortran compiler installed together with GCC using Homebrew, a MacOS package manager.

brew install gcc

Other package managers like MacPorts or Fink might also work, but we have not tried.

Windows

To get a Fortran compiler properly working under Windows with F2Py, we have followed the detailed instructions written by Michael Hirsch. Read Michael Hirsch’s instructions in full for a complete picture, but the important bits are:

  1. Install MSYS2 and MinGW

    Follow the instructions there to update all packages and to setup your environment.

  2. Install the fortran compiler executing from the PowerShell:

    pacman -S mingw-w64-x86_64-gcc-fortran
    
  3. Tell Python to use MinGW: create file ~/pydistutils.cfg containing:

    [build]
    compiler=mingw32
    

    You can do this executing in the PowerShell

    echo "[build]`ncompiler=mingw32" | Out-File -Encoding ASCII ~/pydistutils.cfg
    

And that should be it. With this, your will be able to call the gfortran compiler from the Windows terminal and also the Solcore installer should be able to find it. You can try installing Solcore itself or with the lowtran package described in the instructions by Michael Hirsch.