0

I am about 3 hours new to Linux/Cygwin/virtually anything even borderline computer science. I have been tasked with installing a program for rotors/propellers for research (XROTOR), but I cannot figure out how to run the program. It seems to have been developed in Fortran (maybe?), and came with a README. The README is asking me to build the file, but I have no clue what that means. I have downloaded Cygwin, and have gotten as far as the "make libPLT.a" line. I then cd'ed to the bin folder, and typed in "make xrotor" like the README states, but I keep getting the following error:

$ make
ifort -c -I../src -O -static ../src/xrotor.f
sh: ifort: command not found
make: *** [Makefile:147: xrotor.o] Error 127

I've included the README as well. I don't know what I'm doing, and I figured this was a decent place to start. Any help is GREATLY appreciated!!!

EDIT: Left the README out for whatever reason, sorry. I've written it out here:

General

XROTOR and its plot library should compile on any Unix system with normal Fortran-77, C, and X-Windows support. So far, XROTOR has been tested on the following systems:

DEC-5000 Alpha SGI * Sun * RS/6000 * HP-9000 * Pentium/Linux

The systems marked with "*" have peculiar features which require slight modifications to the Makefiles in the plotlib/ and bin/ directories.
Examine these Makefiles before building the plot library and Xrotor.

Build Sequence

To install, first build the plot library in ./plotlib ...

% cd plotlib % make libPlt.a

Then build the programs in ./bin ...

% make xrotor % make jplot

2 Answers2

0

The README is missing some details, but you need to compile the program from sources, and to do so you need to adjust some variables in the Makefile's

As prerequisite for compiling you need gcc-fortran,make and library libX11-devel plus the X11 system for the graphic. Installing xinit is a good start.

$ tar -xf Xrotor7.55.tar.tgz
$ cd Xrotor
$ cd plotlib

than modify config.make to set PLTLIB = libPlt.a I used my preferred editor, but other are also ok

$ vim config.make

To build:

$ make libPlt.a
gfortran -c -O2 -fdefault-real-8  plt_base.f
gfortran -c -O2 -fdefault-real-8  plt_font.f
gfortran -c -O2 -fdefault-real-8  plt_util.f
gfortran -c -O2 -fdefault-real-8  plt_color.f
gfortran -c -O2 -fdefault-real-8  set_subs.f
gfortran -c -O2 -fdefault-real-8  gw_subs.f
gfortran -c -O2 -fdefault-real-8  ps_subs.f
gcc -c -O2 -DUNDERSCORE Xwin.c
gfortran -c -O2 -fdefault-real-8  plt_old.f
gfortran -c -O2 -fdefault-real-8  plt_3D.f
ar r     libPlt.a plt_base.o plt_font.o plt_util.o plt_color.o set_subs.o gw_subs.o ps_subs.o Xwin.o plt_old.o plt_3D.o
ar: creating libPlt.a
ranlib  libPlt.a

Than moving to program build directory

$ cd ../bin

again modify Makefile.gfortran to set PLTOBJ = ../plotlib/libPlt.a and LIBS = -L/usr/lib -lX11

$ vim Makefile.gfortran

and build all program in one shot

$ make -f Makefile.gfortran
gfortran -c -I../src -O ../src/xrotor.f
gfortran -c -I../src -O ../src/xoper.f
gfortran -c -I../src -O ../src/xdesi.f
gfortran -c -I../src -O ../src/xmodi.f
...
gfortran -c -I../src -O ../src/plotdata.f
gfortran -o xrotor xrotor.o xoper.o xdesi.o xmodi.o  xaero.o xjmap.o xio.o xnoise.o xrotpl.o xcasepl.o xbend.o xinte.o xutils.o jputil.o plutil.o modify.o srclin.o spline.o userio.o vortex.o plotdata.o  ../plotlib/libPlt.a  -L/usr/lib -lX11
gfortran -c -I../src -O ../src/jplot.f
../src/jplot.f:107:72:

       PAUSE 'Hit return to see J values'
                                                                        1
Warning: Deleted feature: PAUSE statement at (1)
../src/jplot.f:112:72:

       PAUSE 'Hit return to see CP values'
                                                                        1
Warning: Deleted feature: PAUSE statement at (1)
gfortran -o jplot jplot.o  xutils.o jputil.o userio.o ../plotlib/libPlt.a  -L/usr/lib -lX11
gfortran -c -I../src -O ../src/jplote.f
gfortran -o jplote jplote.o xutils.o jputil.o userio.o ../plotlib/libPlt.a  -L/usr/lib -lX11

The Warning means that the PAUSE command does not exist anymore so the progran will likely not pause on the expected locations. This could explain why it is not working as expected, but probably as the code is very old some code assumptions about the Unix system are not anymore valid. Running it after starting the Xwindow graphic system from inside a Xterm

$ ./xrotor

 =========================
    XROTOR Version 7.55
 =========================
Note: The following floating-point exceptions are signalling: IEEE_DENORMAL
STOP COLORSPECTRUM: Non-monotonic color axis. Check COLWIDTH.
matzeri
  • 8,062
  • 2
  • 15
  • 16
0

Need to edit the COLORSPECTRUMTRP subroutine xrotor/plotlib/plt_color.f. Add the following after line 508

COLWIDTH=(/1.0,1.20000005,0.5,1.4,1.0,1.20000005,1.5/)

HenryS
  • 1