Win32

A port of flux7 to Windows32 has been made. For this the Unix-like MSYS / MinGW (Minimal GNU for Windows) was used as a development environment. The graphics is done with the use of the GrWin Graphics Library, which contains a port of PGPLOT. Several adjustments have been made in the source of the flux7 package to program around the peculiarities of the Win32 / MSYS / MinGW system. ( such as changing the name of directory AUX to MISC, since Win32 does not allow the creation of a file or directory with name AUX ). The Win32 port has most of the functionality of the Unix version. For fityim and other auxiliary programs working in Unix or Linux is still much more comfortable and flexible than working in MinGW. The usage of program flux7 itself is identical in Win32 and Linux. Tests indicate that on Linux the program runs much faster. A job that took 80 s in Linux took 120 s in Win32 on the same computer.


What is needed?

MinGW

A Unix-like development environment for C, C++, and Fortran. Download the mingw installer from https://sourceforge.net/projects/mingw or https://osdn.net/projects/mingw

After downloading and installing, the mingw installer may be used to download the packages wanted, such as MinGW Base system, compiler suite, MSYS Base System et cetera.

MinGW-w64

An alternative to the MSYS/MinGW combination is the MSYS2/MinGW-w64 package,

see https://www.msys2.org

terminal emulator

If you don't like the terminal emulator supplied with MinGW, consider installing ConEmu from

https://conemu.github.io

After installation ConEmu lets you select a startup task. Choose MinGW bash.

GrWin

GrWin may be obtained from http://spdg1.sci.shizuoka.ac.jp/grwinlib/english/

Download the proper installer package GrWin....MinGW_gfortran.msi

The following applies to GrWin version 1.0.0. I have no experience with more recent versions.

After installation you may find bits and pieces all over the place:

 The program grwin.exe in C:\Program Files (x86)
 A directory with various data in C:\GrWin
  This is the directory PGPLOT_DIR
 PGPLOT and GrWin libraries in /MinGW/lib (libpgplot.a libGrWin.a)
 Some stuff in /MinGW/bin and /MingW/include

GrWin has the nasty habit of popping up a message window at the end of each page, asking ``Close window'' yes / no. In the previous flux version we got round this by omitting ``CALL PGEND'' in the Fortran program. With the new version of GrWin this trick does not work anymore. GrWin refuses to open a new window if the old one is not properly closed.

Another peculiarity happens when a program linked with the old GrWin version happens to open the new GrWin server. The graphics fails with:

WARNING: grwnd.exe is older than the linked GrWin library [0,9,9,9b].

This should of sourse be ``newer''. There is a way around that works for the time being:

 First open the old Grwin server: "grwnd &"
 Then run the program that contains graphic output
 When asked "Close window", say No.

Then again, this way of operating does not work with the new GrWin server. Needless to say that you can avoid all this mess by working in a Linux / Xwindows environment.

further installation

Open a MSYS window and in this window unpack the flux distribution. If necessary, edit file $FLUX/makedefs.mingw. Especially check the file locations specified in PGLIB.

Define environmental variables

 PGPLOT_DIR=/c/GrWin
 PGPLOT_DEV=/GW
 and, if you have not already done so:
 FLUX=<fully qualified path of directory FLUX7>.

Further proceed as in the normal Unix distribution, see the install page.


DOS to Unix file conversion

Files created by flux in Unix may be processed in Windows32 and vice versa, but in a few cases the different end-of-line sequences give problems.

To remove the annoying ^M, files created in Win32 may be converted by the following one-liner:

In bash or sh:

 tr -d '\r' < dos_filename > new_filename

Note in the above the characters '<' and '>' have to be typed :-)

One case where this is necessary is when flux output files made under MinGW are to be used as input files for program yimpu. In program yimp7 this problem does not occur.