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

%CODE{ lang="python" num="1" }% cd /usr/local mkdir adaptor-10.1-intel cd adaptor-10.1-intel tar -zxvf /usr/local/paquetes/adaptor-10.1-install/adp_10.1.tar.gz cd .. chgrp -R root adaptor-10.1-intel chown -R root adaptor-10.1-intel cd adaptor-10.1-intel set

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

# environment variable for MPICH: export MPI_HOME=/usr/local/mpich2-1.0.3-intel; 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=ifort ; echo $F77 export F77_EXTEND="-extend-source" ; echo $F77_EXTEND export F77_NOWARN="-w" ; echo $F77_NOWARN export F77_OPT="-vms,-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 configure.log

# Fortran target compiler and related options # FC_EXTEND flag for extend source lines with # FC_EXTEND_LENGTH characthers # FC_OPT : FC flags used for optimization # FC_MP : flag used for parallel thread programs # (local variables are put on the stack) # FC_FLAGS: further FC compiler flags # Looks in the ".adaptorrc" file the variables:

# a) Intel compiler: FC=ifort -fPIC -I/usr/local/mpich2-1.0.3-intel/include FC_FREE=-free FC_EXTEND=-extend-source FC_EXTEND_LENGTH=72 FC_OPT=-Wp,-recursive FC_MP= FC_FLAGS=-vms,-w

# 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-intel 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-intel ; 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-intel ; 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 %ENDCODE%

Topic revision: r4 - 05 Sep 2014, MarioStorti
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