-- JorgeDElia - 21 Jun 2006

ADAPTOR version 10.1. Installation with gcc and g95

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 ...


cd /usr/local
mkdir adaptor-10.1-g95
cd adaptor-10.1-g95
tar -zxvf /usr/local/paquetes/adaptor-10.1-install/adp_10.1.tar.gz
cd ..
chgrp -R root adaptor-10.1-g95
chown -R root adaptor-10.1-g95
cd adaptor-10.1-g95
set

# environment variable for PHOME
pwd
/usr/local/adaptor-10.1-g95
export PHOME=/usr/local/adaptor-10.1-g95 ; echo $PHOME

# environment variable for MPICH
export MPI_HOME=/usr/local/mpich2-1.0.3-g95 ; echo $MPI_HOME
export MPI_INC="-I$MPI_HOME/include" ; echo $MPI_INC
export MPI_LIB="-lc -L$MPI_HOME/lib -lpmpich -lmpich" ; echo $MPI_LIB

# environment variables for the CC compiler
export CC=gcc ; echo $CC
export CFLAGS="-w -O" ; echo $CFLAGS

# environment variables for the F77 compiler
export F77=g95 ; echo $F77
export F77_EXTEND="-ffixed-line-length-132" ; echo $F77_EXTEND 
export F77_NOWARN="-w" ; echo $F77_NOWARN
export F77_OPT="-Wp,-recursive" ; echo $F77_OPT 
export F77_FLAGS="-fPIC -I$MPI_HOME/include" ; echo $F77_FLAGS
export F77_MP="-auto" ; echo $F77_MP

# 2) looks the FREE source format in "configure" file: 
#  for g95   compiler: adds "--free-form"
#  for Intel compiler: "-free" (already there is there)
# environment variable for the thread library
export THR_LIB=-lpthread ; echo $THR_LIB  

# System's configuration:
# A configuration must be done as:
cd $PHOME
configure &> configure.log

# Checks with $PHOME/bin/fadapt -settings:
cat config.log

# Looks in the ".adaptorrc" file two variables:

# a) Intel compiler:
     FC_FREE=-free
     FC_EXTEND=-extend-source
     LD_FLAGS=

# b) g95 compiler: 
#    find the gcc library with the "gcc -v" command. Typical output: 
# Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.2/specs
#    Thread model: posix
#    gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
#    and then insert the gcc library in the LD_FLAGS flag.
     FC_FREE=--free-form
     FC_EXTEND=-ffixed-line-length-132
     LD_FLAGS=-L/usr/lib/gcc/i386-redhat-linux/3.4.2/specs -lgcc

# Then, make the System's construction
make clean
make

# Traductor's construction
cd $PHOME/src
make clean
make

# fadapt's settings
$PHOME/bin/fadapt -settings

# poner en el entornos (".bashrc") de cada usuario
export PHOME=/usr/local/adaptor-10.1-g95
export PATH=$PATH:$PHOME/bin 
export MANPATH=$MANPATH:$PHOME/man

# ADAPTOR's bin and man in the PATH
export PATH=$PATH:$PHOME/bin ; echo $PATH
export MANPATH=$MANPATH:$PHOME/man ; echo $MANPATH

# Sec. 9.2  Testing the Compiler, page 19
cd $PHOME
chmod 777 -R test_examples
chmod 777 -R hpf_examples
su -l username
export PHOME=/usr/local/adaptor-10.1-g95 ; echo $PHOME
export PATH=$PATH:$PHOME/bin ; echo $PATH
export MANPATH=$MANPATH:$PHOME/man ; echo $MANPATH

# cd /usr/local/adaptor/test_examples/HPF_CB/SIMPLE <- before in "iguide.pdf"
cd $PHOME/hpf_examples  <- now
adaptor -v -hpf_1 -c simple.hpf
adaptor -v -hpf_1 -o simple1.exe simple.o
simple1.exe > simple_test.out
adaptor -v -openmp -c simple.hpf
adaptor -v -openmp -o simple2.exe simple.o
simple2.exe >> simple_test.out
adaptor -v -hpf -c simple.hpf
adaptor -v -hpf -o simple3.exe simple.o
simple3.exe -nb 1 >> simple_test.out
cat simple_test.out

# Sec. 9.3 Test Programs
cd $PHOME
su -l username
export PHOME=/usr/local/adaptor-10.1-g95 ; echo $PHOME
cd $PHOME
pwd

# Sec. 9.3.1  Serial HPF Test Programs
cd $PHOME/test_examples
make clean
make &> hpf_serial_test.log
cat hpf_serial_test.log
make run &> hpf_serial_test.out
cat hpf_serial_test.out

# Sec. 9.3.2  Parallel HPF Test Programs
cd $PHOME/test_examples/HPF_MPI
make clean
make &> hpf_parall_test.log
cat hpf_parall_test.log
run &> hpf_parall_test.out
cat hpf_parall_test.out

# Sec. 9.3.3  Parallel OMP Test Programs
cd $PHOME/test_examples/OMP
make clean
make &> omp_parall_test.log
cat omp_parall_test.log
run &> omp_parall_test.out
cat omp_parall_test.out
exit
---
Topic revision: r2 - 22 Jun 2006, JorgeDElia
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback