Loading ...
Sorry, an error occurred while loading the content.

Re: [cnsbb] issues with compiling cns 1.21 using gfortran 4.3

Expand Messages
  • Ed Pozharski
    Except that ifort costs $900 (academic price is $360, and academic use does *not* qualify for non-commercial software development). You can get around it once
    Message 1 of 4 , Mar 5, 2009
    • 0 Attachment
      Except that ifort costs $900 (academic price is $360, and academic use
      does *not* qualify for non-commercial software development). You can
      get around it once by using an evaluation copy, but it only works for 30
      days, so one will be out of luck when the next version of CNS is
      released.

      It would be nice if Intel would give ifort away for free (after all,
      they are not a software company and how much is fortran used these days
      anyway), but they don't. By the way, does gfortran compilation work on
      amd machines? I guess amd binaries will then run on intel processors,
      but will be similarly slower compared to ifort version.

      On Thu, 2009-03-05 at 13:39 +0000, Boaz Shaanan wrote:
      > Hi,
      >
      > The best solution (it's Axel's advice) is to use the intel compiler.
      > It worked like a charm for me.
      > Boaz
      > ----- Original Message -----
      > From: jbauer6@...
      > Date: Thursday, March 5, 2009 9:46
      > Subject: [cnsbb] issues with compiling cns 1.21 using gfortran 4.3
      > To: cnsbb@yahoogroups.com
      >
      > > For those who are having difficulty compiling cns v. 1.21 under
      > > Linux using gfortran 4.3 (fortran compiler fails test):
      > >
      > > The problem seems to be the -malign-double switch. The
      > > documentation for gcc says that binary files compiled with this
      > > switch may not be compatible with those compiled without it (and
      > > probably won't link). Mine wasn't and it's quite possible that
      > > others also were not. Here are three possible solutions:
      > >
      > > 1. Use the binary if you can (probably the best solution)
      > > 2. Drop the -malign-double switch. You can do this by editing
      > >
      > > $CNS_SOLVE/instlib/machine/supported/linux/arch_env
      > >
      > > and commenting out lines 27-30:
      > >
      > > #
      > > # set -malign-double flag on intel-based machines
      > > #
      > > #setenv CNS_MALIGN_I86 ""
      > > #if ( $CNS_ARCH =~ *-i[3456789]86-* ) then
      > > # setenv CNS_MALIGN_I86 "-malign-double"
      > > #endif
      > > #
      > >
      > > Then run make install and things should work, hopefully. This
      > > will solve the compiler test problem on i686 processors, but not
      > > x64 ones.
      > >
      > > 3. Or you could re-compile the gfortran libraries using the -
      > > malign-double switch. I haven't bothered to do this, so I don't
      > > know how well it would work out.
      > >
      > > -malign-double is supposed to give a small performance boost on
      > > Pentium processors at the expense of using more memory. Removing
      > > it may make CNS run more slowly, but probably won't affect
      > > anything else. After dropping this switch, CNS successfully
      > > compiled and linked. My installation passed all of the tests,
      > > but did run more slowly (on an older and slower computer with a
      > > rather small amount of memory) than Dr. Brunger's.
      > >
      > > Hope this helps,
      > >
      > > Jacob Bauer
      > >
      > >
      > >
      > >
      > >
      >
      > Boaz Shaanan, Ph.D.
      > Dept. of Life Sciences
      > Ben-Gurion University of the Negev
      > Beer-Sheva 84105
      > Israel
      > Phone: 972-8-647-2220 ; Fax: 646-1710
      > Skype: boaz.shaanan
      >
      > ‎
      >
      >
      >
      --
      Edwin Pozharski, PhD, Assistant Professor
      University of Maryland, Baltimore
      ----------------------------------------------
      When the Way is forgotten duty and justice appear;
      Then knowledge and wisdom are born along with hypocrisy.
      When harmonious relationships dissolve then respect and devotion arise;
      When a nation falls to chaos then loyalty and patriotism are born.
      ------------------------------ / Lao Tse /
    • Axel Brunger
      I suggest you use the pre-compiled binaries from the CNS download site, version 1.21. No compilation is needed. Axel Brunger ... Axel T. Brunger Investigator,
      Message 2 of 4 , Mar 5, 2009
      • 0 Attachment
        I suggest you use the pre-compiled binaries from the CNS download site,
        version 1.21.  No compilation is needed.  

        Axel Brunger

        On Mar 4, 2009, at 11:40 PM, jbauer6@... wrote:


        For those who are having difficulty compiling cns v. 1.21 under Linux using gfortran 4.3 (fortran compiler fails test): 

        The problem seems to be the -malign-double switch. The documentation for gcc says that binary files compiled with this switch may not be compatible with those compiled without it (and probably won't link). Mine wasn't and it's quite possible that others also were not.. Here are three possible solutions:

        1. Use the binary if you can (probably the best solution)
        2. Drop the -malign-double switch. You can do this by editing

        $CNS_SOLVE/instlib/ machine/supporte d/linux/arch_ env

        and commenting out lines 27-30:

        #
        # set -malign-double flag on intel-based machines
        #
        #setenv CNS_MALIGN_I86 ""
        #if ( $CNS_ARCH =~ *-i[3456789] 86-* ) then
        #  setenv CNS_MALIGN_I86 "-malign-double"
        #endif
        #

        Then run make install and things should work, hopefully. This will solve the compiler test problem on i686 processors, but not x64 ones.

        3. Or you could re-compile the gfortran libraries using the -malign-double switch. I haven't bothered to do this, so I don't know how well it would work out.

        -malign-double is supposed to give a small performance boost on Pentium processors at the expense of using more memory. Removing it may make CNS run more slowly, but probably won't affect anything else. After dropping this switch, CNS successfully compiled and linked. My installation passed all of the tests, but did run more slowly (on an older and slower computer with a rather small amount of memory) than Dr. Brunger's.

        Hope this helps,

        Jacob Bauer




        Axel T. Brunger
        Investigator,  Howard Hughes Medical Institute
        Professor of Molecular and Cellular Physiology
        Stanford University

        Email:  brunger@...      
        Phone:  +1 650-736-1031
        Fax:    +1 650-745-1463






      Your message has been successfully submitted and would be delivered to recipients shortly.