[cig-commits] r16336 - in seismo/3D/SPECFEM3D_SESAME/trunk: . DATA EXAMPLES/homogeneous_halfspace UTILS UTILS/Cluster UTILS/Cluster/lsf UTILS/Cluster/lsf/remap_database UTILS/Cluster/pbs UTILS/Cluster/sge UTILS/Visualization/mesh2vtu decompose_mesh_SCOTCH

danielpeter at geodynamics.org danielpeter at geodynamics.org
Wed Feb 24 19:35:11 PST 2010


Author: danielpeter
Date: 2010-02-24 19:35:08 -0800 (Wed, 24 Feb 2010)
New Revision: 16336

Added:
   seismo/3D/SPECFEM3D_SESAME/trunk/DATA/CMTSOLUTION.default
   seismo/3D/SPECFEM3D_SESAME/trunk/DATA/Par_file.default
   seismo/3D/SPECFEM3D_SESAME/trunk/DATA/STATIONS.default
   seismo/3D/SPECFEM3D_SESAME/trunk/INSTALL
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/collect_seismos.in
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/go_generate_databases
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/go_solver
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/collect_seismo_lsf_multi.pl
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_generate_databases_lsf.bash
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_mesher_solver_lsf_basin.forward
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_mesher_solver_lsf_basin.kernel
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_solver_lsf.bash
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/compile
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/exit_mpi.f90
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/old_machines
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/remap.bash
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/remap_database.f90
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/run_lsf
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_lsf_machines.pl
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/run_lsf.bash
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/pbs/
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/pbs/go_generate_databases_pbs.bash
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/pbs/go_solver_pbs.bash
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/run3d.csh
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/sge/
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/sge/go_generate_databases_sge.bash
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/sge/go_solver_sge.bash
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/sge/run_sge.bash
Removed:
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/collect_seismo_lsf_multi.pl
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/go_mesher_solver_lsf_basin.forward
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/go_mesher_solver_lsf_basin.kernel
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/remap_database/
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/remap_lsf_machines.pl
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/run_lsf.bash
   seismo/3D/SPECFEM3D_SESAME/trunk/collect_seismos.in
   seismo/3D/SPECFEM3D_SESAME/trunk/go_generate_database_pbs.sesame.bash
   seismo/3D/SPECFEM3D_SESAME/trunk/go_mesher
   seismo/3D/SPECFEM3D_SESAME/trunk/go_solver
   seismo/3D/SPECFEM3D_SESAME/trunk/go_solver_pbs.sesame.bash
   seismo/3D/SPECFEM3D_SESAME/trunk/run3d.csh
Modified:
   seismo/3D/SPECFEM3D_SESAME/trunk/EXAMPLES/homogeneous_halfspace/README
   seismo/3D/SPECFEM3D_SESAME/trunk/README_SPECFEM3D
   seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Visualization/mesh2vtu/mesh2vtu.cxx
   seismo/3D/SPECFEM3D_SESAME/trunk/check_mesh_resolution.f90
   seismo/3D/SPECFEM3D_SESAME/trunk/create_movie_shakemap_AVS_DX_GMT.f90
   seismo/3D/SPECFEM3D_SESAME/trunk/create_regions_mesh.f90
   seismo/3D/SPECFEM3D_SESAME/trunk/decompose_mesh_SCOTCH/Makefile
   seismo/3D/SPECFEM3D_SESAME/trunk/decompose_mesh_SCOTCH/part_decompose_mesh_SCOTCH.f90
   seismo/3D/SPECFEM3D_SESAME/trunk/generate_databases.f90
   seismo/3D/SPECFEM3D_SESAME/trunk/prepare_timerun.f90
Log:
files and scripts related to clusters have been moved to subdirectory SPECFEM3D_SESAME/UTILS/Cluster; updated Makefile for decompose_mesh_SCOTCH and README for homogeneous EXAMPLES/; providing default simulation files Par_file.default,.. in DATA/ directory; updated check_mesh_resolution() routine

Added: seismo/3D/SPECFEM3D_SESAME/trunk/DATA/CMTSOLUTION.default
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/DATA/CMTSOLUTION.default	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/DATA/CMTSOLUTION.default	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,13 @@
+PDE  1999 01 01 00 00 00.00  67000 67000 -25000 4.2 4.2 hom_explosion
+event name:       hom_explosion
+time shift:       0.0000
+half duration:    5.0
+latitude:       67000.0
+longitude:      67000.0
+depth:         -25000.0
+Mrr:       1.000000e+23
+Mtt:       1.000000e+23
+Mpp:       1.000000e+23
+Mrt:       0.000000
+Mrp:       0.000000
+Mtp:       0.000000

Added: seismo/3D/SPECFEM3D_SESAME/trunk/DATA/Par_file.default
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/DATA/Par_file.default	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/DATA/Par_file.default	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,51 @@
+
+# forward or adjoint simulation
+SIMULATION_TYPE                 = 1   # 1 = forward, 2 = adjoint, 3 = both simultaneously
+SAVE_FORWARD                    = .false.
+
+# UTM projection parameters
+UTM_PROJECTION_ZONE             = 11
+SUPPRESS_UTM_PROJECTION         = .true.
+
+# number of MPI processors 
+NPROC                           = 4
+
+# time step parameters
+NSTEP                           = 1000
+DT                              = 0.05d0
+
+# parameters describing the model
+OCEANS                          = .false.
+TOPOGRAPHY                      = .false.
+ATTENUATION                     = .false.
+USE_OLSEN_ATTENUATION           = .false.
+ANISOTROPY                      = .false.
+
+# absorbing boundary conditions for a regional simulation
+ABSORBING_CONDITIONS            = .false.
+
+# save AVS or OpenDX movies
+MOVIE_SURFACE                   = .false.
+MOVIE_VOLUME                    = .false.
+NTSTEP_BETWEEN_FRAMES           = 200
+CREATE_SHAKEMAP                 = .false.
+SAVE_DISPLACEMENT               = .false.
+USE_HIGHRES_FOR_MOVIES          = .false.
+HDUR_MOVIE                      = 0.0
+
+# save AVS or OpenDX mesh files to check the mesh
+SAVE_MESH_FILES                 = .true.
+
+# path to store the local database file on each node
+LOCAL_PATH                      = DATABASES_MPI
+
+# interval at which we output time step info and max of norm of displacement
+NTSTEP_BETWEEN_OUTPUT_INFO      = 500
+
+# interval in time steps for writing of seismograms
+NTSTEP_BETWEEN_OUTPUT_SEISMOS   = 10000
+
+# print source time function
+PRINT_SOURCE_TIME_FUNCTION      = .false.
+
+

Added: seismo/3D/SPECFEM3D_SESAME/trunk/DATA/STATIONS.default
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/DATA/STATIONS.default	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/DATA/STATIONS.default	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,224 @@
+X1 DB 67000.00 0.000000 0.0 0.0
+X2 DB 67000.00 1196.429 0.0 0.0
+X3 DB 67000.00 2392.857 0.0 0.0
+X4 DB 67000.00 3589.286 0.0 0.0
+X5 DB 67000.00 4785.714 0.0 0.0
+X6 DB 67000.00 5982.143 0.0 0.0
+X7 DB 67000.00 7178.571 0.0 0.0
+X8 DB 67000.00 8375.000 0.0 0.0
+X9 DB 67000.00 9571.429 0.0 0.0
+X10 DB 67000.00 10767.86 0.0 0.0
+X11 DB 67000.00 11964.29 0.0 0.0
+X12 DB 67000.00 13160.71 0.0 0.0
+X13 DB 67000.00 14357.14 0.0 0.0
+X14 DB 67000.00 15553.57 0.0 0.0
+X15 DB 67000.00 16750.00 0.0 0.0
+X16 DB 67000.00 17946.43 0.0 0.0
+X17 DB 67000.00 19142.86 0.0 0.0
+X18 DB 67000.00 20339.29 0.0 0.0
+X19 DB 67000.00 21535.71 0.0 0.0
+X20 DB 67000.00 22732.14 0.0 0.0
+X21 DB 67000.00 23928.57 0.0 0.0
+X22 DB 67000.00 25125.00 0.0 0.0
+X23 DB 67000.00 26321.43 0.0 0.0
+X24 DB 67000.00 27517.86 0.0 0.0
+X25 DB 67000.00 28714.29 0.0 0.0
+X26 DB 67000.00 29910.71 0.0 0.0
+X27 DB 67000.00 31107.14 0.0 0.0
+X28 DB 67000.00 32303.57 0.0 0.0
+X29 DB 67000.00 33500.00 0.0 0.0
+X30 DB 67000.00 34696.43 0.0 0.0
+X31 DB 67000.00 35892.86 0.0 0.0
+X32 DB 67000.00 37089.29 0.0 0.0
+X33 DB 67000.00 38285.71 0.0 0.0
+X34 DB 67000.00 39482.14 0.0 0.0
+X35 DB 67000.00 40678.57 0.0 0.0
+X36 DB 67000.00 41875.00 0.0 0.0
+X37 DB 67000.00 43071.43 0.0 0.0
+X38 DB 67000.00 44267.86 0.0 0.0
+X39 DB 67000.00 45464.29 0.0 0.0
+X40 DB 67000.00 46660.71 0.0 0.0
+X41 DB 67000.00 47857.14 0.0 0.0
+X42 DB 67000.00 49053.57 0.0 0.0
+X43 DB 67000.00 50250.00 0.0 0.0
+X44 DB 67000.00 51446.43 0.0 0.0
+X45 DB 67000.00 52642.86 0.0 0.0
+X46 DB 67000.00 53839.29 0.0 0.0
+X47 DB 67000.00 55035.71 0.0 0.0
+X48 DB 67000.00 56232.14 0.0 0.0
+X49 DB 67000.00 57428.57 0.0 0.0
+X50 DB 67000.00 58625.00 0.0 0.0
+X51 DB 67000.00 59821.43 0.0 0.0
+X52 DB 67000.00 61017.86 0.0 0.0
+X53 DB 67000.00 62214.29 0.0 0.0
+X54 DB 67000.00 63410.71 0.0 0.0
+X55 DB 67000.00 64607.14 0.0 0.0
+X56 DB 67000.00 65803.57 0.0 0.0
+X57 DB 67000.00 67000.00 0.0 0.0
+X58 DB 67000.00 68196.43 0.0 0.0
+X59 DB 67000.00 69392.86 0.0 0.0
+X60 DB 67000.00 70589.29 0.0 0.0
+X61 DB 67000.00 71785.71 0.0 0.0
+X62 DB 67000.00 72982.14 0.0 0.0
+X63 DB 67000.00 74178.57 0.0 0.0
+X64 DB 67000.00 75375.00 0.0 0.0
+X65 DB 67000.00 76571.43 0.0 0.0
+X66 DB 67000.00 77767.86 0.0 0.0
+X67 DB 67000.00 78964.29 0.0 0.0
+X68 DB 67000.00 80160.71 0.0 0.0
+X69 DB 67000.00 81357.14 0.0 0.0
+X70 DB 67000.00 82553.57 0.0 0.0
+X71 DB 67000.00 83750.00 0.0 0.0
+X72 DB 67000.00 84946.43 0.0 0.0
+X73 DB 67000.00 86142.86 0.0 0.0
+X74 DB 67000.00 87339.29 0.0 0.0
+X75 DB 67000.00 88535.71 0.0 0.0
+X76 DB 67000.00 89732.14 0.0 0.0
+X77 DB 67000.00 90928.57 0.0 0.0
+X78 DB 67000.00 92125.00 0.0 0.0
+X79 DB 67000.00 93321.43 0.0 0.0
+X80 DB 67000.00 94517.86 0.0 0.0
+X81 DB 67000.00 95714.29 0.0 0.0
+X82 DB 67000.00 96910.71 0.0 0.0
+X83 DB 67000.00 98107.14 0.0 0.0
+X84 DB 67000.00 99303.57 0.0 0.0
+X85 DB 67000.00 100500.0 0.0 0.0
+X86 DB 67000.00 101696.4 0.0 0.0
+X87 DB 67000.00 102892.9 0.0 0.0
+X88 DB 67000.00 104089.3 0.0 0.0
+X89 DB 67000.00 105285.7 0.0 0.0
+X90 DB 67000.00 106482.1 0.0 0.0
+X91 DB 67000.00 107678.6 0.0 0.0
+X92 DB 67000.00 108875.0 0.0 0.0
+X93 DB 67000.00 110071.4 0.0 0.0
+X94 DB 67000.00 111267.9 0.0 0.0
+X95 DB 67000.00 112464.3 0.0 0.0
+X96 DB 67000.00 113660.7 0.0 0.0
+X97 DB 67000.00 114857.1 0.0 0.0
+X98 DB 67000.00 116053.6 0.0 0.0
+X99 DB 67000.00 117250.0 0.0 0.0
+X100 DB 67000.00 118446.4 0.0 0.0
+X101 DB 67000.00 119642.9 0.0 0.0
+X102 DB 67000.00 120839.3 0.0 0.0
+X103 DB 67000.00 122035.7 0.0 0.0
+X104 DB 67000.00 123232.1 0.0 0.0
+X105 DB 67000.00 124428.6 0.0 0.0
+X106 DB 67000.00 125625.0 0.0 0.0
+X107 DB 67000.00 126821.4 0.0 0.0
+X108 DB 67000.00 128017.9 0.0 0.0
+X109 DB 67000.00 129214.3 0.0 0.0
+X110 DB 67000.00 130410.7 0.0 0.0
+X111 DB 67000.00 131607.1 0.0 0.0
+X112 DB 67000.00 132803.6 0.0 0.0
+Y1 DB 0.000000 67000.00 0.0 0.0
+Y2 DB 1196.429 67000.00 0.0 0.0
+Y3 DB 2392.857 67000.00 0.0 0.0
+Y4 DB 3589.286 67000.00 0.0 0.0
+Y5 DB 4785.714 67000.00 0.0 0.0
+Y6 DB 5982.143 67000.00 0.0 0.0
+Y7 DB 7178.571 67000.00 0.0 0.0
+Y8 DB 8375.000 67000.00 0.0 0.0
+Y9 DB 9571.429 67000.00 0.0 0.0
+Y10 DB 10767.86 67000.00 0.0 0.0
+Y11 DB 11964.29 67000.00 0.0 0.0
+Y12 DB 13160.71 67000.00 0.0 0.0
+Y13 DB 14357.14 67000.00 0.0 0.0
+Y14 DB 15553.57 67000.00 0.0 0.0
+Y15 DB 16750.00 67000.00 0.0 0.0
+Y16 DB 17946.43 67000.00 0.0 0.0
+Y17 DB 19142.86 67000.00 0.0 0.0
+Y18 DB 20339.29 67000.00 0.0 0.0
+Y19 DB 21535.71 67000.00 0.0 0.0
+Y20 DB 22732.14 67000.00 0.0 0.0
+Y21 DB 23928.57 67000.00 0.0 0.0
+Y22 DB 25125.00 67000.00 0.0 0.0
+Y23 DB 26321.43 67000.00 0.0 0.0
+Y24 DB 27517.86 67000.00 0.0 0.0
+Y25 DB 28714.29 67000.00 0.0 0.0
+Y26 DB 29910.71 67000.00 0.0 0.0
+Y27 DB 31107.14 67000.00 0.0 0.0
+Y28 DB 32303.57 67000.00 0.0 0.0
+Y29 DB 33500.00 67000.00 0.0 0.0
+Y30 DB 34696.43 67000.00 0.0 0.0
+Y31 DB 35892.86 67000.00 0.0 0.0
+Y32 DB 37089.29 67000.00 0.0 0.0
+Y33 DB 38285.71 67000.00 0.0 0.0
+Y34 DB 39482.14 67000.00 0.0 0.0
+Y35 DB 40678.57 67000.00 0.0 0.0
+Y36 DB 41875.00 67000.00 0.0 0.0
+Y37 DB 43071.43 67000.00 0.0 0.0
+Y38 DB 44267.86 67000.00 0.0 0.0
+Y39 DB 45464.29 67000.00 0.0 0.0
+Y40 DB 46660.71 67000.00 0.0 0.0
+Y41 DB 47857.14 67000.00 0.0 0.0
+Y42 DB 49053.57 67000.00 0.0 0.0
+Y43 DB 50250.00 67000.00 0.0 0.0
+Y44 DB 51446.43 67000.00 0.0 0.0
+Y45 DB 52642.86 67000.00 0.0 0.0
+Y46 DB 53839.29 67000.00 0.0 0.0
+Y47 DB 55035.71 67000.00 0.0 0.0
+Y48 DB 56232.14 67000.00 0.0 0.0
+Y49 DB 57428.57 67000.00 0.0 0.0
+Y50 DB 58625.00 67000.00 0.0 0.0
+Y51 DB 59821.43 67000.00 0.0 0.0
+Y52 DB 61017.86 67000.00 0.0 0.0
+Y53 DB 62214.29 67000.00 0.0 0.0
+Y54 DB 63410.71 67000.00 0.0 0.0
+Y55 DB 64607.14 67000.00 0.0 0.0
+Y56 DB 65803.57 67000.00 0.0 0.0
+Y57 DB 67000.00 67000.00 0.0 0.0
+Y58 DB 68196.43 67000.00 0.0 0.0
+Y59 DB 69392.86 67000.00 0.0 0.0
+Y60 DB 70589.29 67000.00 0.0 0.0
+Y61 DB 71785.71 67000.00 0.0 0.0
+Y62 DB 72982.14 67000.00 0.0 0.0
+Y63 DB 74178.57 67000.00 0.0 0.0
+Y64 DB 75375.00 67000.00 0.0 0.0
+Y65 DB 76571.43 67000.00 0.0 0.0
+Y66 DB 77767.86 67000.00 0.0 0.0
+Y67 DB 78964.29 67000.00 0.0 0.0
+Y68 DB 80160.71 67000.00 0.0 0.0
+Y69 DB 81357.14 67000.00 0.0 0.0
+Y70 DB 82553.57 67000.00 0.0 0.0
+Y71 DB 83750.00 67000.00 0.0 0.0
+Y72 DB 84946.43 67000.00 0.0 0.0
+Y73 DB 86142.86 67000.00 0.0 0.0
+Y74 DB 87339.29 67000.00 0.0 0.0
+Y75 DB 88535.71 67000.00 0.0 0.0
+Y76 DB 89732.14 67000.00 0.0 0.0
+Y77 DB 90928.57 67000.00 0.0 0.0
+Y78 DB 92125.00 67000.00 0.0 0.0
+Y79 DB 93321.43 67000.00 0.0 0.0
+Y80 DB 94517.86 67000.00 0.0 0.0
+Y81 DB 95714.29 67000.00 0.0 0.0
+Y82 DB 96910.71 67000.00 0.0 0.0
+Y83 DB 98107.14 67000.00 0.0 0.0
+Y84 DB 99303.57 67000.00 0.0 0.0
+Y85 DB 100500.0 67000.00 0.0 0.0
+Y86 DB 101696.4 67000.00 0.0 0.0
+Y87 DB 102892.9 67000.00 0.0 0.0
+Y88 DB 104089.3 67000.00 0.0 0.0
+Y89 DB 105285.7 67000.00 0.0 0.0
+Y90 DB 106482.1 67000.00 0.0 0.0
+Y91 DB 107678.6 67000.00 0.0 0.0
+Y92 DB 108875.0 67000.00 0.0 0.0
+Y93 DB 110071.4 67000.00 0.0 0.0
+Y94 DB 111267.9 67000.00 0.0 0.0
+Y95 DB 112464.3 67000.00 0.0 0.0
+Y96 DB 113660.7 67000.00 0.0 0.0
+Y97 DB 114857.1 67000.00 0.0 0.0
+Y98 DB 116053.6 67000.00 0.0 0.0
+Y99 DB 117250.0 67000.00 0.0 0.0
+Y100 DB 118446.4 67000.00 0.0 0.0
+Y101 DB 119642.9 67000.00 0.0 0.0
+Y102 DB 120839.3 67000.00 0.0 0.0
+Y103 DB 122035.7 67000.00 0.0 0.0
+Y104 DB 123232.1 67000.00 0.0 0.0
+Y105 DB 124428.6 67000.00 0.0 0.0
+Y106 DB 125625.0 67000.00 0.0 0.0
+Y107 DB 126821.4 67000.00 0.0 0.0
+Y108 DB 128017.9 67000.00 0.0 0.0
+Y109 DB 129214.3 67000.00 0.0 0.0
+Y110 DB 130410.7 67000.00 0.0 0.0
+Y111 DB 131607.1 67000.00 0.0 0.0
+Y112 DB 132803.6 67000.00 0.0 0.0

Modified: seismo/3D/SPECFEM3D_SESAME/trunk/EXAMPLES/homogeneous_halfspace/README
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/EXAMPLES/homogeneous_halfspace/README	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/EXAMPLES/homogeneous_halfspace/README	2010-02-25 03:35:08 UTC (rev 16336)
@@ -4,6 +4,10 @@
 
 step-by-step tutorial:
 
+0. check that all software is available (or that modules are loaded):
+     intel/openmpi, cubit, scotch, gnuplot
+
+
 1. configure package:
    
    - From the SPECFEM3D_SESAME root directory /SPECFEM3D_SESAME/
@@ -44,24 +48,24 @@
 
 3. decompose mesh files:
 
-   - run decomposer in directory /SPECFEM3D_SESAME/decompose_mesh_SCOTCH/:
-     (example assumes 4 partitions with mesh files in ../EXAMPLES/homogeneous_halfspace/MESH/)
-     > cd /SPECFEM3D_SESAME/decompose_mesh_SCOTCH
+   - compile decomposer in directory /SPECFEM3D_SESAME/decompose_mesh_SCOTCH/:
      > make
 
      NOTE 1: check that the two scotch libraries are properly specified in Makefile
      NOTE 2: compile with the same compiler (ifort or gfortran) used
               for the SCOTCH libraries
 
+   - run decomposer in directory
+     (example assumes 4 partitions with mesh files in ../EXAMPLES/homogeneous_halfspace/MESH/)
      > ./xdecompose_mesh_SCOTCH 4 ../EXAMPLES/homogeneous_halfspace/MESH/ ../DATABASES_MPI/ 
             
-     which creates mesh partitions "proc0000***_Database" in directory DATABASES_MPI/.
+     this creates mesh partitions "proc000***_Database" in directory DATABASES_MPI/.
      (you can then specify "DATABASES_MPI" in "Par_file" for your "LOCAL_PATH")
 
 
 4. generate databases:
 
-   - copy three files -- Par_file, CMTSOLUTION, STATIONS -- from
+   - copy three files -- Par_file CMTSOLUTION STATIONS -- from
       /SPECFEM3D_SESAME/EXAMPLES/homogeneous_halfspace/ to /SPECFEM3D_SESAME/DATA/
 
    - compile generate_databases from /SPECFEM3D_SESAME/ :    
@@ -86,7 +90,8 @@
    - submit job script:
      > qsub go_solver_pbs.sesame.bash
 
-     NOTE 1: this script will need to be tailored to your cluster
+     NOTE 1: this script will need to be tailored to your cluster, e.g.,
+             > bsub < go_solver_lsf.sesame.bash
      NOTE 2: the simulation runs on 4 cores and should take about 15 minutes,
              and you can track the progress with the timestamp files
      NOTE 3: you should have 672 x 3 (semd,semv,sema) seismograms in OUTPUT_FILES
@@ -119,13 +124,10 @@
 
 7. plot your output seismograms in /SPECFEM3D_SESAME/OUTPUT_FILES/
 
-   - copy gnuplot script X1-50.BHZ.gnuplot to local directory:
-     > cp /SPECFEM3D_SESAME/EXAMPLES/homogeneous_halfspace/REF_SEIS/X1-50.BHZ.gnuplot /SPECFEM3D_SESAME/OUTPUT_FILES
-
+   - copy gnuplot script X1-50.BHZ.gnuplot to OUTPUT_FILES/
    - execute same commands as above
-
    - you should see the same image as generated from the reference seismograms,
-      but the record length is 25 s (instead of 42 s)
+      but the record length is a bit longer (42.4500 vs 41.24350)
 
 ===========================================================
 

Added: seismo/3D/SPECFEM3D_SESAME/trunk/INSTALL
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/INSTALL	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/INSTALL	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,183 @@
+
+!=======================================================================!
+!                                                                       !
+!   specfem3D is a 3-D spectral-element solver for the Earth.           !
+!   It uses a mesh generated by program meshfem3D                       !
+!                                                                       !
+!=======================================================================!
+
+Instructions on how to install and use SPECFEM3D are
+available in the manual located in directory USER_MANUAL.
+
+Main developers: Dimitri Komatitsch and Jeroen Tromp
+
+Additional contributions by:
+
+Qinya Liu
+Min Chen
+
+
+
+Basic installation
+------------------
+
+1. untar the SPECFEM3D_SESAME package: 
+
+   > tar -zxvf SPECFEM3D_SESAME*.tar.gz 
+
+   in the following, we will assume you set the root directory of the 
+   package name to:
+   
+   SPECFEM3D_SESAME/
+   
+2. configure the software for your system:
+
+    > cd SPECFEM3D_SESAME/
+    > ./configure
+
+    by default, it uses gfortran as a Fortran compiler, mpif90 for MPI compilation
+    and gcc as a C compiler. 
+    
+    in order to use a different compiler, use for example:
+    
+        > ./configure FC=ifort
+  
+    in this case, it would make use of
+    
+    - ifort, Intel Fortran Compiler 
+      (see http://software.intel.com/en-us/intel-compilers/ )
+      with which we see very good performance results.   
+        
+    - a default MPI installation which provides mpif90 as fortran wrapper command.     
+      An excellent package is provided by Open MPI (see http://www.open-mpi.org/).
+      
+      for the example above, you would make sure that the mpif90 command 
+      would also use ifort as a Fortran compiler.
+    
+    - a C compiler provided from the GNU compiler collection (see http://gcc.gnu.org/).
+    
+    in case `configure` was successful, it will create the files:
+
+    ./Makefile
+    ./constants.h
+    ./precision.h
+    
+    please make sure, your installation is working and that 
+    the created files 'constant.h' and 'Makefile' satisfy
+    your needs. 
+
+    more information is given in the manual provided in USERS_MANUAL.
+
+3. compile the package:
+
+   for the complete compilation of the package, you must provide: 
+   ./DATA/Par_file 
+   ./DATA/CMTSOLUTION 
+   ./DATA/STATIONS
+
+   default simulation files are provided in the directory DATA/ which you can
+   use as the ones needed above:
+   > cp DATA/Par_file.default DATA/Par_file
+   > cp DATA/CMTSOLUTION.default DATA/CMTSOLUTION
+   > cp DATA/STATIONS.default DATA/STATIONS
+
+   then type
+
+   > make
+   
+   
+well done!
+
+
+
+
+Configure options
+-----------------
+
+'configure' accepts the following options:
+
+FC                          Fortran90 compiler command name, 
+                            default is 'gfortran'
+ 
+MPIFC                       MPI Fortran90 command name, 
+                            default is 'mpif90'
+
+CC                          C compiler command name,
+                            default is 'gcc'
+
+FLAGS_CHECK                 Compiler flags for non-critical subroutines, 
+                            default is '-O3'
+                  
+FLAGS_NO_CHECK              Compiler flags for creating fast, production-run code for 
+                            critical subroutines,
+                            default is '-O3'
+
+LOCAL_PATH_IS_ALSO_GLOBAL   Directory LOCAL_PATH (specified in DATA/Par_file) on the
+                            cluster can be accessed by all compute nodes ('true') or not ('false'),
+                            default is 'true'
+
+
+and flags:
+
+
+--enable-double-precision   The package can run either in single or in double precision.
+                            default is single precision 
+                            
+--help                      Directs configure to print a usage screen 
+                            
+
+run with 
+  ./configure <option>=<my_option> --<flag>
+  
+
+Compiler specific flags are set in file 'flags.guess' in order to provide
+suitable default options for different compilers. 
+
+you might however want to modify the created 'Makefile' and specify your best 
+system compiler flags in order to ensure optimal performance of the code. 
+
+
+
+
+
+Troobleshooting
+---------------
+
+FAQ
+
+1. configuration fails:
+
+   Examine the log file 'config.log'. It contains detailed informations.
+   in many cases, the path's to these specific compiler commands F90, 
+   CC and MPIF90 won't be correct if `configure` fails.
+   
+   please make sure that you have a working installation of a Fortran compiler, 
+   a C compiler and an MPI implementation. you should be able to compile this
+   little program code:
+   
+      program main
+        include 'mpif.h'
+        integer, parameter :: CUSTOM_MPI_TYPE = MPI_REAL
+        integer ier
+        call MPI_INIT(ier)
+        call MPI_BARRIER(MPI_COMM_WORLD,ier)
+        call MPI_FINALIZE(ier)
+      end
+
+    
+2. compilation fails stating :
+    ... 
+    obj/program_generate_databases.o: In function `MAIN__':
+    program_generate_databases.f90:(.text+0x14): undefined reference to `_gfortran_set_std'    
+    ...
+    
+  make sure, you're pointing to the right 'mpif90' wrapper command. 
+  
+  normally, this message will appear when you're mixing two different fortran
+  compilers. that is, using e.g. gfortran to compile non-MPI files 
+  and mpif90, wrapper provided for e.g. ifort, to compile MPI-files. 
+  
+  fix: e.g. specify > ./configure FC=gfortran MPIF90=/usr/local/openmpi-gfortran/bin/mpif90
+  
+  
+       

Modified: seismo/3D/SPECFEM3D_SESAME/trunk/README_SPECFEM3D
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/README_SPECFEM3D	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/README_SPECFEM3D	2010-02-25 03:35:08 UTC (rev 16336)
@@ -31,7 +31,7 @@
 !=============================================================================!
 
 Instructions on how to install and use SPECFEM3D are
-available in the manual located in DATA/util/manual.
+available in the manual located in directory USER_MANUAL.
 
 Main developers: Dimitri Komatitsch and Jeroen Tromp
 
@@ -201,26 +201,18 @@
 
 MESHER (generate_databases):
 
-- The mesher generate_databases needs NPROC_XI * NPROC_ETA processors. NPROC_XI and
-  NPROC_ETA do not need to be equal.
-- Note that NPROC_XI = 1 or NPROC_ETA = 1 is valid (in case you have a
+- The mesher generate_databases needs NPROC processors. 
+- Note that NPROC = 1 is valid (in case you have a
   machine with a small number of processors). Therefore the code can
   if needed run serially on one processor only (in such a case,
   still link with MPI, and use "mpirun -np 1")
-- NEX_XI and NEX_ETA need to be 8 * multiple of NPROC_XI and NPROC_ETA,
-  respectively.
-- In the Par_file, define the size of the mesh. The mesher and the solver
-  use UTM coordinates internally, therefore you also need to define
+- In the Par_file, define the type of the mesh. The mesher and the solver
+  can use UTM coordinates internally, therefore you also need to define
   the zone number for the UTM projection (e.g., zone 11 for Los Angeles).
   Use decimal values for latitude and longitude (no minutes/seconds).
   These values are approximate, the mesher will round them off to define
   a square mesh in UTM coordinates.
 
-  LATITUDE_MIN           ! minimum latitude in the block  (negative for South)
-  LATITUDE_MAX           ! maximum latitude in the block
-  LONGITUDE_MIN          ! minimum longitude in the block (negative for West)
-  LONGITUDE_MAX          ! maximum longitude in the block
-  DEPTH_BLOCK_KM         ! depth of bottom of mesh in km
   UTM_PROJECTION_ZONE    ! zone of the UTM projection (e.g. 11 for Los Angeles)
 
 - set all the parameters in DATA/Par_file, in particular the following:
@@ -283,7 +275,7 @@
 - For reasons of speed, the solver uses static memory allocation. Therefore it
   needs to be recompiled every time one reruns the mesher. The mesher uses
   dynamic allocation only, and does not need to be recompiled.
-- The solver needs NPROC_XI * NPROC_ETA processors (same as the mesher)
+- The solver needs NPROC processors (same as the mesher)
 - The solver needs the DATA/CMTSOLUTION file for the source and the
   DATA/STATIONS file for the list of stations
 - Set the "time shift" in the CMTSOLUTION file to 0.0
@@ -341,7 +333,7 @@
 On a large serial machine, one may want to run a serial version of the code without MPI.
 To do this, one needs to:
 
-- set NPROC_XI = NPROC_ETA = 1 in DATA/Par_file
+- set NPROC = 1 in DATA/Par_file
 - type "make generate_databases_serial" and "make specfem3D_serial" instead of
     "make generate_databases" and "make specfem3D"
 - run the code serially with "./xgenerate_databases" and "./xspecfem3D"
@@ -349,7 +341,7 @@
 BUG REPORTS:
 
 To report bugs or suggest improvements to the code, please send an email
-to Jeroen Tromp <jtromp AT caltech.edu> and/or use our online
+to Jeroen Tromp <jtromp AT princeton.edu> and/or use our online
 bug tracking system at http://www.geodynamics.org/roundup .
 
 Note: The Gauss-Lobatto subroutines in gll_library.f90 are based in part on

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/collect_seismos.in
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/collect_seismos.in	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/collect_seismos.in	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,2 @@
+1
+78

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/go_generate_databases
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/go_generate_databases	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/go_generate_databases	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,57 @@
+#!/bin/csh
+
+# script to run the mesher
+
+# read DATA/Par_file to get information about the run
+
+# name of the file that contains the list of machines
+set machine_file = "mymachines"
+
+set my_local_path = `grep LOCAL_PATH DATA/Par_file | cut -d '=' -f 2 `
+
+# compute total number of processors needed
+set NPROC = `grep NPROC DATA/Par_file | cut -d '=' -f 2 `
+
+# total number of processors is the product of the values read
+@ numprocessors = $NPROC
+
+rm -r -f OUTPUT_FILES
+mkdir OUTPUT_FILES
+
+rm -f sources timestamp* PI* error_message* starttimeloop*
+
+if ( ! -d $my_local_path ) mkdir $my_local_path
+
+if ( -f $machine_file ) then
+  echo " "
+  echo using machine file \"$machine_file\"
+  echo " "
+  echo list of active machines:
+  echo " "
+  cat $machine_file
+  echo " "
+# this only used on a cluster if specifying list of machines
+# assumes the name of the machines is n001, n002 etc...
+# if name is different then change the  tr -d 'n' below
+  grep -v '#' $machine_file | tr -d ' ' | tr -d 'n' > OUTPUT_FILES/filtered_machines.txt
+endif
+
+echo NPROC = $NPROC
+echo " "
+echo starting MPI mesher on $numprocessors processors
+echo " "
+echo starting run in current directory $PWD
+echo " "
+echo mesh files will be saved in directory $my_local_path
+echo " "
+
+#### use this on Beowulf
+set MPIRUN="mpirun"
+$MPIRUN -nolocal -machinefile $machine_file -np $numprocessors $PWD/xgenerate_databases
+
+#### use this on SGI
+# mpirun -np $numprocessors xgenerate_databases
+
+#### use this on Compaq Dec Alpha
+# dmpirun -np $numprocessors xgenerate_databases
+


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/go_generate_databases
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/go_solver
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/go_solver	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/go_solver	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,48 @@
+#!/bin/csh
+
+# script to run the solver
+
+# read DATA/Par_file to get information about the run
+
+# name of the file that contains the list of machines
+set machine_file = "mymachines"
+
+set my_local_path = `grep LOCAL_PATH DATA/Par_file | cut -d '=' -f 2 `
+
+# compute total number of processors needed
+set NPROC = `grep NPROC DATA/Par_file | cut -d '=' -f 2 `
+
+# total number of processors is the product of the values read
+@ numprocessors = $NPROC
+
+rm -f sources error*txt starttimeloop* timestamp* PI* RECORDHEADERS
+
+if ( -f $machine_file ) then
+  echo " "
+  echo using machine file \"$machine_file\"
+  echo " "
+  echo list of active machines:
+  echo " "
+  cat $machine_file
+  echo " "
+endif
+
+echo NPROC = $NPROC
+echo " "
+echo starting MPI solver on $numprocessors processors
+echo " "
+echo starting run in current directory $PWD
+echo " "
+echo mesh files will be read from directory $my_local_path
+echo " "
+
+#### use this on Beowulf
+set MPIRUN="mpirun"
+$MPIRUN -nolocal -machinefile $machine_file -np $numprocessors $PWD/xspecfem3D 
+
+#### use this on SGI
+# mpirun -np $numprocessors xspecfem3D
+
+#### use this on Compaq Dec Alpha
+# dmpirun -np $numprocessors xspecfem3D
+


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/go_solver
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/collect_seismo_lsf_multi.pl
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/collect_seismo_lsf_multi.pl	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/collect_seismo_lsf_multi.pl	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,49 @@
+#!/usr/bin/perl -w
+
+# this script collects the seismograms from the scratch sub-directory given by Par_file
+# Qinya Liu, May 2007, Caltech
+
+if (@ARGV != 2) {die("collect_seismo_lsf_multi.pl lsf_machinefile Par_file\n");}
+
+$machine = $ARGV[0];
+$par_file = $ARGV[1];
+
+open(FILE,"$machine") or die("Error opening file $machine\n");
+($junk1) = <FILE>;
+close(FILE);
+(@junk2) = split(" ",$junk1);
+for($i=0;$i<@junk2/2;$i++) {
+$junk[$i] = $junk2[2*$i];}
+  
+
+for($i=0;$i<@junk;$i++) {
+  ($node) = split(" ",$junk[$i]);
+  push(@nodes,$node);
+}
+
+# now get the LOCAL_PATH
+open(FILE3,"<$par_file") or die ("Fatal Error openning file $par_file\n");
+while (<FILE3>) {
+   if ($_ =~ /^LOCAL_PATH/) {
+	chop;	
+	@vals = split("=", $_);
+	$mpidir = $vals[1];
+	$mpidir =~ s/^\s+//;
+	$mpidir =~ s/\s+$//;
+	close(FILE3);
+	last;
+   }
+}
+
+open(FILE2,">procs.list");
+for ($i=0;$i<@nodes;$i++) {print FILE2 "$nodes[$i]\n";}
+close(FILE2);
+
+print "@nodes\n";
+
+foreach $node (@nodes) {
+    system("scp $node:$mpidir/*sem* .");
+    print "$node\n";}
+
+#`shmux -M50 -Sall -c "rm -f $mpidir/*sem?" - < $machine`;
+


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/collect_seismo_lsf_multi.pl
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_generate_databases_lsf.bash
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_generate_databases_lsf.bash	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_generate_databases_lsf.bash	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+## job name and output file
+#BSUB -J go_mesher
+#BSUB -o OUTPUT_FILES/%J.o
+#BSUB -e OUTPUT_FILES/%J.e
+
+###########################################################
+# USER PARAMETERS
+
+## 4 CPUs ( 4  ), walltime 1 hour
+#BSUB -n 4
+#BSUB -R span[ptile=4]
+#BSUB -q short_parallel
+
+#BSUB -a openmpi
+
+###########################################################
+
+if [ -z $USER ]; then
+	echo "could not run go_mesher_...bash as no USER env is set"
+	exit 2
+fi
+
+# script to run the mesher and the solver
+# read DATA/Par_file to get information about the run
+# compute total number of nodes needed
+NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2 `
+
+# total number of nodes is the product of the values read
+numnodes=$NPROC
+
+cp DATA/Par_file OUTPUT_FILES/
+
+# obtain lsf job information
+cat $LSB_DJOB_HOSTFILE > OUTPUT_FILES/compute_nodes
+echo "$LSB_JOBID" > OUTPUT_FILES/jobid
+
+echo starting MPI mesher on $numnodes processors
+echo " "
+
+sleep 2 
+mpirun.lsf $PWD/xgenerate_databases
+
+echo "done "


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_generate_databases_lsf.bash
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_mesher_solver_lsf_basin.forward
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_mesher_solver_lsf_basin.forward	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_mesher_solver_lsf_basin.forward	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,25 @@
+#!/bin/bash -v
+#BSUB -o OUTPUT_FILES/%J.o
+#BSUB -a mpich_gm
+#BSUB -J specfem_forward
+
+# this is regular forward solver script
+# Qinya Liu, May 2007, Caltech
+
+BASEMPIDIR=/scratch/$USER/DATABASES_MPI
+
+echo "$LSB_MCPU_HOSTS" > OUTPUT_FILES/lsf_machines
+echo "$LSB_JOBID" > OUTPUT_FILES/jobid
+
+remap_lsf_machines.pl OUTPUT_FILES/lsf_machines > OUTPUT_FILES/machines
+
+shmux -M50 -Sall -c "mkdir -p /scratch/$USER/; mkdir -p $BASEMPIDIR.$LSB_JOBID" - < OUTPUT_FILES/machines >/dev/null
+
+sed -e "s:^LOCAL_PATH .*:LOCAL_PATH                      =  $BASEMPIDIR.$LSB_JOBID:" < DATA/Par_file > DATA/Par_file.tmp
+mv DATA/Par_file.tmp DATA/Par_file
+
+current_pwd=$PWD
+
+change_simulation_type.pl -f
+mpirun.lsf --gm-no-shmem --gm-copy-env $current_pwd/xmeshfem3D
+mpirun.lsf --gm-no-shmem --gm-copy-env $current_pwd/xspecfem3D


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_mesher_solver_lsf_basin.forward
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_mesher_solver_lsf_basin.kernel
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_mesher_solver_lsf_basin.kernel	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_mesher_solver_lsf_basin.kernel	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,40 @@
+#!/bin/bash -v
+#BSUB -o OUTPUT_FILES/%J.o
+#BSUB -a mpich_gm
+#BSUB -J specfem_kernel
+
+# this is kernel simulation script
+# Qinya Liu, May 2007, Caltech
+
+BASEMPIDIR=/scratch/$USER/DATABASES_MPI
+
+echo "$LSB_MCPU_HOSTS" > OUTPUT_FILES/lsf_machines
+echo "$LSB_JOBID" > OUTPUT_FILES/jobid
+
+remap_lsf_machines.pl OUTPUT_FILES/lsf_machines >OUTPUT_FILES/machines
+
+shmux -M50 -Sall -c "mkdir -p /scratch/$USER/; mkdir -p $BASEMPIDIR.$LSB_JOBID" - < OUTPUT_FILES/machines >/dev/null
+
+sed -e "s:^LOCAL_PATH .*:LOCAL_PATH                      =  $BASEMPIDIR.$LSB_JOBID:" < DATA/Par_file > DATA/Par_file.tmp
+mv DATA/Par_file.tmp DATA/Par_file
+
+current_pwd=$PWD
+
+change_simulation_type.pl -F
+mpirun.lsf --gm-no-shmem --gm-copy-env $current_pwd/xmeshfem3D
+mpirun.lsf --gm-no-shmem --gm-copy-env $current_pwd/xspecfem3D
+
+
+#### this is the part needs to be revised for each kernel simulation #####
+cd $current_pwd/SEM
+collect_seismo_lsf_multi.pl ../OUTPUT_FILES/lsf_machines ../DATA/Par_file
+xcut_velocity 29.0 32.5 3 GSC*.semd
+rename .semd.adj .adj *.semd.ad
+cd $current_pwd
+##########################################################################
+
+change_simulation_type.pl -b
+mpirun.lsf --gm-no-shmem --gm-copy-env $current_pwd/xspecfem3D
+
+shmux -M50 -Sall -c "cp $BASEMPIDIR.$LSB_JOBID/*alpha_kernel.bin $current_pwd/MESH" - < OUTPUT_FILES/machines >/dev/null
+


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_mesher_solver_lsf_basin.kernel
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_solver_lsf.bash
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_solver_lsf.bash	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_solver_lsf.bash	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+## job name and output file
+#BSUB -J go_solver
+#BSUB -o OUTPUT_FILES/%J.o
+#BSUB -e OUTPUT_FILES/%J.e
+
+###########################################################
+# USER PARAMETERS
+
+## 4 CPUs ( 4  ), walltime 1 hour
+#BSUB -n 4
+#BSUB -R span[ptile=4]
+#BSUB -q short_parallel
+
+#BSUB -a openmpi
+
+###########################################################
+
+if [ -z $USER ]; then
+	echo "could not run go_solver_...bash as no USER env is set"
+	exit 2
+fi
+
+# script to run the mesher and the solver
+# read DATA/Par_file to get information about the run
+# compute total number of nodes needed
+NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2 `
+
+# total number of nodes is the product of the values read
+numnodes=$NPROC
+
+rm -r -f OUTPUT_FILES
+mkdir OUTPUT_FILES
+cp DATA/Par_file OUTPUT_FILES/
+cp DATA/CMTSOLUTION OUTPUT_FILES/
+cp DATA/STATIONS OUTPUT_FILES/
+
+# obtain lsf job information
+cat $BSUB_DJOB_NODEFILE > OUTPUT_FILES/compute_nodes
+echo "$LSB_JOBID" > OUTPUT_FILES/jobid
+
+echo starting run in current directory $PWD
+echo " "
+
+sleep 2 
+mpirun.lsf $PWD/xspecfem3D
+
+echo "finished successfully"
+


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/go_solver_lsf.bash
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/compile
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/compile	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/compile	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,2 @@
+\rm *.o remap_database
+mpif90 -o remap_database -fast remap_database.f90 exit_mpi.f90


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/compile
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/exit_mpi.f90
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/exit_mpi.f90	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/exit_mpi.f90	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,57 @@
+!=====================================================================
+!
+!          S p e c f e m 3 D  G l o b e  V e r s i o n  3 . 5
+!          --------------------------------------------------
+!
+!                 Dimitri Komatitsch and Jeroen Tromp
+!    Seismological Laboratory - California Institute of Technology
+!        (c) California Institute of Technology July 2004
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along
+! with this program; if not, write to the Free Software Foundation, Inc.,
+! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+!
+!=====================================================================
+
+! end the simulation and exit MPI
+
+! version with rank number printed in the error message
+  subroutine exit_MPI(myrank,error_msg)
+
+  implicit none
+
+! standard include of the MPI library
+  include 'mpif.h'
+
+
+  integer myrank
+  character(len=*) error_msg
+
+  integer ier
+  character(len=80) outputname
+
+! write error message to screen
+  write(*,*) error_msg(1:len(error_msg))
+  write(*,*) 'Error detected, aborting MPI... proc ',myrank
+
+! stop all the MPI processes, and exit
+! on some machines, MPI_FINALIZE needs to be called before MPI_ABORT
+  call MPI_FINALIZE(ier)
+  call MPI_ABORT(ier)
+  stop 'error, program ended in exit_MPI'
+
+  end subroutine exit_MPI
+
+!
+!----
+!

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/old_machines
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/old_machines	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/old_machines	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,150 @@
+compute-35-7
+2
+compute-45-29
+2
+compute-47-14
+2
+compute-41-26
+2
+compute-26-28
+2
+compute-45-1
+2
+compute-17-22
+2
+compute-37-21
+2
+compute-45-18
+2
+compute-26-36
+2
+compute-13-22
+2
+compute-27-23
+2
+compute-12-8
+2
+compute-32-38
+2
+compute-11-31
+2
+compute-47-38
+2
+compute-26-35
+2
+compute-16-33
+2
+compute-31-15
+2
+compute-14-7
+2
+compute-27-3
+2
+compute-35-10
+2
+compute-25-14
+2
+compute-41-5
+2
+compute-11-14
+2
+compute-37-32
+2
+compute-15-31
+2
+compute-15-9
+2
+compute-33-1
+2
+compute-45-27
+2
+compute-35-38
+2
+compute-26-21
+2
+compute-43-11
+2
+compute-44-4
+2
+compute-35-3
+2
+compute-41-2
+2
+compute-17-12
+2
+compute-27-38
+2
+compute-27-9
+2
+compute-36-26
+2
+compute-11-32
+2
+compute-17-39
+2
+compute-36-19
+2
+compute-46-5
+2
+compute-31-23
+2
+compute-31-19
+2
+compute-32-37
+2
+compute-46-10
+2
+compute-35-35
+2
+compute-11-8
+2
+compute-37-14
+2
+compute-36-28
+2
+compute-15-21
+2
+compute-32-40
+2
+compute-26-25
+2
+compute-46-25
+2
+compute-41-21
+2
+compute-32-19
+2
+compute-25-24
+2
+compute-26-9
+2
+compute-15-7
+2
+compute-16-34
+2
+compute-44-3
+2
+compute-47-9
+2
+compute-24-1
+2
+compute-25-29
+2
+compute-45-37
+2
+compute-27-35
+2
+compute-33-22
+2
+compute-27-1
+2
+compute-31-6
+2
+compute-11-18
+2
+compute-25-38
+2
+compute-27-19
+2
+compute-45-7
+2

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/remap.bash
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/remap.bash	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/remap.bash	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,15 @@
+#!/bin/bash -v
+#BSUB -o OUTPUT_FILES/%J.o
+#BSUB -a mpich_gm
+#BSUB -J go_mesher_solver_lsf
+
+BASEMPIDIR=/scratch/$USER/DATABASES_MPI
+
+echo "$LSB_MCPU_HOSTS" > OUTPUT_FILES/lsf_machines
+echo "$LSB_JOBID" > OUTPUT_FILES/jobid
+
+remap_lsf_machines.pl OUTPUT_FILES/lsf_machines >OUTPUT_FILES/machines
+
+shmux -M50 -Sall -c "mkdir -p $BASEMPIDIR" - < OUTPUT_FILES/machines >/dev/null
+
+mpirun.lsf --gm-no-shmem --gm-copy-env $PWD/remap old_machines 150

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/remap_database.f90
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/remap_database.f90	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/remap_database.f90	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,67 @@
+program remap_databases
+
+! this program remaps the databases to resume a solver calculation after
+! the mesher 
+! Qinya Liu, May 2007, Caltech
+
+implicit none
+
+! standard include of the MPI library
+  include 'mpif.h'
+
+  integer, parameter :: MAX_PROCS = 1000
+  integer ier,sizeprocs,myrank,ios,i
+  character(len=256) old_machine_file,junk,junk2,slice_to_old_machine(MAX_PROCS), &
+             mymachine, local_data_base, scp_outfile, command_string
+
+  integer num_slices, num_slices2,num
+
+! initialize the MPI communicator and start the NPROCTOT MPI processes.
+  call MPI_INIT(ier)
+
+! run the main program
+  call MPI_COMM_SIZE(MPI_COMM_WORLD,sizeprocs,ier)
+  call MPI_COMM_RANK(MPI_COMM_WORLD,myrank,ier)
+
+  call getarg(1,old_machine_file)
+  if (trim(old_machine_file) == '') call exit_mpi(myrank,'Usage: remap_database old-mach num-slice')
+  call getarg(2,junk)
+  if (trim(junk) == '') call exit_mpi(myrank,'Usage: remap_database old-mach num-slice')
+  read(junk,*) num_slices
+  if (num_slices /= sizeprocs) call exit_mpi(myrank,'number of slices does not match')
+
+  num_slices2 = num_slices
+  open(11,file=trim(old_machine_file),status='old',iostat=ios)
+  if (ios /= 0) stop 'Error opening old machine file'
+  do while (1 == 1)
+    read(11,'(a)',iostat=ios) junk2
+    if (ios /= 0) exit
+    read(11,'(i)',iostat=ios) num
+    if (ios /= 0) exit
+    if (num /= 2) stop 'Number of slices per node not 2'
+    do i = 1, num
+      slice_to_old_machine(num_slices2-i+1) = junk2
+    enddo
+    num_slices2 = num_slices2 - num
+  enddo
+  if (num_slices2 /= 0) stop 'Error counting number of slices'
+  close(11)
+
+  mymachine = slice_to_old_machine(myrank+1)
+ 
+  local_data_base = '/scratch/lqy/DATABASES_MPI'
+
+  write(scp_outfile,'(a,i4.4)') 'OUTPUT_FILES/scp_out.',myrank
+
+  write(command_string,'(a,i4.4,a)') 'scp lqy@'//trim(mymachine)//':'//trim(local_data_base)//'/*', &
+             myrank, '*  '//trim(local_data_base)
+
+  call system('echo '//trim(command_string)//' > '//trim(scp_outfile))
+  
+  call system(trim(command_string)//' >> '//trim(scp_outfile))
+           
+! stop all the MPI processes, and exit
+  call MPI_FINALIZE(ier)
+
+end program remap_databases
+          

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/run_lsf
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/run_lsf	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/run_lsf	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,2 @@
+\rm OUTPUT_FILES/*
+bsub -q normal -n 150 -K < remap.bash 


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_database/run_lsf
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_lsf_machines.pl
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_lsf_machines.pl	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_lsf_machines.pl	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,24 @@
+#!/usr/bin/perl -w
+
+# this program remaps the LSF output machine file to
+# the standard one-node-per-column machine file
+# Qinya Liu, May 2007, Caltech
+
+if (@ARGV != 1) {die("remap_lsf_machines.pl machinefile\n");}
+
+$machine = $ARGV[0];
+
+open(FILE,"$machine") or die("Error opening file $machine\n");
+(@junk) = <FILE>;
+close(FILE);
+
+for($i=0;$i<@junk;$i++) {
+  @node_array = split(" ",$junk[$i]);
+  foreach $node (@node_array) {
+	next if ( $node =~ /^[0-9]/ );
+  	push(@nodes, $node);
+  }
+}
+foreach $node (@nodes) {
+    print "$node\n";
+}


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/remap_lsf_machines.pl
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/run_lsf.bash
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/run_lsf.bash	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/run_lsf.bash	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# this script launches the specfem simulation
+# Qinya Liu, May 2007, Caltech
+
+# use the normal queue unless otherwise directed
+
+queue="-q normal"
+if [ $# -eq 1 ]; then
+	echo "Setting the queue to $1"
+	queue="-q $1"
+fi
+
+d=`date`
+echo "Starting compilation $d"
+# regular forward/adjoint simulation
+change_simulation_type.pl -f
+# kernel simulation
+#change_simulation_type.pl -b
+make clean
+make meshfem3D
+make create_header_file
+xcreate_header_file
+make specfem3D
+d=`date`
+echo "Finished compilation $d"
+
+# compute total number of nodes needed
+NPROC_XI=`grep NPROC_XI DATA/Par_file | cut -d = -f 2 `
+NPROC_ETA=`grep NPROC_ETA DATA/Par_file | cut -d = -f 2`
+
+
+# total number of nodes is the product of the values read
+numnodes=$(( $NPROC_XI * $NPROC_ETA ))
+
+echo "Submitting job"
+bsub $queue -n $numnodes -W 60 -K < go_mesher_solver_lsf_basin.forward
+#kernel simulation
+#bsub $queue -n $numnodes -W 60 -K < go_mesher_solver_lsf_basin.kernel


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/lsf/run_lsf.bash
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/pbs/go_generate_databases_pbs.bash
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/pbs/go_generate_databases_pbs.bash	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/pbs/go_generate_databases_pbs.bash	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,50 @@
+#!/bin/bash
+#PBS -S /bin/bash
+
+## job name and output file
+#PBS -N go_mesher
+#PBS -j oe
+#PBS -o OUTPUT_FILES/job.o
+
+###########################################################
+# USER PARAMETERS
+
+## 4 CPUs ( 4  ), walltime 1 hour
+#PBS -l nodes=1:ppn=4,walltime=1:00:00
+
+###########################################################
+
+cd $PBS_O_WORKDIR
+
+
+# script to run the mesher and the solver
+# read DATA/Par_file to get information about the run
+# compute total number of nodes needed
+NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2 `
+
+# total number of nodes is the product of the values read
+numnodes=$NPROC
+
+mkdir -p OUTPUT_FILES
+
+# backup files used for this simulation
+cp DATA/Par_file OUTPUT_FILES/
+
+rm -rf OUTPUT_FILES/src
+mkdir OUTPUT_FILES/src
+cp -p *.f90 OUTPUT_FILES/src/
+cp -p *.c OUTPUT_FILES/src/
+cp -p *.in OUTPUT_FILES/src/
+cp -p *.h OUTPUT_FILES/src/
+
+# obtain lsf job information
+cat $PBS_NODEFILE > OUTPUT_FILES/compute_nodes
+echo "$PBS_JOBID" > OUTPUT_FILES/jobid
+
+echo starting MPI mesher on $numnodes processors
+echo " "
+
+sleep 2 
+mpiexec -np $numnodes $PWD/xgenerate_databases
+
+echo "done "


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/pbs/go_generate_databases_pbs.bash
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/pbs/go_solver_pbs.bash
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/pbs/go_solver_pbs.bash	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/pbs/go_solver_pbs.bash	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,52 @@
+#!/bin/bash
+#PBS -S /bin/bash
+
+## job name and output file
+#PBS -N go_solver
+#PBS -j oe
+#PBS -o OUTPUT_FILES/job.o
+
+###########################################################
+# USER PARAMETERS
+
+## 4 CPUs ( 4  ), walltime 1 hour
+#PBS -l nodes=1:ppn=4,walltime=1:00:00
+
+###########################################################
+
+cd $PBS_O_WORKDIR
+
+# script to run the mesher and the solver
+# read DATA/Par_file to get information about the run
+# compute total number of nodes needed
+NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2 `
+
+# total number of nodes is the product of the values read
+numnodes=$NPROC
+
+mkdir -p OUTPUT_FILES
+
+# backup files used for this simulation
+cp DATA/Par_file OUTPUT_FILES/
+cp DATA/STATIONS OUTPUT_FILES/
+cp DATA/CMTSOLUTION OUTPUT_FILES/
+
+rm -rf OUTPUT_FILES/src
+mkdir OUTPUT_FILES/src
+cp -p *.f90 OUTPUT_FILES/src/
+cp -p *.c OUTPUT_FILES/src/
+cp -p *.in OUTPUT_FILES/src/
+cp -p *.h OUTPUT_FILES/src/
+
+# obtain lsf job information
+cat $PBS_NODEFILE > OUTPUT_FILES/compute_nodes
+echo "$PBS_JOBID" > OUTPUT_FILES/jobid
+
+echo starting run in current directory $PWD
+echo " "
+
+sleep 2 
+mpiexec -np $numnodes $PWD/xspecfem3D
+
+echo "finished successfully"
+


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/pbs/go_solver_pbs.bash
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/run3d.csh
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/run3d.csh	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/run3d.csh	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,30 @@
+#!/bin/csh
+
+# compile and run the mesher and then the solver, then collect the seismograms
+
+set OUTDIR="SEM"
+
+sleep 1
+make clean
+sleep 1
+make xgenerate_databases
+sleep 10
+go_generate_databases
+
+sleep 5
+make clean
+sleep 1
+make xspecfem3D
+sleep 10
+go_solver
+
+sleep 5
+if (! -d $OUTDIR) then
+   mkdir $OUTDIR
+endif 
+cd $OUTDIR
+cp ../DATA/CMTSOLUTION .
+cp ../DATA/STATIONS .
+cp ../DATA/Par_file .
+collect_seismos < ../collect_seismos.in
+


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/run3d.csh
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/sge/go_generate_databases_sge.bash
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/sge/go_generate_databases_sge.bash	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/sge/go_generate_databases_sge.bash	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,53 @@
+#!/bin/sh 
+# sun grid engine cluster @ oxford
+
+# use current working directory
+#$ -cwd
+
+# merge error output into standard output stream
+#$ -j yes
+#$ -o OUTPUT_FILES/job.o
+
+###########################################################
+# USER PARAMETERS
+
+# specific environment with 180 cpu total, request to use 4 cpus:
+#$ -pe make 4
+
+###########################################################
+
+
+# script to run the mesher and the solver
+# read DATA/Par_file to get information about the run
+# compute total number of nodes needed
+NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2 `
+
+# total number of nodes is the product of the values read
+numnodes=$NPROC
+
+mkdir -p OUTPUT_FILES
+
+# backup for files used for this simulation
+cp DATA/Par_file OUTPUT_FILES/
+cp DATA/STATIONS OUTPUT_FILES/
+cp DATA/CMTSOLUTION OUTPUT_FILES/
+
+rm -rf OUTPUT_FILES/src
+mkdir OUTPUT_FILES/src
+cp -p *.f90 OUTPUT_FILES/src/
+cp -p *.c OUTPUT_FILES/src/
+cp -p *.in OUTPUT_FILES/src/
+cp -p *.h OUTPUT_FILES/src/
+
+echo starting run in current directory $PWD
+echo " "
+
+# run in parallel with sge as resource manager
+#set echo
+
+/opt/SUNWhpc/bin/mprun -x sge ./xgenerate_databases
+
+# or using mpiexec 
+#/opt/mpich/bin/mpiexec -np $numnodes ./xgenerate_databases
+
+


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/sge/go_generate_databases_sge.bash
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/sge/go_solver_sge.bash
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/sge/go_solver_sge.bash	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/sge/go_solver_sge.bash	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,51 @@
+#!/bin/sh 
+# sun grid engine cluster @ oxford
+
+# use current working directory
+#$ -cwd
+
+# merge error output into standard output stream
+#$ -j yes
+#$ -o OUTPUT_FILES/job.o
+
+###########################################################
+# USER PARAMETERS
+
+# specific environment with 180 cpu total, request to use 4 cpus:
+#$ -pe make 4
+
+###########################################################
+
+
+# script to run the mesher and the solver
+# read DATA/Par_file to get information about the run
+# compute total number of nodes needed
+NPROC=`grep NPROC DATA/Par_file | cut -d = -f 2 `
+
+# total number of nodes is the product of the values read
+numnodes=$NPROC
+
+mkdir -p OUTPUT_FILES
+
+# backup for files used for this simulation
+cp DATA/Par_file OUTPUT_FILES/
+cp DATA/STATIONS OUTPUT_FILES/
+cp DATA/CMTSOLUTION OUTPUT_FILES/
+
+rm -rf OUTPUT_FILES/src
+mkdir OUTPUT_FILES/src
+cp -p *.f90 OUTPUT_FILES/src/
+cp -p *.c OUTPUT_FILES/src/
+cp -p *.in OUTPUT_FILES/src/
+cp -p *.h OUTPUT_FILES/src/
+
+echo starting run in current directory $PWD
+echo " "
+
+# run in parallel with sge as resource manager
+#set echo
+
+/opt/SUNWhpc/bin/mprun -x sge ./xspecfem3D
+
+# or using mpiexec 
+#/opt/mpich/bin/mpiexec -np $numnodes ./xspecfem3D


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/sge/go_solver_sge.bash
___________________________________________________________________
Name: svn:executable
   + *

Added: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/sge/run_sge.bash
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/sge/run_sge.bash	                        (rev 0)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/sge/run_sge.bash	2010-02-25 03:35:08 UTC (rev 16336)
@@ -0,0 +1,26 @@
+#!/bin/bash
+# use the normal queue unless otherwise directed
+# specific queue: 
+#     pe.q with 130 cpus, 
+#     all.q with 49 cpus 
+# can be added to qsub command at the end -p pe.q
+
+rm -f OUTPUT_FILES/*
+
+d=`date`
+echo "Starting compilation $d"
+make clean
+make xgenerate_databases
+make xcreate_header_file
+./xcreate_header_file
+make xspecfem3D
+d=`date`
+echo "Finished compilation $d"
+
+echo "Submitting job"
+
+# mesher
+qsub go_mesher_sge.bash
+
+# solver
+#qsub go_solver_sge.bash


Property changes on: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Cluster/sge/run_sge.bash
___________________________________________________________________
Name: svn:executable
   + *

Modified: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Visualization/mesh2vtu/mesh2vtu.cxx
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Visualization/mesh2vtu/mesh2vtu.cxx	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/Visualization/mesh2vtu/mesh2vtu.cxx	2010-02-25 03:35:08 UTC (rev 16336)
@@ -116,6 +116,8 @@
   }
   
   close(fd);
+
+  //  printf("Done.\n");
   
   dataSet -> SetPoints(newPts);
   dataSet -> GetPointData() -> SetScalars(newScalars);

Deleted: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/collect_seismo_lsf_multi.pl
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/collect_seismo_lsf_multi.pl	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/collect_seismo_lsf_multi.pl	2010-02-25 03:35:08 UTC (rev 16336)
@@ -1,49 +0,0 @@
-#!/usr/bin/perl -w
-
-# this script collects the seismograms from the scratch sub-directory given by Par_file
-# Qinya Liu, May 2007, Caltech
-
-if (@ARGV != 2) {die("collect_seismo_lsf_multi.pl lsf_machinefile Par_file\n");}
-
-$machine = $ARGV[0];
-$par_file = $ARGV[1];
-
-open(FILE,"$machine") or die("Error opening file $machine\n");
-($junk1) = <FILE>;
-close(FILE);
-(@junk2) = split(" ",$junk1);
-for($i=0;$i<@junk2/2;$i++) {
-$junk[$i] = $junk2[2*$i];}
-  
-
-for($i=0;$i<@junk;$i++) {
-  ($node) = split(" ",$junk[$i]);
-  push(@nodes,$node);
-}
-
-# now get the LOCAL_PATH
-open(FILE3,"<$par_file") or die ("Fatal Error openning file $par_file\n");
-while (<FILE3>) {
-   if ($_ =~ /^LOCAL_PATH/) {
-	chop;	
-	@vals = split("=", $_);
-	$mpidir = $vals[1];
-	$mpidir =~ s/^\s+//;
-	$mpidir =~ s/\s+$//;
-	close(FILE3);
-	last;
-   }
-}
-
-open(FILE2,">procs.list");
-for ($i=0;$i<@nodes;$i++) {print FILE2 "$nodes[$i]\n";}
-close(FILE2);
-
-print "@nodes\n";
-
-foreach $node (@nodes) {
-    system("scp $node:$mpidir/*sem* .");
-    print "$node\n";}
-
-#`shmux -M50 -Sall -c "rm -f $mpidir/*sem?" - < $machine`;
-

Deleted: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/go_mesher_solver_lsf_basin.forward
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/go_mesher_solver_lsf_basin.forward	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/go_mesher_solver_lsf_basin.forward	2010-02-25 03:35:08 UTC (rev 16336)
@@ -1,25 +0,0 @@
-#!/bin/bash -v
-#BSUB -o OUTPUT_FILES/%J.o
-#BSUB -a mpich_gm
-#BSUB -J specfem_forward
-
-# this is regular forward solver script
-# Qinya Liu, May 2007, Caltech
-
-BASEMPIDIR=/scratch/$USER/DATABASES_MPI
-
-echo "$LSB_MCPU_HOSTS" > OUTPUT_FILES/lsf_machines
-echo "$LSB_JOBID" > OUTPUT_FILES/jobid
-
-remap_lsf_machines.pl OUTPUT_FILES/lsf_machines > OUTPUT_FILES/machines
-
-shmux -M50 -Sall -c "mkdir -p /scratch/$USER/; mkdir -p $BASEMPIDIR.$LSB_JOBID" - < OUTPUT_FILES/machines >/dev/null
-
-sed -e "s:^LOCAL_PATH .*:LOCAL_PATH                      =  $BASEMPIDIR.$LSB_JOBID:" < DATA/Par_file > DATA/Par_file.tmp
-mv DATA/Par_file.tmp DATA/Par_file
-
-current_pwd=$PWD
-
-change_simulation_type.pl -f
-mpirun.lsf --gm-no-shmem --gm-copy-env $current_pwd/xmeshfem3D
-mpirun.lsf --gm-no-shmem --gm-copy-env $current_pwd/xspecfem3D

Deleted: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/go_mesher_solver_lsf_basin.kernel
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/go_mesher_solver_lsf_basin.kernel	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/go_mesher_solver_lsf_basin.kernel	2010-02-25 03:35:08 UTC (rev 16336)
@@ -1,40 +0,0 @@
-#!/bin/bash -v
-#BSUB -o OUTPUT_FILES/%J.o
-#BSUB -a mpich_gm
-#BSUB -J specfem_kernel
-
-# this is kernel simulation script
-# Qinya Liu, May 2007, Caltech
-
-BASEMPIDIR=/scratch/$USER/DATABASES_MPI
-
-echo "$LSB_MCPU_HOSTS" > OUTPUT_FILES/lsf_machines
-echo "$LSB_JOBID" > OUTPUT_FILES/jobid
-
-remap_lsf_machines.pl OUTPUT_FILES/lsf_machines >OUTPUT_FILES/machines
-
-shmux -M50 -Sall -c "mkdir -p /scratch/$USER/; mkdir -p $BASEMPIDIR.$LSB_JOBID" - < OUTPUT_FILES/machines >/dev/null
-
-sed -e "s:^LOCAL_PATH .*:LOCAL_PATH                      =  $BASEMPIDIR.$LSB_JOBID:" < DATA/Par_file > DATA/Par_file.tmp
-mv DATA/Par_file.tmp DATA/Par_file
-
-current_pwd=$PWD
-
-change_simulation_type.pl -F
-mpirun.lsf --gm-no-shmem --gm-copy-env $current_pwd/xmeshfem3D
-mpirun.lsf --gm-no-shmem --gm-copy-env $current_pwd/xspecfem3D
-
-
-#### this is the part needs to be revised for each kernel simulation #####
-cd $current_pwd/SEM
-collect_seismo_lsf_multi.pl ../OUTPUT_FILES/lsf_machines ../DATA/Par_file
-xcut_velocity 29.0 32.5 3 GSC*.semd
-rename .semd.adj .adj *.semd.ad
-cd $current_pwd
-##########################################################################
-
-change_simulation_type.pl -b
-mpirun.lsf --gm-no-shmem --gm-copy-env $current_pwd/xspecfem3D
-
-shmux -M50 -Sall -c "cp $BASEMPIDIR.$LSB_JOBID/*alpha_kernel.bin $current_pwd/MESH" - < OUTPUT_FILES/machines >/dev/null
-

Deleted: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/remap_lsf_machines.pl
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/remap_lsf_machines.pl	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/remap_lsf_machines.pl	2010-02-25 03:35:08 UTC (rev 16336)
@@ -1,24 +0,0 @@
-#!/usr/bin/perl -w
-
-# this program remaps the LSF output machine file to
-# the standard one-node-per-column machine file
-# Qinya Liu, May 2007, Caltech
-
-if (@ARGV != 1) {die("remap_lsf_machines.pl machinefile\n");}
-
-$machine = $ARGV[0];
-
-open(FILE,"$machine") or die("Error opening file $machine\n");
-(@junk) = <FILE>;
-close(FILE);
-
-for($i=0;$i<@junk;$i++) {
-  @node_array = split(" ",$junk[$i]);
-  foreach $node (@node_array) {
-	next if ( $node =~ /^[0-9]/ );
-  	push(@nodes, $node);
-  }
-}
-foreach $node (@nodes) {
-    print "$node\n";
-}

Deleted: seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/run_lsf.bash
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/run_lsf.bash	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/UTILS/run_lsf.bash	2010-02-25 03:35:08 UTC (rev 16336)
@@ -1,39 +0,0 @@
-#!/bin/bash
-
-# this script launches the specfem simulation
-# Qinya Liu, May 2007, Caltech
-
-# use the normal queue unless otherwise directed
-
-queue="-q normal"
-if [ $# -eq 1 ]; then
-	echo "Setting the queue to $1"
-	queue="-q $1"
-fi
-
-d=`date`
-echo "Starting compilation $d"
-# regular forward/adjoint simulation
-change_simulation_type.pl -f
-# kernel simulation
-#change_simulation_type.pl -b
-make clean
-make meshfem3D
-make create_header_file
-xcreate_header_file
-make specfem3D
-d=`date`
-echo "Finished compilation $d"
-
-# compute total number of nodes needed
-NPROC_XI=`grep NPROC_XI DATA/Par_file | cut -d = -f 2 `
-NPROC_ETA=`grep NPROC_ETA DATA/Par_file | cut -d = -f 2`
-
-
-# total number of nodes is the product of the values read
-numnodes=$(( $NPROC_XI * $NPROC_ETA ))
-
-echo "Submitting job"
-bsub $queue -n $numnodes -W 60 -K < go_mesher_solver_lsf_basin.forward
-#kernel simulation
-#bsub $queue -n $numnodes -W 60 -K < go_mesher_solver_lsf_basin.kernel

Modified: seismo/3D/SPECFEM3D_SESAME/trunk/check_mesh_resolution.f90
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/check_mesh_resolution.f90	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/check_mesh_resolution.f90	2010-02-25 03:35:08 UTC (rev 16336)
@@ -47,7 +47,7 @@
   real(kind=CUSTOM_REAL), dimension(NGLLX,NGLLY,NGLLZ):: vp_elem,vs_elem
   real(kind=CUSTOM_REAL), dimension(1) :: val_min,val_max  
   real(kind=CUSTOM_REAL) :: vpmin,vpmax,vsmin,vsmax,vpmin_glob,vpmax_glob,vsmin_glob,vsmax_glob
-  real(kind=CUSTOM_REAL) :: distance_min,distance_max,distance_min_glob,distance_max_glob,dx,dy,dz
+  real(kind=CUSTOM_REAL) :: distance_min,distance_max,distance_min_glob,distance_max_glob,dx !,dy,dz
   real(kind=CUSTOM_REAL) :: cmax,cmax_glob,pmax,pmax_glob
   real(kind=CUSTOM_REAL) :: dt_suggested,dt_suggested_glob  
   
@@ -56,7 +56,7 @@
   integer :: myrank  
   integer :: NSPEC_AB_global_min,NSPEC_AB_global_max,NSPEC_AB_global_sum
   integer :: NGLOB_AB_global_min,NGLOB_AB_global_max,NGLOB_AB_global_sum    
-  integer :: i,j,k,ispec,iglob_a,iglob_b,sizeprocs
+  integer :: i,j,k,ii,jj,kk,ispec,iglob_a,iglob_b,sizeprocs
 
 ! estimation of time step and period resolved
   real(kind=CUSTOM_REAL),parameter :: COURANT_SUGGESTED = 0.3
@@ -135,27 +135,31 @@
     distance_min = HUGEVAL
     distance_max = -HUGEVAL
     
-    do k=2,NGLLZ
-      do j=2,NGLLY
-        do i=2,NGLLX
+    ! loops over all GLL points
+    do k=1,NGLLZ-1
+      do j=1,NGLLY-1
+        do i=1,NGLLX-1
           iglob_a = ibool(i,j,k,ispec)
-          iglob_b = ibool(i-1,j,k,ispec)
-          dx = sqrt( ( xstore(iglob_a) - xstore(iglob_b) )**2 &
-                   + ( ystore(iglob_a) - ystore(iglob_b) )**2 &
-                   + ( zstore(iglob_a) - zstore(iglob_b) )**2 )
 
-          iglob_b = ibool(i,j-1,k,ispec)
-          dy = sqrt( ( xstore(iglob_a) - xstore(iglob_b) )**2 &
-                   + ( ystore(iglob_a) - ystore(iglob_b) )**2 &
-                   + ( zstore(iglob_a) - zstore(iglob_b) )**2 )
-                       
-          iglob_b = ibool(i,j,k-1,ispec)
-          dz = sqrt( ( xstore(iglob_a) - xstore(iglob_b) )**2 &
-                   + ( ystore(iglob_a) - ystore(iglob_b) )**2 &
-                   + ( zstore(iglob_a) - zstore(iglob_b) )**2 )
-    
-          distance_min = min(distance_min,dx,dy,dz)
-          distance_max = max(distance_max,dx,dy,dz)
+          ! loops over nearest neighbor points
+          ! maybe a faster method could be found...
+          do kk=k-1,k+1  
+            do jj=j-1,j+1
+              do ii=i-1,i+1
+                if( ii < 1 .or. jj < 1 .or. kk < 1 ) cycle
+                ! distances between points
+                iglob_b = ibool(ii,jj,kk,ispec)
+                if( iglob_a /= iglob_b) then
+                  dx = sqrt( ( xstore(iglob_a) - xstore(iglob_b) )**2 &
+                          + ( ystore(iglob_a) - ystore(iglob_b) )**2 &
+                          + ( zstore(iglob_a) - zstore(iglob_b) )**2 )
+                  if( dx < distance_min) distance_min = dx
+                  if( dx > distance_max) distance_max = dx
+                endif
+              enddo
+            enddo
+          enddo
+              
         enddo
       enddo
     enddo

Deleted: seismo/3D/SPECFEM3D_SESAME/trunk/collect_seismos.in
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/collect_seismos.in	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/collect_seismos.in	2010-02-25 03:35:08 UTC (rev 16336)
@@ -1,2 +0,0 @@
-1
-78

Modified: seismo/3D/SPECFEM3D_SESAME/trunk/create_movie_shakemap_AVS_DX_GMT.f90
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/create_movie_shakemap_AVS_DX_GMT.f90	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/create_movie_shakemap_AVS_DX_GMT.f90	2010-02-25 03:35:08 UTC (rev 16336)
@@ -669,7 +669,7 @@
               if(USE_OPENDX) then
                 write(11,*) xp_save(ilocnum+ieoff),yp_save(ilocnum+ieoff),zp_save(ilocnum+ieoff)
               else if(USE_AVS) then
-                write(11,'(i,3f)') ireorder(ibool_number),xp_save(ilocnum+ieoff), &
+                write(11,'(i9,3f16.6)') ireorder(ibool_number),xp_save(ilocnum+ieoff), &
                     yp_save(ilocnum+ieoff),zp_save(ilocnum+ieoff)
               endif
             endif

Modified: seismo/3D/SPECFEM3D_SESAME/trunk/create_regions_mesh.f90
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/create_regions_mesh.f90	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/create_regions_mesh.f90	2010-02-25 03:35:08 UTC (rev 16336)
@@ -2149,7 +2149,8 @@
                                                 ibool,nspec,nglob, &
                                                 xstore_dummy,ystore_dummy,zstore_dummy, &
                                                 normal_face(:,i,j) )
-                    ! makes sure that it always points away from acoustic element, otherwise switch direction                            
+                    ! makes sure that it always points away from acoustic element, 
+                    ! otherwise switch direction
                     if( ispec_is_elastic(ispec) ) normal_face(:,i,j) = - normal_face(:,i,j)
                 enddo
               enddo
@@ -2573,7 +2574,7 @@
         if( idirect == 1 ) then
           
           ! checks validity
-          if( is_moho_bot( ispec) == .true. ) then
+          if( is_moho_bot( ispec) .eqv. .true. ) then
             print*,'error: moho surface geometry bottom'
             print*,'  does not allow for mulitple element faces in kernel computation'
             call exit_mpi(myrank,'error moho bottom elements')
@@ -2597,7 +2598,7 @@
         else if( idirect == 2 ) then
 
           ! checks validity
-          if( is_moho_top( ispec) == .true. ) then
+          if( is_moho_top( ispec) .eqv. .true. ) then
             print*,'error: moho surface geometry top'
             print*,'  does not allow for mulitple element faces kernel computation'
             call exit_mpi(myrank,'error moho top elements')

Modified: seismo/3D/SPECFEM3D_SESAME/trunk/decompose_mesh_SCOTCH/Makefile
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/decompose_mesh_SCOTCH/Makefile	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/decompose_mesh_SCOTCH/Makefile	2010-02-25 03:35:08 UTC (rev 16336)
@@ -3,18 +3,16 @@
 #############################################################
 ## modify to match your compiler defaults 
 ## (which were used to compile SCOTCH libraries from below as well)
-F90 = gfortran
-#F90 = ifort
+F90 = ifort      # use -warn
+#F90 = gfortran    # use -Wall
 
 ## modify to match your library paths
-SCOTCH_LIBS = /opt/seismo-util/source/scotch/lib/libscotch.a \
-							/opt/seismo-util/source/scotch/lib/libscotcherr.a
-#SCOTCH_LIBS = /scratch/network/SCOTCH/lib/libscotch.a /scratch/network/SCOTCH/lib/libscotcherr.a
+SCOTCH_LIBS = -L/opt/seismo-util/source/scotch/lib -lscotch -lscotcherr
+#SCOTCH_LIBS = -L/scratch/network/SCOTCH/lib -lscotch -lscotcherr							
+#SCOTCH_LIBS = -L/n/sw/scotch-5.1/lib -lscotch -lscotcherr
 
 #############################################################
 
-
-
 LIBS = part_decompose_mesh_SCOTCH.o \
 				decompose_mesh_SCOTCH.o \
 				program_decompose_mesh_SCOTCH.o
@@ -23,17 +21,17 @@
 all: xdecompose_mesh_SCOTCH
 
 xdecompose_mesh_SCOTCH: $(LIBS)
-	${F90} -Wall -o xdecompose_mesh_SCOTCH $(LIBS) $(SCOTCH_LIBS)
+	${F90} -o xdecompose_mesh_SCOTCH $(LIBS) $(SCOTCH_LIBS)
 
 
 part_decompose_mesh_SCOTCH.o: part_decompose_mesh_SCOTCH.f90
-	${F90} -Wall -c part_decompose_mesh_SCOTCH.f90
+	${F90} -c part_decompose_mesh_SCOTCH.f90
 
 decompose_mesh_SCOTCH.o: decompose_mesh_SCOTCH.f90 part_decompose_mesh_SCOTCH.f90
-	${F90} -Wall -c decompose_mesh_SCOTCH.f90
+	${F90} -c decompose_mesh_SCOTCH.f90
 
 program_decompose_mesh_SCOTCH.o: program_decompose_mesh_SCOTCH.f90
-	${F90} -Wall -c program_decompose_mesh_SCOTCH.f90
+	${F90} -c program_decompose_mesh_SCOTCH.f90
 
 clean:
 	rm -f *.o *.mod a.out xdecompose_mesh_SCOTCH

Modified: seismo/3D/SPECFEM3D_SESAME/trunk/decompose_mesh_SCOTCH/part_decompose_mesh_SCOTCH.f90
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/decompose_mesh_SCOTCH/part_decompose_mesh_SCOTCH.f90	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/decompose_mesh_SCOTCH/part_decompose_mesh_SCOTCH.f90	2010-02-25 03:35:08 UTC (rev 16336)
@@ -1107,6 +1107,9 @@
           loc_nspec2D_moho = loc_nspec2D_moho + 1
        end if
     end do
+    ! checks if anything to do
+    if( loc_nspec2D_moho == 0 ) return
+    
     ! format: #surface_id, #number of elements
     write(IIN_database,*) 7, loc_nspec2D_moho
 

Modified: seismo/3D/SPECFEM3D_SESAME/trunk/generate_databases.f90
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/generate_databases.f90	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/generate_databases.f90	2010-02-25 03:35:08 UTC (rev 16336)
@@ -536,6 +536,7 @@
   integer :: num_xmin,num_xmax,num_ymin,num_ymax,num_top,num_bottom,num
   integer :: num_moho
   integer :: j
+  character(len=128) :: line
   
 ! read databases about external mesh simulation
 ! global node coordinates
@@ -709,19 +710,31 @@
 
   ! optional moho
   if( SAVE_MOHO_MESH ) then
-    read(IIN,*,iostat=ier) boundary_number ,nspec2D_moho_ext
-    if( ier /= 0 ) call exit_mpi(myrank,'error reading moho mesh in database')
-    
+    ! checks if additional line exists
+    read(IIN,'(a128)',iostat=ier) line 
+    if( ier /= 0 ) then 
+      ! no moho informations given
+      nspec2D_moho_ext = 0
+      boundary_number = 7
+    else
+      ! tries to read in number of moho elements
+      read(line,*,iostat=ier) boundary_number ,nspec2D_moho_ext
+      if( ier /= 0 ) call exit_mpi(myrank,'error reading moho mesh in database')
+    endif    
     if(boundary_number /= 7) stop "Error : invalid database file"
+
+    ! checks total number of elements  
+    call sum_all_i(nspec2D_moho_ext,num_moho)
+    if( num_moho == 0 ) call exit_mpi(myrank,'error no moho mesh in database')
     
+    ! reads in element informations
     allocate(ibelm_moho(nspec2D_moho_ext),nodes_ibelm_moho(4,nspec2D_moho_ext))
     do ispec2D = 1,nspec2D_moho_ext
       ! format: #element_id #node_id1 #node_id2 #node_id3 #node_id4
       read(IIN,*) ibelm_moho(ispec2D),(nodes_ibelm_moho(j,ispec2D),j=1,4)
     end do
-
-    call sum_all_i(nspec2D_moho_ext,num_moho)
   
+    ! user output
     if(myrank == 0) then
       write(IMAIN,*) '  moho surfaces: ',num_moho
     endif    

Deleted: seismo/3D/SPECFEM3D_SESAME/trunk/go_generate_database_pbs.sesame.bash
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/go_generate_database_pbs.sesame.bash	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/go_generate_database_pbs.sesame.bash	2010-02-25 03:35:08 UTC (rev 16336)
@@ -1,40 +0,0 @@
-#!/bin/bash
-#PBS -S /bin/bash
-
-## job name and output file
-#PBS -N go_mesher
-#PBS -j oe
-#PBS -o OUTPUT_FILES/job.o
-
-## 4 CPUs ( 4  ), walltime 1 hour
-#PBS -l nodes=1:ppn=4,walltime=1:00:00
-
-cd $PBS_O_WORKDIR
-
-if [ -z $USER ]; then
-	echo "could not run go_mesher_...bash as no USER env is set"
-	exit 2
-fi
-
-# script to run the mesher and the solver
-# read DATA/Par_file to get information about the run
-# compute total number of nodes needed
-NPROC_XI=`grep NPROC_XI DATA/Par_file | cut -d = -f 2 `
-NPROC_ETA=`grep NPROC_ETA DATA/Par_file | cut -d = -f 2`
-
-# total number of nodes is the product of the values read
-numnodes=$(( $NPROC_XI * $NPROC_ETA ))
-
-cp DATA/Par_file OUTPUT_FILES/
-
-# obtain lsf job information
-cat $PBS_NODEFILE > OUTPUT_FILES/compute_nodes
-echo "$PBS_JOBID" > OUTPUT_FILES/jobid
-
-echo starting MPI mesher on $numnodes processors
-echo " "
-
-sleep 2 
-mpiexec -np $numnodes $PWD/xgenerate_databases
-
-echo "done "

Deleted: seismo/3D/SPECFEM3D_SESAME/trunk/go_mesher
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/go_mesher	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/go_mesher	2010-02-25 03:35:08 UTC (rev 16336)
@@ -1,59 +0,0 @@
-#!/bin/csh
-
-# script to run the mesher
-
-# read DATA/Par_file to get information about the run
-
-# name of the file that contains the list of machines
-set machine_file = "mymachines"
-
-set my_local_path = `grep LOCAL_PATH DATA/Par_file | cut -d '=' -f 2 `
-
-# compute total number of processors needed
-set NPROC_XI = `grep NPROC_XI DATA/Par_file | cut -d '=' -f 2 `
-set NPROC_ETA = `grep NPROC_ETA DATA/Par_file | cut -d '=' -f 2 `
-
-# total number of processors is the product of the values read
-@ numprocessors = $NPROC_XI * $NPROC_ETA
-
-rm -r -f OUTPUT_FILES
-mkdir OUTPUT_FILES
-
-rm -f sources timestamp* PI* error_message* starttimeloop*
-
-if ( ! -d $my_local_path ) mkdir $my_local_path
-
-if ( -f $machine_file ) then
-  echo " "
-  echo using machine file \"$machine_file\"
-  echo " "
-  echo list of active machines:
-  echo " "
-  cat $machine_file
-  echo " "
-# this only used on a cluster if specifying list of machines
-# assumes the name of the machines is n001, n002 etc...
-# if name is different then change the  tr -d 'n' below
-  grep -v '#' $machine_file | tr -d ' ' | tr -d 'n' > OUTPUT_FILES/filtered_machines.txt
-endif
-
-echo NPROC_XI = $NPROC_XI
-echo NPROC_ETA = $NPROC_ETA
-echo " "
-echo starting MPI mesher on $numprocessors processors
-echo " "
-echo starting run in current directory $PWD
-echo " "
-echo mesh files will be saved in directory $my_local_path
-echo " "
-
-#### use this on Beowulf
-set MPIRUN="mpirun"
-$MPIRUN -nolocal -machinefile $machine_file -np $numprocessors $PWD/xgenerate_databases
-
-#### use this on SGI
-# mpirun -np $numprocessors xgenerate_databases
-
-#### use this on Compaq Dec Alpha
-# dmpirun -np $numprocessors xgenerate_databases
-

Deleted: seismo/3D/SPECFEM3D_SESAME/trunk/go_solver
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/go_solver	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/go_solver	2010-02-25 03:35:08 UTC (rev 16336)
@@ -1,50 +0,0 @@
-#!/bin/csh
-
-# script to run the solver
-
-# read DATA/Par_file to get information about the run
-
-# name of the file that contains the list of machines
-set machine_file = "mymachines"
-
-set my_local_path = `grep LOCAL_PATH DATA/Par_file | cut -d '=' -f 2 `
-
-# compute total number of processors needed
-set NPROC_XI = `grep NPROC_XI DATA/Par_file | cut -d '=' -f 2 `
-set NPROC_ETA = `grep NPROC_ETA DATA/Par_file | cut -d '=' -f 2 `
-
-# total number of processors is the product of the values read
-@ numprocessors = $NPROC_XI * $NPROC_ETA
-
-rm -f sources error*txt starttimeloop* timestamp* PI* RECORDHEADERS
-
-if ( -f $machine_file ) then
-  echo " "
-  echo using machine file \"$machine_file\"
-  echo " "
-  echo list of active machines:
-  echo " "
-  cat $machine_file
-  echo " "
-endif
-
-echo NPROC_XI = $NPROC_XI
-echo NPROC_ETA = $NPROC_ETA
-echo " "
-echo starting MPI solver on $numprocessors processors
-echo " "
-echo starting run in current directory $PWD
-echo " "
-echo mesh files will be read from directory $my_local_path
-echo " "
-
-#### use this on Beowulf
-set MPIRUN="mpirun"
-$MPIRUN -nolocal -machinefile $machine_file -np $numprocessors $PWD/xspecfem3D 
-
-#### use this on SGI
-# mpirun -np $numprocessors xspecfem3D
-
-#### use this on Compaq Dec Alpha
-# dmpirun -np $numprocessors xspecfem3D
-

Deleted: seismo/3D/SPECFEM3D_SESAME/trunk/go_solver_pbs.sesame.bash
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/go_solver_pbs.sesame.bash	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/go_solver_pbs.sesame.bash	2010-02-25 03:35:08 UTC (rev 16336)
@@ -1,45 +0,0 @@
-#!/bin/bash
-#PBS -S /bin/bash
-
-## job name and output file
-#PBS -N go_solver
-#PBS -j oe
-#PBS -o OUTPUT_FILES/job.o
-
-## 4 CPUs ( 4  ), walltime 1 hour
-#PBS -l nodes=1:ppn=4,walltime=1:00:00
-
-cd $PBS_O_WORKDIR
-
-if [ -z $USER ]; then
-	echo "could not run go_solver_...bash as no USER env is set"
-	exit 2
-fi
-
-# script to run the mesher and the solver
-# read DATA/Par_file to get information about the run
-# compute total number of nodes needed
-NPROC_XI=`grep NPROC_XI DATA/Par_file | cut -d = -f 2 `
-NPROC_ETA=`grep NPROC_ETA DATA/Par_file | cut -d = -f 2`
-
-# total number of nodes is the product of the values read
-numnodes=$(( $NPROC_XI * $NPROC_ETA ))
-
-rm -r -f OUTPUT_FILES
-mkdir OUTPUT_FILES
-cp DATA/Par_file OUTPUT_FILES/
-cp DATA/CMTSOLUTION OUTPUT_FILES/
-cp DATA/STATIONS OUTPUT_FILES/
-
-# obtain lsf job information
-cat $PBS_NODEFILE > OUTPUT_FILES/compute_nodes
-echo "$PBS_JOBID" > OUTPUT_FILES/jobid
-
-echo starting run in current directory $PWD
-echo " "
-
-sleep 2 
-mpiexec -np $numnodes $PWD/xspecfem3D
-
-echo "finished successfully"
-

Modified: seismo/3D/SPECFEM3D_SESAME/trunk/prepare_timerun.f90
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/prepare_timerun.f90	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/prepare_timerun.f90	2010-02-25 03:35:08 UTC (rev 16336)
@@ -547,12 +547,12 @@
           ! opens existing files
           open(unit=IOABS,file=trim(prname)//'absorb_field.bin',status='old',&
                 action='read',form='unformatted',access='direct', &
-                recl=b_reclen_field+2*sizeof(b_reclen_field) )
+                recl=b_reclen_field+2*4 )
         else
           ! opens new file
           open(unit=IOABS,file=trim(prname)//'absorb_field.bin',status='unknown',&
                 form='unformatted',access='direct',&
-                recl=b_reclen_field+2*sizeof(b_reclen_field) )
+                recl=b_reclen_field+2*4 )
         endif
       endif
 
@@ -567,12 +567,12 @@
           ! opens existing files
           open(unit=IOABS_AC,file=trim(prname)//'absorb_potential.bin',status='old',&
                 action='read',form='unformatted',access='direct', &
-                recl=b_reclen_potential+2*sizeof(b_reclen_potential) )
+                recl=b_reclen_potential+2*4 )
         else
           ! opens new file
           open(unit=IOABS_AC,file=trim(prname)//'absorb_potential.bin',status='unknown',&
                 form='unformatted',access='direct',&
-                recl=b_reclen_potential+2*sizeof(b_reclen_potential) )
+                recl=b_reclen_potential+2*4 )
         endif
       endif      
       

Deleted: seismo/3D/SPECFEM3D_SESAME/trunk/run3d.csh
===================================================================
--- seismo/3D/SPECFEM3D_SESAME/trunk/run3d.csh	2010-02-24 23:47:12 UTC (rev 16335)
+++ seismo/3D/SPECFEM3D_SESAME/trunk/run3d.csh	2010-02-25 03:35:08 UTC (rev 16336)
@@ -1,30 +0,0 @@
-#!/bin/csh
-
-# compile and run the mesher and then the solver, then collect the seismograms
-
-set OUTDIR="SEM"
-
-sleep 1
-make clean
-sleep 1
-make generate_databases
-sleep 10
-go_mesher
-
-sleep 5
-make clean
-sleep 1
-make specfem3D
-sleep 10
-go_solver
-
-sleep 5
-if (! -d $OUTDIR) then
-   mkdir $OUTDIR
-endif 
-cd $OUTDIR
-cp ../DATA/CMTSOLUTION .
-cp ../DATA/STATIONS .
-cp ../DATA/Par_file .
-collect_seismos < ../collect_seismos.in
-



More information about the CIG-COMMITS mailing list