<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Dominik,<br>
    <br>
    It really depends on which Cray machine you are installing. If you
    like I can describe my recent installation experience on Cray XE6
    "Rosa" in Zurich (it uses Linux).<br>
    First make sure which compiler you are using. For me, GNU compilers
    did the job well. I also prefer using ACML BLAS/LAPACK Library,
    because XE6 uses AMD processors.<br>
    <br>
    So just go to your .bashrc and add something like:<br>
    <br>
    module load PrgEnv-gnu<br>
    module load acml<br>
    <br>
    # PETSC 3.X<br>
    export PETSC_DIR="$HOME/LIB/petsc-3.X-pY"<br>
    export PETSC_ARCH="PETSC_CRAY_XE6_GNU_OPT"<br>
    export PATH=$PATH:$PETSC_DIR/bin/<br>
    <br>
    Don't forget to logout/login for changes to take effect. Also, you
    should only have one PrgEnv module in your .bashrc.<br>
    <br>
    Depending on the packages you need, you can modify the configuration
    command below:<br>
    <br>
    ./config/configure.py \<br>
    --with-batch=1 \<br>
    --known-mpi-shared=0 \<br>
    --known-memcmp-ok \<br>
    --with-blas-lapack-lib="$ACML_DIR/gfortran64/lib/libacml.a" \<br>
    --COPTFLAGS="-O3" \<br>
    --FOPTFLAGS="-O3" \<br>
    --CXXOPTFLAGS="-O3" \<br>
    --with-x=0 \<br>
    --with-debugging=0 \<br>
    --with-clib-autodetect=0 \<br>
    --with-cxxlib-autodetect=0 \<br>
    --with-fortranlib-autodetect=0 \<br>
    --with-shared=0 \<br>
    --with-dynamic=0 \<br>
    --with-mpi-compilers=1 \<br>
    --with-cc=cc \<br>
    --with-cxx=CC \<br>
    --with-fc=ftn \<br>
    --download-blacs=1 \<br>
    --download-scalapack=1 \<br>
    --download-mumps=1 \<br>
    --download-superlu_dist=1 \<br>
    --download-parmetis=1 \<br>
    --download-ml=1<br>
    <br>
    If you don't need ACML, just make PETSc download and install
    BLAS/LAPACK for you.<br>
    <br>
    What is important here is to always keep the following:<br>
    --with-batch=1 \<br>
    --known-mpi-shared=0 \<br>
    --with-clib-autodetect=0 \<br>
    --with-cxxlib-autodetect=0 \<br>
    --with-fortranlib-autodetect=0 \<br>
    <br>
    NOTE: on CRAY machine you have to submit "conftest" executable on
    single processor via batch system (Rosa uses slurm) and run
    "reconfigure.py" to finalize configuration.<br>
    <br>
    After you proceed with this, you have to MANUALLY DELETE the
    following keys in $PETSC_DIR/$PETSC_ARCH/include/petscconf.h<br>
    <br>
    PETSC_HAVE_SYS_PROCFS_H<br>
    PETSC_HAVE_DLFCN_H<br>
    PETSC_HAVE_SYS_SOCKET_H<br>
    PETSC_HAVE_SYS_UTSNAME_H<br>
    PETSC_HAVE_PWD_H<br>
    PETSC_HAVE_GETWD<br>
    PETSC_HAVE_UNAME<br>
    PETSC_HAVE_GETHOSTNAME<br>
    PETSC_HAVE_GETDOMAINNAME<br>
    PETSC_HAVE_NETINET_IN_H<br>
    PETSC_HAVE_NETDB_H<br>
    PETSC_USE_SOCKET_VIEWER<br>
    PETSC_HAVE_GETPWUID<br>
    <br>
    Otherwise nothing will run, and you'll get segfaults in the very
    beginning. The reason behind it is that Cray version of Linux only
    supports reduced set of system calls.<br>
    <br>
    NOW you can do "make all"<br>
    <br>
    Hope it'll be helpful,<br>
    <br>
    Anton<br>
    <br>
    ------------------------<br>
    <br>
    On 1/20/12 4:45 PM, Matthew Knepley wrote:
    <blockquote
cite="mid:CAMYG4GmReykRGu88rtAham-2uzRK6ywo1iF6nkj3YgyT5fKJSQ@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      On Fri, Jan 20, 2012 at 9:43 AM, Dominik Szczerba <span dir="ltr">&lt;<a
          moz-do-not-send="true" href="mailto:dominik@itis.ethz.ch">dominik@itis.ethz.ch</a>&gt;</span>
      wrote:<br>
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div class="HOEnZb">
            <div class="h5">I am building on a Cray system with crayftn
              fortran compiler. I<br>
              specify --with-fc=crayftn and --FFLAGS=-em. Despite the
              latter, I am<br>
              still getting the below cited error. Interestingly, the
              mod file IS<br>
              THERE:<br>
              <br>
              &gt; find /tmp/petsc-0Bnd1w -iname \*.mod<br>
              /tmp/petsc-0Bnd1w/config.compilers/CONFIGTEST.mod<br>
              <br>
              How do I go on from here?<br>
            </div>
          </div>
        </blockquote>
        <div><br>
        </div>
        <div>The problem is not that is doesn't create a module file,
          but that it will not put it</div>
        <div>where we ask it to. Please send entire configure.log (don't
          Cc users).</div>
        <div><br>
        </div>
        <div>&nbsp; &nbsp;Matt</div>
        <div>&nbsp;</div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div class="HOEnZb">
            <div class="h5">
              Thanks<br>
              Dominik<br>
              <br>
              <br>
              <br>
================================================================================<br>
              TEST checkFortranModuleInclude from<br>
config.compilers(/users/dsz/pack/petsc-3.2-p5/config/BuildSystem/config/compilers.py:1155)<br>
              TESTING: checkFortranModuleInclude from<br>
config.compilers(config/BuildSystem/config/compilers.py:1155)<br>
              &nbsp;Figures out what flag is used to specify the include path
              for Fortran modules<br>
              &nbsp; &nbsp; &nbsp; &nbsp;Pushing language FC<br>
              sh: crayftn -c -o
              /tmp/petsc-0Bnd1w/config.compilers/conftest.o<br>
              -I/tmp/petsc-0Bnd1w/config.compilers<br>
              -I/tmp/petsc-0Bnd1w/config.setCompilers -em -O3<br>
              /tmp/petsc-0Bnd1w/config.compilers/conftest.F<br>
              Executing: crayftn -c -o
              /tmp/petsc-0Bnd1w/config.compilers/conftest.o<br>
              -I/tmp/petsc-0Bnd1w/config.compilers<br>
              -I/tmp/petsc-0Bnd1w/config.setCompilers -em -O3<br>
              /tmp/petsc-0Bnd1w/config.compilers/conftest.F<br>
              sh:<br>
              Successful compile:<br>
              Source:<br>
              &nbsp; &nbsp; &nbsp;module configtest<br>
              &nbsp; &nbsp; &nbsp;integer testint<br>
              &nbsp; &nbsp; &nbsp;parameter (testint = 42)<br>
              &nbsp; &nbsp; &nbsp;end module configtest<br>
*******************************************************************************<br>
              &nbsp; &nbsp; &nbsp; &nbsp; UNABLE to CONFIGURE with GIVEN OPTIONS &nbsp; &nbsp;(see
              configure.log<br>
              for details):<br>
-------------------------------------------------------------------------------<br>
              Fortran module was not created during the compile.<br>
              configtest.mod/CONFIGTEST.mod not found<br>
*******************************************************************************<br>
              &nbsp;File "/users/dsz/pack/petsc-3.2-p5/config/configure.py",
              line 283,<br>
              in petsc_configure<br>
              &nbsp; &nbsp;framework.configure(out = sys.stdout)<br>
              &nbsp;File
              "/users/dsz/pack/petsc-3.2-p5/config/BuildSystem/config/framework.py",<br>
              line 925, in configure<br>
              &nbsp; &nbsp;child.configure()<br>
              &nbsp;File
              "/users/dsz/pack/petsc-3.2-p5/config/BuildSystem/config/compilers.py",<br>
              line 1338, in configure<br>
              &nbsp; &nbsp;self.executeTest(self.checkFortranModuleInclude)<br>
              &nbsp;File
              "/users/dsz/pack/petsc-3.2-p5/config/BuildSystem/config/base.py",<br>
              line 115, in executeTest<br>
              &nbsp; &nbsp;ret = apply(test, args,kargs)<br>
              &nbsp;File
              "/users/dsz/pack/petsc-3.2-p5/config/BuildSystem/config/compilers.py",<br>
              line 1187, in checkFortranModuleInclude<br>
              &nbsp; &nbsp;raise RuntimeError('Fortran module was not created
              during the<br>
              compile. configtest.mod/CONFIGTEST.mod not found')<br>
              <br>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <br clear="all">
      <div><br>
      </div>
      -- <br>
      What most experimenters take for granted before they begin their
      experiments is infinitely more interesting than any results to
      which their experiments lead.<br>
      -- Norbert Wiener<br>
    </blockquote>
    <br>
  </body>
</html>