-- JorgeDElia - 21 Jun 2006

ADAPTOR version 10.1. Installation with gcc and ifort

Primero instalar y compilar el MPICH (o el MPI), incluyendo f77 y f90 con el mismo compilador que luego se va a usar en las aplicaciones. Luego, sigue lo siguiente ...

    1cd /usr/local
    2mkdir adaptor-10.1-intel
    3cd adaptor-10.1-intel
    4tar -zxvf /usr/local/paquetes/adaptor-10.1-install/adp_10.1.tar.gz
    5cd ..
    6chgrp -R root adaptor-10.1-intel
    7chown -R root adaptor-10.1-intel
    8cd adaptor-10.1-intel
    9set
   10
   11# environment variable for PHOME
   12pwd
   13/usr/local/adaptor-10.1
   14export PHOME=/usr/local/adaptor-10.1-intel ; echo $PHOME
   15
   16# environment variable for MPICH:
   17export MPI_HOME=/usr/local/mpich2-1.0.3-intel; echo $MPI_HOME
   18export MPI_INC="-I$MPI_HOME/include" ; echo $MPI_INC
   19export MPI_LIB="-lc -L$MPI_HOME/lib -lpmpich -lmpich" ; echo $MPI_LIB
   20
   21# environment variables for the CC compiler
   22export CC=gcc ; echo $CC
   23export CFLAGS="-w -O" ; echo $CFLAGS
   24
   25# environment variables for the F77 compiler
   26export F77=ifort ; echo $F77
   27export F77_EXTEND="-extend-source" ; echo $F77_EXTEND 
   28export F77_NOWARN="-w" ; echo $F77_NOWARN
   29export F77_OPT="-vms,-Wp,-recursive" ; echo $F77_OPT 
   30export F77_FLAGS="-fPIC -I$MPI_HOME/include" ; echo $F77_FLAGS
   31export F77_MP="-auto" ; echo $F77_MP
   32
   33# 2) looks the FREE source format in "configure" file: 
   34#  for g95   compiler: adds "--free-form"
   35#  for Intel compiler: "-free" (already there is there)
   36# environment variable for the thread library
   37export THR_LIB=-lpthread ; echo $THR_LIB  
   38
   39# System's configuration:
   40# A configuration must be done as:
   41cd $PHOME
   42configure &> configure.log
   43
   44# Checks with $PHOME/bin/fadapt -settings:
   45cat configure.log
   46
   47#  Fortran target compiler and related options
   48#  FC_EXTEND flag for extend source lines with
   49#            FC_EXTEND_LENGTH characthers
   50#  FC_OPT  : FC flags used for optimization
   51#  FC_MP   : flag used for parallel thread programs 
   52#            (local variables are put on the stack)
   53#  FC_FLAGS: further FC compiler flags
   54# Looks in the ".adaptorrc" file the variables:
   55
   56# a) Intel compiler:
   57FC=ifort -fPIC -I/usr/local/mpich2-1.0.3-intel/include
   58FC_FREE=-free
   59FC_EXTEND=-extend-source
   60FC_EXTEND_LENGTH=72
   61FC_OPT=-Wp,-recursive
   62FC_MP=
   63FC_FLAGS=-vms,-w
   64
   65# b) g95 compiler: 
   66#    find the gcc library with the "gcc -v" command. 
   67# Typical output. Reading specs from 
   68# /usr/lib/gcc/i386-redhat-linux/3.4.2/specs
   69#    Thread model: posix
   70#    gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
   71#    and then insert the gcc library in the LD_FLAGS flag.
   72FC_FREE=--free-form
   73FC_EXTEND=-ffixed-line-length-132
   74LD_FLAGS=-L/usr/lib/gcc/i386-redhat-linux/3.4.2/specs -lgcc
   75
   76# Then, make the System's construction
   77make clean
   78make
   79
   80# Traductor's construction
   81cd $PHOME/src
   82make clean
   83make
   84
   85# fadapt's settings
   86$PHOME/bin/fadapt -settings
   87
   88# poner en el entornos (".bashrc") de cada usuario
   89export PHOME=/usr/local/adaptor-10.1-intel
   90export PATH=$PATH:$PHOME/bin 
   91export MANPATH=$MANPATH:$PHOME/man
   92
   93# ADAPTOR's bin and man in the PATH
   94export PATH=$PATH:$PHOME/bin ; echo $PATH
   95export MANPATH=$MANPATH:$PHOME/man ; echo $MANPATH
   96
   97# Sec. 9.2  Testing the Compiler, page 19
   98cd $PHOME
   99chmod 777 -R test_examples
  100chmod 777 -R hpf_examples
  101su -l username
  102export PHOME=/usr/local/adaptor-10.1-intel ; echo $PHOME
  103export PATH=$PATH:$PHOME/bin ; echo $PATH
  104export MANPATH=$MANPATH:$PHOME/man ; echo $MANPATH
  105
  106# cd /usr/local/adaptor/test_examples/HPF_CB/SIMPLE <- before in "iguide.pdf"
  107cd $PHOME/hpf_examples   <- now
  108adaptor -v -hpf_1 -c simple.hpf
  109adaptor -v -hpf_1 -o simple1.exe simple.o
  110simple1.exe > simple_test.out
  111adaptor -v -openmp -c simple.hpf
  112adaptor -v -openmp -o simple2.exe simple.o
  113simple2.exe >> simple_test.out
  114adaptor -v -hpf -c simple.hpf
  115adaptor -v -hpf -o simple3.exe simple.o
  116simple3.exe -nb 1 >> simple_test.out
  117cat simple_test.out
  118
  119# Sec. 9.3 Test Programs
  120cd $PHOME
  121su -l username
  122export PHOME=/usr/local/adaptor-10.1-intel ; echo $PHOME
  123cd $PHOME
  124pwd
  125
  126# Sec. 9.3.1  Serial HPF Test Programs
  127cd $PHOME/test_examples
  128make clean
  129make &> hpf_serial_test.log
  130cat hpf_serial_test.log
  131make run &> hpf_serial_test.out
  132cat hpf_serial_test.out
  133
  134# Sec. 9.3.2  Parallel HPF Test Programs
  135cd $PHOME/test_examples/HPF_MPI
  136make clean
  137make &> hpf_parall_test.log
  138cat hpf_parall_test.log
  139run &> hpf_parall_test.out
  140cat hpf_parall_test.out
  141
  142# Sec. 9.3.3  Parallel OMP Test Programs
  143cd $PHOME/test_examples/OMP
  144make clean
  145make &> omp_parall_test.log
  146cat omp_parall_test.log
  147run &> omp_parall_test.out
  148cat omp_parall_test.out
  149exit

Topic revision: r4 - 2014-09-05 - 23:12:39 - MarioStorti
 

TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright � by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback