Using the MCARLO.BAT Batch File

EPMA Probe

Using the MCARLO.BAT Batch File

For best results a batch file can also be created that automatically deletes the output file, copies the input file, runs MQ and copies the output file back to a sub directory. An example batch file (included in the installation) can be seen here:

 

REM  This Batch file (MCARLO.BAT) MUST be executed from a data sub-directory!!!

REM  Usage: CALL ..\MCARLO "inputfile"          (without extension)

REM  (use double quotes if spaces exist in filename)

copy ..\cdonly.dat ..\cdonly.bat > nul

cd >> ..\cdonly.bat

copy %1.inp ..\mcarlo.inp

cd..

del mcarlo.dat

mq < mcarlo.inp

call cdonly

copy ..\mcarlo.dat %1.dat

del ..\cdonly.bat

 

Note that the MCARLO.BAT batch file shown here must reside in the directory containing the MQ executable, but must be run or called from a sub-directory of that directory. This sub-directory should be the directory containing MQ input files and will therefore generally contain the MQ input files previously created by the Standard program.

 

The batch file shown above uses a small file called CDONLY.DAT. This file is an ASCII file that contains only the characters "cd ", that is the letters "cd" and a space. This is used to create a small batch file that contains the return path to the sub-directory and is executed once MQ has finished running.

 

The MCARLO.BAT batch file shown above must therefore be called from the command line as seen here:

 

..\MCARLO "inputfile"

 

Where the "..\" indicates the parent directory. The MCARLO.BAT batch file will automatically process each input file (*.INP) and save the output to an output file with that same name but a different extension (*.DAT).

 

Multiple Batch Processing

Or the MCARLO.BAT file may be called from another batch file (from the MQ input file sub-directory) as seen here for automating multiple MQ calculations:

 

CALL ..\MCARLO "inputfile1"

CALL ..\MCARLO "inputfile2"

CALL ..\MCARLO "inputfile3"

CALL ..\MCARLO "inputfile4"

CALL ..\MCARLO "inputfile5"

 

A multiple call batch file is automatically created for each type of input file to facilitate extended runs of many compositions. Calls to pure element input files (see next section) for each keV condition are contained in a batch files called 15-ELEMENT.BAT (in this case for 15 keV input files). Calls to the complete set of binary compositions (see next section) are contained in a batch file called 15-BINARY.BAT (again for 15 keV input files). Calls to input files created for compositions in the standard database are contained in a batch file called 15-STANDARD.BAT. All these batch files will be written by default to the MQ-DATA sub-directory.