Menu

Compiling ATLAS on Windows 8.1 Using Cygwin

Greg Mosby
2014-03-02
2014-08-11
  • Greg Mosby

    Greg Mosby - 2014-03-02

    This post is mainly for other Cygwin users that get frustrated or find themselves on this page in the process of installing ATLAS libraries. I had previously installed ATLAS 3.8.4 on a Windows 7 system in Cygwin, and I recently had to install ATLAS on a Windows 8.1 system. I decided to install the most up to date stable version 3.10.1. It was not as straightforward as my install was for ATLAS 3.8.4 on the Windows 7 system, but as of today, it successfully installed and checked out with no failures.

    The main caveats I found in successfully installing ATLAS were:

    1) Editing some ATLAS configure C code to handle parentheses in Cygwin PATH variable.
    2) Including direct paths to Cygwin's gcc and gfortran in the configure command
    3) Including the path to Windows 64 bit architectural defaults in the configure command

    Issue 1) was figured out/solved by someone a while back; here is the link: https://sourceforge.net/p/math-atlas/windows-support/21/#7b95

    The tricky part here is in the lack of some detail. The function in ATLAS/CONFIG/src/atlconf_misc.c (where ATLAS is your source directory) to edit is called *GetPathEnvVar, which in my ATLAS 3.10.1 file starts at line 687. I simply inserted the two conditionals Li Peng suggested after the last 'else if' statement before the final 'else' statement. This eliminates the types of syntax errors seen with the unexpected '('s in the Cygwin path variable.

    Issue 2) I found it necessary to explicitly specify my FORTRAN and gcc libraries, though they are both accessible through my PATH variable. This is done by adding the following flags to my configure line:

    -C if /usr/bin/i686-pc-cygwin-gfortran.exe -C acg /usr/bin/i686-pc-cygwin-gcc-4.8.2.exe

    Without those flags, ATLAS was not finding my FORTRAN libraries.

    The last Issue, 3), is about the Win64 architectural defaults. This is explained in the ATLAS 3.10.1 errata: http://math-atlas.sourceforge.net/errata.html#win64

    I followed the steps there and added the suggested flags to my configure command, but I'm not sure it helped much. My total configure time was about 5-7 hours. I wanted to compile ATLAS for 32 bit, so perhaps the configure step did not use those defaults, so I got no speed up in configuring.

    When all was said and done my configure line was:
    ../configure -D c -DPentiumCPS=2394 -b 32 -t -1 -Si nocygwin 0 -C if /usr/bin/i686-pc-cygwin-gfortran.exe -C acg /usr/bin/i686-pc-cygwin-gcc-4.8.2.exe -Ss ADdir /home/gmosby/TEST/WINAD --with-netlib-lapack-tarfile=/home/gmosby/downloads/lapack-3.5.0.tgz

    As I said above, configure ran normally. I issued a make--no problems. Then I issued make check and make ptcheck--also no failures. I then issued the make install command. I was reading in the atlas_install.pdf that make time doesn't really work as you'd expect it would when not using architectural defaults, but there are workarounds. I didn't want any extra fuss, so I opted out of that step.

    I hope this helps some other Cygwinners in need.

    -Greg

     
  • Alle Meije Wink

    Alle Meije Wink - 2014-08-01

    Thanks for the scripts Matthew.

    I am trying something similar (using win7 and compiling with gcc, 32-bits). In cygwin I use this bash shell script (see attachment).

    It does say
    DONE configure
    and, after about a night of building, report
    ATLAS install complete
    but configure reports

    Make.top:12: recipe for target 'leafstart' failed
    make[2]: [leafstart] Error 1
    make[2]: Leaving directory '/cygdrive/c/Users/amwink/usr/local/atlas-3.10.2/atlas_build'
    Make.top:361: recipe for target 'startup' failed
    make[1]:
    [startup] Error 2
    make[1]: Leaving directory '/cygdrive/c/Users/amwink/usr/local/atlas-3.10.2/atlas_build'
    Makefile:493: recipe for target 'startup' failed
    make: *** [startup] Error 2

    just before DONE

    Can anyone tell if this will lead to an incomplete build?

    Many thanks
    Alle Meije

     
    • R. Clint Whaley

      R. Clint Whaley - 2014-08-01

      Usually:
      make check
      make ptcheck (if building threaded libs)
      are used to verify the build.

      For problems, you may want to try:
      https://sourceforge.net/p/math-atlas/windows-support/

      Cheers,
      Clint

      On 08/01/2014 03:10 AM, Alle Meije Wink wrote:

      Thanks for the scripts Matthew.

      I am trying something similar (using win7 and compiling with gcc,
      32-bits). In cygwin I use this bash shell script (see attachment).

      It does say
      DONE configure
      and, after about a night of building, report
      ATLAS install complete
      but configure reports

      Make.top:12: recipe for target 'leafstart' failed
      make[2]: /[leafstart] Error 1
      make[2]: Leaving directory
      '/cygdrive/c/Users/amwink/usr/local/atlas-3.10.2/atlas_build'
      Make.top:361: recipe for target 'startup' failed
      make[1]: /
      [startup] Error 2
      make[1]: Leaving directory
      '/cygdrive/c/Users/amwink/usr/local/atlas-3.10.2/atlas_build'
      Makefile:493: recipe for target 'startup' failed
      make: *** [startup] Error 2

      just before DONE

      Can anyone tell if this will lead to an incomplete build?

      Many thanks
      Alle Meije

      Attachment: build_atlas.sh (928 Bytes; application/octet-stream)


      Compiling ATLAS on Windows 8.1 Using Cygwin
      https://sourceforge.net/p/math-atlas/discussion/1026734/thread/21fbb970/?limit=25#4c10


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/math-atlas/discussion/1026734/
      https://sourceforge.net/p/math-atlas/discussion/1026734

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/
      https://sourceforge.net/auth/subscriptions

       
  • Alle Meije Wink

    Alle Meije Wink - 2014-08-08

    Thanks Clint for your advice.

    The build process produces lines like:

    gcc.exe: error: /cygdrive/c/Users/amwink/usr/local/atlas-3.10.2//CONFIG/src/backend/comptestC.c: No such file or directory
    gcc.exe: fatal error: no input files

    but then when I type in another shell window
    $ ls /cygdrive/c/Users/amwink/usr/local/atlas-3.10.2//CONFIG/src/backend/comptestC.c

    it just shows the file.

    I'm not sure how to solve this?

    Best regards
    Alle Meije

     
  • Alle Meije Wink

    Alle Meije Wink - 2014-08-11

    'make check' ends with

    DONE BUILDING TESTERS, RUNNING:
    SCOPING FOR FAILURES IN BIN TESTS:
    fgrep -e fault -e FAULT -e error -e ERROR -e fail -e FAIL \ bin/sanity.out
    8 cases: 8 passed, 0 skipped, 0 failed
    4 cases: 4 passed, 0 skipped, 0 failed
    8 cases: 8 passed, 0 skipped, 0 failed
    4 cases: 4 passed, 0 skipped, 0 failed
    8 cases: 8 passed, 0 skipped, 0 failed
    4 cases: 4 passed, 0 skipped, 0 failed
    8 cases: 8 passed, 0 skipped, 0 failed
    4 cases: 4 passed, 0 skipped, 0 failed
    DONE

    so all seems good...

    bw
    Alle Meije

     

Log in to post a comment.