0

I am a complete stranger to Fortran 77 and relatively new to Ubuntu. I need to get Xrotor running on a Ubuntu 20.04 machine. I referred to the hints reported here, installed gfortran and libx11-dev packages, then I edited ./plotlib/config.make as shown in the answer I linked and did so also for ./bin/Makefile.gfortran . I also added -fallow-argument-mismatch -std=legacy flags to workaround errors related to rank mismatch at several points in the code (as far as I was able to understand - please forgive me for my poor techincal skills, knowledge and jargon). When I run make -f Makefile.gfortran everything seemed to be just fine, but as I try to run Xrotor I get this same output

~/Xrotor/bin$ ./xrotor

 =========================
    XROTOR Version 7.55
 =========================
Note: The following floating-point exceptions are signalling: IEEE_DENORMAL
STOP COLORSPECTRUM: Non-monotonic color axis. Check COLWIDTH.

I understood that this could be due to an exception which is thrown when numerical errors occour. I also added

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

in /plotlib/plt_color.f after line 508 (although I'm not really sure that was the right spot to put it) as explained there, and did make -f Makefile.gfortran again. I believe this is supposed to prevent the COLORSPECTRUMTRP subroutine to STOP the exectution, but it doesn't work. Finally, I also tried to cancel these lines

        if(COLAXIS(ibase) .LE. COLAXIS(ibase-1))
     &   STOP 'COLORSPECTRUM: Non-monotonic color axis. Check COLWIDTH.'

from plt_color.f, yet to no avail.

Any suggestions? What am I missing? Please let me know if I need to provide further information or to attach the files I edited.

gab
  • 3
  • 2
  • Welcome, please take the [tour]. Please see the [link](https://stackoverflow.com/questions/44308577/ieee-underflow-flag-ieee-denormal-in-fortran-77) that explains the note message. Please understand it is not an error message. Do you have some actual problem with your code? Did you get some results of the computation you did not expect? If yes, you have to explain it in detail. The program tells you **"Check COLWIDTH."** so it is probably wise to check this input data. – Vladimir F Героям слава Oct 29 '21 at 19:59
  • Also see https://stackoverflow.com/questions/35992992/gfortran-ieee-exception-inexact regarding your note message. You can get rid of it by using `-ffpe-summary=invalid,zero,overflow` – Vladimir F Героям слава Oct 29 '21 at 20:02
  • Note whatever the code is above, it isn't Fortran77 - it is at least Fortran90 – Ian Bush Oct 29 '21 at 20:11
  • Thanks for your help, @VladimirF. Anyway, It turned out that my mistake was in the build sequence. I had to run `make pltLib.a` just after having edited both `/plotlib/config.make` and `/plotlib/plt_color.f`. This way everyting goes fine and smooth, regardless if I add the `-ffpe-summary=invalid,zero,overflow` flag. That said, I think the best thing to do is to convert and install the Fedora package - which I knew nothing about - rather than patching makefiles without clearly knowing what I'm doing. – gab Nov 01 '21 at 13:14

1 Answers1

0

Ubuntu 20.04, Xrotor: Either convert the Fedora 33 package xrotor-7.55-18.fc33.x86_64.rpm https://dl.fedoraproject.org/pub/fedora/linux/releases/33/Everything/x86_64/os/Packages/x/xrotor-7.55-18.fc33.x86_64.rpm with alien.

Or build Xrotor with the Xrotor7.55-makefile.patch from https://dl.fedoraproject.org/pub/fedora/linux/releases/33/Everything/source/tree/Packages/x/xrotor-7.55-18.fc33.src.rpm .... Link to patch https://drive.google.com/file/d/1dF_Q-KjMTLCn_DRvEk_M2_lBobkL1TqL/view?usp=sharing

Link to unPack_rpm.sh https://drive.google.com/file/d/1q3d9QqrRhEThYByPDgWEaoxHnqWFWqfE/view?usp=sharing

tar xvf Xrotor7.55.tar.tgz
cd Xrotor/
patch -p1 < Xrotor7.55-makefile.patch
cd plotlib/ && make
cd ../bin/ && make
Knud Larsen
  • 5,753
  • 2
  • 14
  • 19