Changeset 308 for trunk/src/civ.m


Ignore:
Timestamp:
Nov 30, 2011, 4:19:19 PM (12 years ago)
Author:
gostiaux
Message:

batch for LEGI debugging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r307 r308  
    20732073                end
    20742074                fclose(fid)
    2075                
    2076                
     2075                text_oarscript=[...
     2076                    '#!/bin/bash \n'...
     2077                    '#OAR -n Mylauncher \n'...
     2078                    '#OAR -l node=4/core=5,walltime=0:15:00 \n'...
     2079                    '#OAR -E stderrfile.log \n'...
     2080                    '#OAR -O stdoutfile.log \n'...
     2081                    '# ========================================================= \n'...
     2082                    '# This simple program launch a multinode parallel OpenMPI mpilauncher \n'...
     2083                    '# application for coriolis PIV post-processing. \n'...
     2084                    '# OAR uses oarshmost wrapper to propagate the user environement. \n'...
     2085                    '# This wrapper assert that the user has the same environment on all the \n'...
     2086                    '# allocated nodes (basic behavior needed by most MPI applications).  \n'...
     2087                    '# \n'...
     2088                    '# REQUIREMENT: \n'...
     2089                    '# the oarshmost wrapper should be installed in $HOME/bin directory. \n'...
     2090                    '# If a different location is used, change the line following the comment "Bidouille" \n'...
     2091                    '# ========================================================= \n'...
     2092                    '#   USER should only modify these 2 lines  \n'...
     2093                    'WORKDIR=/home/users/gostiaux/tmp/begou \n'...
     2094                    'COMMANDE="/home/users/gostiaux/tmp/begou/mpilauncher  -f ' filename_joblist '" \n'...
     2095                    '# ========================================================= \n'...
     2096                    '# DO NOT MODIFY the FOLOWING LINES. (or be carefull) \n'...
     2097                    'echo "job starting on: "`hostname` \n'...
     2098                    'MPINODES="-host `tr [\\\\\\n] [,] <$OAR_NODEFILE |sed -e "s/,$/ /"`" \n'...
     2099                    'NCPUS=`cat $OAR_NODEFILE |wc -l` \n'...
     2100                    '#========== Bidouille ============== \n'...
     2101                    'export OMPI_MCA_plm_rsh_agent=$HOME/tmp/begou/oarshmost \n'...
     2102                    'cd $WORKDIR \n'...
     2103                    'CMD="mpirun -np $NCPUS  -wdir $WORKDIR $MPINODES $COMMANDE" \n'...
     2104                    'echo "I run: $CMD"  \n'...
     2105                    '$CMD \n'...
     2106                    'echo "job ending" \n'...
     2107                    ];
    20772108%                 oarsub -S ./oar.sub
     2109                filename_oarscript=fullfile(Rootbat,'oar_command');
     2110                fid=fopen(filename_oarscript,'w');
     2111                fprintf(fid,[text_oarscript]);
     2112                fclose(fid);
     2113                eval(['!chmod +x  ' filename_oarscript]);
     2114                eval(['!oarsub -S ' filename_oarscript]);
    20782115
    20792116               
Note: See TracChangeset for help on using the changeset viewer.