mpirun

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
fdaryabor
Posts: 78
Joined: Wed Jan 02, 2008 3:15 pm
Location: University of Copenhagen

mpirun

#1 Unread post by fdaryabor »

Dear all
I have to use MPI, so I need know how can I set compiler "jobcomp" and the path variables for compiler.
Actually I set compiler as follow:

#!/bin/tcsh
####################################################
# COMPILATION JOB #
####################################################
#
# set source, compilation and run directories
#
set SOURCE=../Roms_Agrif
set SCRDIR=../Compile
set RUNDIR=`pwd`

#
# Linux compiler options (only relevant to Linux OS)
#
set LINUX_FC=mpif90
#set LINUX_FC=ifort
#set LINUX_FC=ifc
#set LINUX_FC=g95
#set LINUX_FC=g77

#
# set 32 or 64 Bits executable
#
set BITS=THIRTYTWO
#set BITS=SIXTYFOUR

#
# set NETCDF directories
#
if ($BITS == THIRTYTWO) then
# set NETCDFLIB=-L$HOME/lib32
# set NETCDFINC=-I$HOME/lib32
if ($LINUX_FC == g77) then
set NETCDFLIB=-L../netcdf_g77/
set NETCDFINC=-I../netcdf_g77/
else
set NETCDFLIB=/opt/pgi/linux86-64/7.1-2/lib
set NETCDFINC=/opt/pgi/linux86-64/7.1-2/include
# set NETCDFINC=/opt/netcdf/include
endif
else
set NETCDFLIB=-L$HOME/libn64
set NETCDFINC=-I$HOME/libn64
endif

#
# set MPI directories if needed
#
set MPILIB=/opt/pgi/linux86-64/7.1-2/mpi/mpich/lib
set MPIINC=/opt/pgi/linux86-64/7.1-2/mpi/mpich/include
#
# END OF USER'S MODIFICATIONS
####################################################

#
# Use GNU Make command
#
set MAKE = make
#
# clean scratch area
#
rm -rf $SCRDIR
mkdir $SCRDIR
#
# copy SOURCE code
#
cp -f ${SOURCE}/*.F $SCRDIR
cp -f ${SOURCE}/*.h $SCRDIR
cp -f ${SOURCE}/Make* $SCRDIR
cp -f ${SOURCE}/testkeys $SCRDIR
cp -f ${SOURCE}/jobcomp $SCRDIR
cp -f ${SOURCE}/amr.in $SCRDIR
cp -Rf ${SOURCE}/AGRIFZOOM $SCRDIR
#
# overwrite with local files
#
cp -f *.F $SCRDIR
cp -f *.h $SCRDIR
cp -f Make* $SCRDIR
cp -f jobcomp $SCRDIR
#cp -f amr.in $SCRDIR
#
# Change directory
#
cd $SCRDIR

#
# generates LDFLAGS1 according to users notifications
#
setenv LDFLAGS1 "$NETCDFLIB $MPILIB"
setenv CPPFLAGS1 "$NETCDFINC $MPIINC"

#
# determine operating system
#
set uname = `uname`
echo OPERATING SYSTEM IS: $uname

#
# Set compilation options
#
if ($uname == Linux) then # LINUX
set OS = Linux
set CONV=conv.linux
# if ($LINUX_FC == ifort || $LINUX_FC == ifc) then
if ($LINUX_FC == ifort || $LINUX_FC == mpif90) then
set MAKEAGRIF=Makefile.linux.mpif90
setenv CPP1 "fpp -free"
setenv CFT1 $LINUX_FC
setenv FFLAGS1 "-O3 -w90 -w95 -cm -72 -fno-alias -i4 -r8 -Vaxlib"
setenv LDFLAGS1 "-Vaxlib $LDFLAGS1"
### for 32 bit executable under 64 bit OS (Opteron ...)
# if (`uname -r` == 2.6.3-6mdksmp) then
# setenv FFLAGS1 "-Wl,-m elf_i386 $FFLAGS1"
# set MAKEAGRIF=Makefile.linux.ifc.64
# endif
else if ($LINUX_FC == g95) then
set MAKEAGRIF=Makefile.linux.g95
setenv CPP1 "cpp -traditional -DLinux"



After compile I face to following error massage:

[fdaryabor@tornado-01 Run]$ ./jobcomp
cp: No match.
cp: No match.
OPERATING SYSTEM IS: Linux
fpp: Command not found.
fpp: Command not found.
/bin/rm -rf core *.o AGRIFZOOM/AGRIF_YOURFILES/*.o *.i *.s *.f *.trace *.mod
/bin/rm -rf roms mpc cross_matrix cppcheck srcscheck checkkwds partit ncjoin ncrename ./rii_files
fpp -free -P /opt/pgi/linux86-64/7.1-2/include /opt/pgi/linux86-64/7.1-2/mpi/mpich/include mpc.F > mpc.f
/bin/sh: fpp: command not found
make: *** [mpc] Error 127
fpp -free -P /opt/pgi/linux86-64/7.1-2/include /opt/pgi/linux86-64/7.1-2/mpi/mpich/include main.F | ./mpc > main.f
/bin/sh: fpp: command not found
/bin/sh: ./mpc: No such file or directory
make: *** [main.o] Error 127
mv: cannot stat `roms': No such file or directory


IS anybody help me for fix it.

Best Regards
F.Daryabor

mathieu
Posts: 74
Joined: Fri Sep 17, 2004 2:22 pm
Location: Institut Rudjer Boskovic

Re: mpirun

#2 Unread post by mathieu »

I think this is ROMS agrif that you are trying to compile.
See https://gforge.inria.fr/forum/?group_id=735 and http://roms.mpl.ird.fr/ for questions.

Post Reply