Sam Gratrix - 23 December 2001
Here are some notes and files to get a basic environment for Auto 97 in Windows. It not complete and differs slightly from the Unix environment. This has been developed using Windows 95/Me/NT/2000. I would expect it to work ok with Windows 98. These notes will be quite brief and I assume that you are familiar with Auto 97, Windows and Unix. Finally check back often! I will probably be updating and fixing things here as I get to use Auto more and extend the Windows environment.
Warning! I'm new to Auto and Fortran.
The Windows environment is based around either the Fortran compiler Salford FTN77 from Salford Software (I use the Free for Non-Commercial Use version Salford FTN77 Personal Edition), or Cygnus Cygwin G77 Fortran compiler from Cygnus Solutions. I use some of the unix-like tools/utilities supplied with the Cygnus Cygwin environment (e.g. grep) when Windows does not provide such functionality.
I have problems with both compilers. It appears that FTN77 does not like Windows Me, I keep blue screening with the (stack?) error 0E:0028:C00584D5. The same code runs fine on 95/NT/2000 however (not tried 98). G77 gives a few errors when compiling the Auto 97 source, but I think these can be ignored (I am no Fortran expert). I sometimes get Status Access Violation crashes with G77 on Me/2000 (not tried 95/98/NT). FTN77 seems to run faster than G77. I recommend using NT/2000 with the FTN77 compiler.
Assuming that the compiler was installed to C:\Progra~1\Salford make sure the following is added to the Path:
and that the Environment Variable:
is set. I found it necessary to use the short DOS names. To do all this in NT/2000 bring up the Control Panel go into System and select Environment Variables. For Windows 95/98/Me edit autoexec.bat.
Assuming that Cygwin was installed to C:\Progra~1\Cygnus make sure the following is added to the Path:
Note in NT/2000 you need to be logged in as Administrator. To do all this in NT/2000 bring up the Control Panel go into System and select Environment Variables. For Windows 95/98/Me edit autoexec.bat.
You should obtain the Unix version of Auto 97, for the original source, the manual, credits, etc. It is available at the Auto web site http://indy.cs.concordia.ca/auto/. The Windows version I have put together is here http://gratrix.net/auto/Auto97.rar. To install WinAuto97 extract the RAR archive. Once this is complete you need to set the Environment Variable:
Assuming it was installed to C:\AUTO97. I think it would be best to avoid long filenames. Also add the following to the Path:
For Windows 95/98/Me users its time to reboot so that the above settings take effect. Now navigate to the C:\AUTO97\SRC folder and run compile_ftn77.bat or compile_g77.bat depending on your choice of compiler to build the Auto object files.
There is no plot program and no GUI to enter the parameters for Auto. Therefore Auto must be run from command line or via a batch file using the @ commands. However, since the @ does not to work very well in Windows all occurrences of @ have been replaced with #. I.e. use #r file to run Auto rather than @r file, #sv to save, #cp to copy, etc. Not all of the commands have been implemented yet and I have only looked at few demos. I'll add more things over time, check back!
I have extended the functionality of #mv, #dl and #cp. These commands now may take 3 arguments: #mv r xxx yyy will rename r.xxx to r.yyy, #mv pqd xxx yyy will rename the 3 files p/q/d.xxx to p/q/d.yyy, and finally, #mv rpqd xxx yyy will rename the 4 files r/p/q/d.xxx to r/p/d/q.yyy. Similarly for #dl and #cp. I have added the command #ex which will bring an instance of Windows Explorer for the current directory.
I have modified the source code of autlib1.f slightly. I have altered it so that the timing function is not used (etime is not implemented in FTN77, it is however in G77). I have also changed some of the output lines to use a three digit exponent. This is just to avoid numbers written in the form 3.151117+123 (now it will be 3.151117+E123) as this can cause problems when importing the output data into other programs.
I have increased the constant NDIMX in auto.h from the default 12 to 32, and the constant NTSTX in fcon.h from the default 5000 to 15000. To decrease memory usage these values can be reduced, but with todays computers these values do not seem to be a problem. The maximum stack allocation (FTN) has been increased for fcon to accommodate the value of NTSTX. To alter stack size edit #fc.bat and #fx.bat in cmds.
A new command #fx has been added, which provides for a more flexiable use of #fc. Type #fx aaa bbb ccc ddd to convert user data aaa.txt using constants file r.bbb and fortan code ccc.f to the auto data file ddd.dat. Type #fx aaa bbb ccc to convert user data aaa.txt using constants file r.bbb and fortan code ccc.f to the auto data file aaa.dat.
An alternative format for the Auto constants file r.xxx is now provided, namely s.xxx. The command #ac xxx will convert s.xxx to r.xxx ready for use in Auto. Below in an example of the alternative format.
6.2.1 System dimension : NDIM. 5 6.8.6 Problem type, eg ODE FP=1, PO=2. : IPS.. 2 6.8.5 Computation restart label. 0=New problem, >0=Label. : IRS.. 1 6.8.1 Fold detection. 0=False, 1=True. : ILP.. 1 6.7 Number of free parameters. : NICP. 2 Parameters (array all on one line) : ICP.. 1 11 6.3.1 Mesh intervals. : NTST. 30 6.3.2 Collocation points. 2<=NCOL<=7. : NCOL. 4 6.3.3 Mesh Adaption. 0=Fixed, >0=Adapt evey IAD steps. : IAD.. 3 6.8.2 Detection of branch. : ISP.. 2 6.8.3 Branch switching. : ISW.. 1 6.9.3 Definition of principal solution measure : IPLT. 0 6.2.2 Number of boundary conditions in BCND(). : NBC.. 0 6.2.3 Number of integral conditions in ICND(). : NINT. 0 6.6.1 Max number of steps along any branch. : NMX.. 100 6.6.2 Lower bound on principle continuation param. : RL0.. 0.0290 6.6.3 Upper bound on principle continuation param. : RL1.. 0.0310 6.6.4 Lower bound on principle solution measure. : A0... -1.e+10 6.6.5 Upper bound on principle solution measure. : A1... 1.e+10 6.9.1 Ouput every NPR steps. 0=No such output. : NPR.. 25 6.8.4 Max bifs to treat (algebraic only). +/-=Both/One dir. : MXBF. 10 6.9.2 Diagnostic output 0=Minimal, 5=Extensive. : IID.. 2 6.4.4 Max iteration used in location of special points. : ITMX. 8 6.4.6 Max number of Newton-Chord iterations. : ITNW. 7 6.4.5 Freeze Jacobian after NWTN iterations. : NWTN. 3 6.2.4 User supplied derivatives. 0=False, 1=True. : JAC.. 0 6.4.1 Relative convergence criterion for eqn params. : EPSL. 1e-006 6.4.2 Relative convergence criterion for sol cmpts. : EPSU. 1e-007 6.4.3 Relative convergence criterion for special sols. : EPSS. 0.001 6.5.1 Pseudo-arclength step. Sign determines direction. : DS... 0.01 6.5.2 Minimum value of |DS|. : DSMIN 0.001 6.5.3 Maximum value of |DS|. : DSMAX 0.01 6.5.4 Adapt step size every IADS step. 0=Fixed step. : IADS. 1 6.5.5 Number of parameters to modify weight of. : NTHL. 1 Enter 1 parameter number / weight pair per line : THL.. 11 0 6.5.6 Number of state variables to modify weight of. : NTHU. 0 Enter 1 state variables number / weight pair per line : THU.. 0 0 6.9.4 Number of param vals to write label and restart info. : NUZR. 2 Enter 1 parameter number / value pair per line : UZR.. 1 0.029 Enter 1 parameter number / value pair per line : UZR.. 1 0.030
To run the demo enter into the folder %AUTO_DIR%\demos\abc and run the batch file go. This may be done via the command line or by clicking it in a file window. The 3 files p/d/q.abc contain the output of the 3 runs joined together. A file called report.txt is created also and contains things like compiler messages and should be checked. The printed output may be saved to file by running go > output.txt from the command line. Finally the abc folder may be restored to its original form by running clean. It is best to clean demo folders before rerunning.
The batch file for this demo is as follows:
@echo off echo Title.. abc 1 : Stationary Solution Branch With Hopf Bifurcations call #cp r abc.1 abc call #r abc call #sv abc echo Title.. abc 2 : Periodic Solution Branch From First Hopf call #cp r abc.2 abc call #r abc call #ap abc echo Title.. abc 3 : Periodic Solution Branch From Second Hopf call #cp r abc.3 abc call #r abc call #ap abc call #dl r abc call #cl
Here is the Output:
Title.. abc 1 : Stationary Solution Branch With Hopf Bifurcations Copy... r.abc.1 to r.abc Compile [FTN77] abc Link... [FTN77] abc Execute abc BR PT TY LAB PAR(1) L2-NORM U(1) U(2) U(3) 1 1 EP 1 0.000000E+000 0.000000E+000 0.000000E+000 0.000000E+000 0.000000E+000 1 63 HB 2 2.041845E-001 2.105114E+000 5.877534E-001 5.560426E-001 1.943417E+000 1 77 HB 3 2.298358E-001 3.040378E+000 7.991387E-001 6.894224E-001 2.851310E+000 1 93 HB 4 2.599570E-001 4.032304E+000 9.261152E-001 6.168412E-001 3.875731E+000 1 110 HB 5 3.462084E-001 5.579465E+000 9.881772E-001 2.275183E-001 5.486545E+000 1 112 EP 6 4.010155E-001 5.760116E+000 9.914876E-001 1.752047E-001 5.671437E+000 Total Time 0.000E+00 Save... fort.7/8/9 as p/q/d.abc Title.. abc 2 : Periodic Solution Branch From First Hopf Copy... r.abc.2 to r.abc Compile [FTN77] abc Link... [FTN77] abc Execute abc BR PT TY LAB PAR(1) L2-NORM MAX U(1) MAX U(2) MAX U(3) PERIOD 2 53 LP 7 2.1369E-001 3.1511E+000 9.5507E-001 7.8267E-001 4.6038E+000 7.6110E+000 2 72 LP 8 2.1190E-001 3.7172E+000 9.9458E-001 7.8689E-001 6.7626E+000 8.2891E+000 2 175 EP 9 3.4449E-001 5.5663E+000 9.9122E-001 2.7470E-001 5.7922E+000 2.9431E+000 Total Time 0.000E+00 Append. fort.7/8/9 to p/q/d.abc Title.. abc 3 : Periodic Solution Branch From Second Hopf Copy... r.abc.3 to r.abc Compile [FTN77] abc Link... [FTN77] abc Execute abc BR PT TY LAB PAR(1) L2-NORM MAX U(1) MAX U(2) MAX U(3) PERIOD 3 29 LP 10 2.2496E-001 3.2078E+000 9.3255E-001 7.6527E-001 4.1219E+000 6.5255E+000 3 80 EP 11 2.5968E-001 4.0472E+000 9.4059E-001 6.4539E-001 4.1106E+000 9.3594E+000 Total Time 0.000E+00 Append. fort.7/8/9 to p/q/d.abc Delete. r.abc Delete. fort.* *.o *.obj *.exe
17 February 2001
Corrected an incorrect path in one of the bat files.
Added example lor which demonstrate the use of #fc. It seems there where three lines of missing code in the fcon.f source. The added code is:
C Open lines added by S Gratrix Dec 2000 ! OPEN(2,FILE='fort.2',STATUS='old') OPEN(3,FILE='fort.3',STATUS='unknown') OPEN(8,FILE='fort.8',STATUS='unknown')
28 February 2001
I am now running Windows Me also and have quickly tested the bat files. After a minor change all seems ok.
30 March 2001
Enabled use of Salford FTN77 or GNU G77 compilers and gave brief notes on various problems with 95/98/Me/NT/2000.
4 July 2001
Increased values of NDIMX and NTSTX. Added an alternative format for the constant files and the commands #fx and #ac. Added the example pp3.
23 December 2001
Updated web page, added forum, and finally uploaded the updates from 4 July 2001.
Here are the command line outputs I obtain running Auto 97 in Windows 2000 on an Athlon 1.2Ghz DDR computer:
Please let me know of any mistakes I've made, comments, etc. My email is email@example.com. Good Luck!