[cig-commits] commit: add makefile and run example for the pangu cluster.

Mercurial hg at geodynamics.org
Wed Oct 19 18:45:28 PDT 2011


changeset:   32:6a477c89e160
tag:         tip
user:        Sylvain Barbot <sbarbot at caltech.edu>
date:        Wed Oct 19 18:45:20 2011 -0700
files:       examples/landers.sh examples/run1-pbs.sh makefile_pangu
description:
add makefile and run example for the pangu cluster.


diff -r 8077fdb82342 -r 6a477c89e160 examples/landers.sh
--- a/examples/landers.sh	Wed Oct 05 20:52:55 2011 -0700
+++ b/examples/landers.sh	Wed Oct 19 18:45:20 2011 -0700
@@ -44,7 +44,7 @@ fi
 fi
 
 time ../relax <<EOF $* --no-vtk-output --no-proj-output \
-	--no-stress-output | tee $ODIR/in.param
+	--no-stress-output | tee $WDIR/in.param
 # grid size (sx1,sx2,sx3)
 512 512 512
 # dx1  dx2  dx3 beta nyquist
diff -r 8077fdb82342 -r 6a477c89e160 examples/run1-pbs.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/run1-pbs.sh	Wed Oct 19 18:45:20 2011 -0700
@@ -0,0 +1,94 @@
+#!/bin/sh
+
+#PBS -l nodes=1:ppn=8
+#PBS -l walltime=0:02:60
+#PBS -q debug
+#PBS -N output1
+#PBS -o ./output1/out
+
+#change the working directory (default is home directory)
+#echo working directory: $PBS_O_WORKDIR
+cd $PBS_O_WORKDIR
+
+export MX_RCACHE=0
+
+WDIR=./output1
+if [ ! -e $WDIR ]; then
+        echo adding directory $WDIR
+	mkdir $WDIR
+fi
+
+# run this example on pangu, or another PBS queued cluster, with
+#
+#   qsub ./run1-pbs.sh
+#
+
+mpiexec -n 8 relax <<EOF
+# use '#' character to include comments in your input file
+# grid size (sx1,sx2,sx3)
+256 256 256
+# sampling size (in unit of length), smoothing (0-0.5) & nyquist (dx1,dx2,dx3,beta,nq)
+0.05 0.05 0.05 0.2 2
+# origin position & rotation
+0 0 0
+# geographic origin (longitude and latitude), UTM zone and real length unit (usually m or km)
+# displacements and stress are converted to lon/lat geographic coordinates
+# unit corresponds to a scaling from dx1,dx2,dx3 to real unit
+# use unit = 1   if dimensions are described in units of m
+# use unit = 1e3 if dimensions are described in units of km
+#120 22 51 1e3
+# observation depth for displacement and for stress (stress in only exported in GRD)
+0 0.5
+# output directory (all output written here)
+$WDIR
+# elastic parameters and gamma = (1-nu) rho g / mu = 8.33e-7 /m = 8.33e-4 /km
+1 1 8.33e-4
+# integration time (in unit of time), step (negative for automatic) and scaling of computed value
+20 -1 1
+# number of observation planes
+0
+# number of observation points
+0
+# number of Coulomb patches
+0
+# number of prestress interfaces
+0
+# number of linear viscous interfaces (where viscosity changes)
+2
+# no depth gammadot0 cohesion (gammadot0 is shear modulus divided by viscosity)
+   1   3.0       1.0      0.0
+   2   9.0       1.0      0.0
+# number of linear ductile zones
+0
+# number of powerlaw viscous interfaces
+0
+# number of friction faults
+0
+# number of interseismic loading strike-slip and opening
+0
+0
+# number of coseismic events (when slip distribution is prescribed)
+2
+# number of shear dislocations (strike-slip and dip-slip faulting)
+1
+# no slip x1 x2 x3 length width strike dip rake
+   1    1 -1  0  0      1     1      0  90    0
+# number of tensile cracks
+0
+# number of dilatation sources
+0
+# number of surface traction
+0
+# time of second event
+1
+# number of shear dislocations
+1
+# no slip x1 x2 x3 length width strike dip rake
+   1    1  0  0  0      1     1      0  90    0
+# number of tensile cracks
+0
+# number of dilatation sources
+0
+# number of surface traction
+0
+EOF
diff -r 8077fdb82342 -r 6a477c89e160 makefile_pangu
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefile_pangu	Wed Oct 19 18:45:20 2011 -0700
@@ -0,0 +1,43 @@
+# Makefile including the Intel Math Kernel Library (MKL) FFT and OpenMP parallelization.
+# Successful loading of libraries at runtime upon initialization of environment variable
+# 
+# export DYLD_LIBRARY_PATH="/opt/intel/Compiler/11.1/084/lib:$DYLD_LIBRARY_PATH"
+#
+# in bash_profile or equivalent. Check out the Intel link advisor online
+#
+# http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/
+#
+# to fit with your environment.
+
+GMTDIR=/panfs/panasas-1/opt/GMT4.5.5
+NETLIBDIR=/usr/lib64
+NETINCDIR=/usr/include/netcdf-4/
+MKLROOT=/opt/intel/Compiler/11.1/064
+
+INCPATH=-I/usr/include -I$(GMTDIR)/include -I$(NETINCDIR) 
+LIBPATH=-L$(NETLIBDIR) -L$(MKLROOT)/mkl/lib/em64t -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread
+LIBS=-lgmt -lnetcdf -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp -lpthread 
+
+CC=cc -em64
+F77=ifort
+FC=ifort -openmp
+
+FFLAGS=-cpp $(INCPATH) -zero -warn all
+F77FLAGS=-zero 
+CFLAGS=$(INCPATH)
+
+OBJ = types.o mkl_dfti.o fourier.o green.o elastic3d.o friction3d.o viscoelastic3d.o writegrd4.2.o export.o getdata.o getopt.o input.o relax.o
+
+%.o : %.c
+	$(CC) $(CFLAGS) -c $^
+
+%.o : %.f
+	$(F77) $(F77FLAGS) -c $^
+
+%.o : %.f90 include.f90 
+	$(FC) $(FFLAGS) -c $(filter-out include.f90,$^)
+
+relax: $(OBJ) 
+	$(FC) $(FFLAGS) -o $@ $(filter-out include.f90,$^) $(LIBPATH) $(LIBS)
+
+include clean.mk



More information about the CIG-COMMITS mailing list