make_condortest

PURPOSE ^

Generate matlabtest.condor script for the local machine. Must be run

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Generate matlabtest.condor script for the local machine. Must be run
 before testing condor. the batch scheduler condor must be active. 

 by Y. Peysson DRFC-CEA <yves.peysson@cea.fr> and J. Decker DRFC-CEA <joan.decker@cea.fr>

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %
0002 % Generate matlabtest.condor script for the local machine. Must be run
0003 % before testing condor. the batch scheduler condor must be active.
0004 %
0005 % by Y. Peysson DRFC-CEA <yves.peysson@cea.fr> and J. Decker DRFC-CEA <joan.decker@cea.fr>
0006 %
0007 filename = ['matlabtest.condor'];
0008 fileid = fopen(filename,'w');
0009 %
0010 fprintf(fileid,['####################','\n']);
0011 fprintf(fileid,['##','\n']);
0012 fprintf(fileid,['## .condor file for matlab testing simulation ','\n']);
0013 fprintf(fileid,['##','\n']);
0014 fprintf(fileid,['## Type the following command is the directory','\n']);
0015 fprintf(fileid,['##','\n']);
0016 fprintf(fileid,['## condor_status (for the number of nodes)','\n']);
0017 fprintf(fileid,['## condor_submit matlabtest.condor','\n']);
0018 fprintf(fileid,['## condor_q ','\n']);
0019 fprintf(fileid,['## condor_status','\n']);
0020 fprintf(fileid,['## ...','\n']);
0021 fprintf(fileid,['##','\n']);
0022 fprintf(fileid,['####################','\n']);
0023 fprintf(fileid,[' ','\n']);
0024 fprintf(fileid,[' ','\n']);
0025 fprintf(fileid,['#','\n']);
0026 fprintf(fileid,['# your username is used in pathname (if specified in the config.local file)','\n']);
0027 fprintf(fileid,['#','\n']);
0028 fprintf(fileid,['##User = --username--','\n']);
0029 fprintf(fileid,[' ','\n']);
0030 fprintf(fileid,[' ','\n']);
0031 fprintf(fileid,['# Check the Condor primer on which universe to choose','\n']);
0032 fprintf(fileid,['# (standard / vanilla)','\n']);
0033 fprintf(fileid,['Universe        = vanilla','\n']);
0034 fprintf(fileid,[' ','\n']);
0035 fprintf(fileid,[' ','\n']);
0036 fprintf(fileid,['#','\n']);
0037 fprintf(fileid,['# Edit these value','\n']);
0038 fprintf(fileid,['#','\n']);
0039 fprintf(fileid,[' ','\n']);
0040 fprintf(fileid,['InputDir    = ',pwd,'\n']);
0041 fprintf(fileid,[' ','\n']);
0042 fprintf(fileid,[' ','\n']);
0043 fprintf(fileid,['#','\n']);
0044 fprintf(fileid,['# Edit these value','\n']);
0045 fprintf(fileid,['#','\n']);
0046 fprintf(fileid,['OutputDir      = $(InputDir)','\n']);
0047 fprintf(fileid,[' ','\n']);
0048 fprintf(fileid,[' ','\n']);
0049 fprintf(fileid,['# The absolute path (not relative to InitialDir!) to','\n']);
0050 fprintf(fileid,['# your Executable','\n']);
0051 fprintf(fileid,['Executable      = $(InputDir)/condor_matlab.sh','\n']);
0052 fprintf(fileid,[' ','\n']);
0053 fprintf(fileid,['# ','\n']);
0054 fprintf(fileid,['# Do not edit','\n']);
0055 fprintf(fileid,['# ','\n']);
0056 fprintf(fileid,['InitialDir      = $(InputDir)','\n']);
0057 fprintf(fileid,[' ','\n']);
0058 fprintf(fileid,[' ','\n']);
0059 fprintf(fileid,['# Error and Log files: Relative path to InitialDir','\n']);
0060 fprintf(fileid,['# The directories referred must already exist.','\n']);
0061 fprintf(fileid,['# Error will contain StdErr of your program.','\n']);
0062 fprintf(fileid,['# You can use $(Process) which will be replaced by','\n']);
0063 fprintf(fileid,['# the identifier of the corresponding process.','\n']);
0064 fprintf(fileid,['# (each queue initiates a new process)','\n']);
0065 fprintf(fileid,['Error           = $(OutputDir)/err.$(Process)','\n']);
0066 fprintf(fileid,['Log             = $(OutputDir)/log.$(Process)','\n']);
0067 fprintf(fileid,[' ','\n']);
0068 fprintf(fileid,[' ','\n']);
0069 fprintf(fileid,['environment = LUKE_matlabroot=',regexprep(getenv('TOOLBOX'), 'toolbox', 'bin/'),'\n']);
0070 fprintf(fileid,[' ','\n']);
0071 fprintf(fileid,['# This is to be turned on for Matlab simulations.','\n']);
0072 fprintf(fileid,['GetEnv        = true','\n']);
0073 fprintf(fileid,[' ','\n']);
0074 fprintf(fileid,[' ','\n']);
0075 fprintf(fileid,['# Transfer-input-files is a list of all files being','\n']);
0076 fprintf(fileid,['# used by your job other than the Executable.','\n']);
0077 fprintf(fileid,['##Transfer-Input-Files =  condortest.m','\n']);
0078 fprintf(fileid,[' ','\n']);
0079 fprintf(fileid,[' ','\n']);
0080 fprintf(fileid,['#','\n']);
0081 fprintf(fileid,['#  Variables are defined','\n']);
0082 fprintf(fileid,['#','\n']);
0083 fprintf(fileid,[' ','\n']);
0084 fprintf(fileid,['sleepInterval = 1 ','\n']);
0085 fprintf(fileid,['sleepNumber = 10','\n']);
0086 fprintf(fileid,['filename = $(OutputDir)/test_condor_$(sleepNumber)-$(sleepInterval).txt','\n']);
0087 fprintf(fileid,[' ','\n']);
0088 fprintf(fileid,[' ','\n']);
0089 fprintf(fileid,['# Transfer-Output-files is a list of all files','\n']);
0090 fprintf(fileid,['# containing results other than StdOut, StdErr','\n']);
0091 fprintf(fileid,['##Transfer-Output-Files = $(filename)','\n']);
0092 fprintf(fileid,[' ','\n']);
0093 fprintf(fileid,[' ','\n']);
0094 fprintf(fileid,['# Arguments are as if you would run your program,','\n']);
0095 fprintf(fileid,['# locally. If you use filenames here, they should also','\n']);
0096 fprintf(fileid,['# figure under Transfer-(Input/Output)-Files !','\n']);
0097 fprintf(fileid,['Arguments       = condortest( $(sleepNumber), $(sleepInterval), ''$(filename)'' )','\n']);
0098 fprintf(fileid,[' ','\n']);
0099 fprintf(fileid,[' ','\n']);
0100 fprintf(fileid,['# Output file: Relative path to InitialDir','\n']);
0101 fprintf(fileid,['# The directories referred must already exist.','\n']);
0102 fprintf(fileid,['# This file will contain StdOut of your program.','\n']);
0103 fprintf(fileid,['# You can use $(Process) which will be replaced by','\n']);
0104 fprintf(fileid,['# the identifier of the corresponding process.','\n']);
0105 fprintf(fileid,['# (each queue initiates a new process)','\n']);
0106 fprintf(fileid,['##Output          = $(OutputDir)/output-$(sleepNumber)-$(Process).txt','\n']);
0107 fprintf(fileid,[' ','\n']);
0108 fprintf(fileid,[' ','\n']);
0109 fprintf(fileid,['# This will enqueue as many processes as indicated.','\n']);
0110 fprintf(fileid,['# After this you may overwrite some attributes and','\n']);
0111 fprintf(fileid,['# queue different job instances again (as seen below).','\n']);
0112 fprintf(fileid,['Queue 1','\n']);
0113 fprintf(fileid,[' ','\n']);
0114 fprintf(fileid,['sleepNumber = 9','\n']);
0115 fprintf(fileid,['Queue 1','\n']);
0116 fprintf(fileid,[' ','\n']);
0117 fprintf(fileid,['sleepNumber = 8','\n']);
0118 fprintf(fileid,['Queue 1','\n']);
0119 fprintf(fileid,[' ','\n']);
0120 fprintf(fileid,['sleepNumber = 7','\n']);
0121 fprintf(fileid,['Queue 1','\n']);
0122 fprintf(fileid,[' ','\n']);
0123 fprintf(fileid,['sleepNumber = 6','\n']);
0124 fprintf(fileid,['Queue 1','\n']);
0125 fprintf(fileid,[' ','\n']);
0126 fprintf(fileid,['sleepNumber = 5','\n']);
0127 fprintf(fileid,['Queue 1','\n']);
0128 fprintf(fileid,[' ','\n']);
0129 %
0130 fclose(fileid);
0131 %

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.