Difference between revisions of "DAKOTA"
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
==Running DAKOTA== | ==Running DAKOTA== | ||
It is the best to illustrate DAKOTA function by an example. Running DAKOTA requires typically DAKOTA input file, template file to generate variants of input files for the actual calculation tool, and driver script that defines for DAKOTA how to read the results. This example is built for Serpent and analysis of multiplication factor uncertainty due to fuel salt density uncertainty. | It is the best to illustrate DAKOTA function by an example. Running DAKOTA requires typically DAKOTA input file, template file to generate variants of input files for the actual calculation tool, and driver script that defines for DAKOTA how to read the results. This example is built for Serpent and analysis of multiplication factor uncertainty due to fuel salt density uncertainty. | ||
+ | |||
+ | DAKOTA input file defines calculation parameters. Especially the sampling method, default value of the analysed parameter and its standard deviation. | ||
+ | |||
+ | environment | ||
+ | tabular_data | ||
+ | output_precision 1e-16 | ||
+ | results_output | ||
+ | |||
+ | method | ||
+ | sampling | ||
+ | sample_type lhs | ||
+ | seed = 52983 | ||
+ | samples = 100 | ||
+ | |||
+ | model | ||
+ | single | ||
+ | |||
+ | variables | ||
+ | active all | ||
+ | normal_uncertain = 1 | ||
+ | means -2.06684099705179 | ||
+ | std_deviations 0.02 | ||
+ | descriptors 'saltDensity' | ||
+ | |||
+ | interface | ||
+ | analysis_drivers = 'driver.sh' | ||
+ | fork | ||
+ | parameters_file = 'params.in' | ||
+ | results_file = 'results.out' | ||
+ | file_save | ||
+ | |||
+ | responses | ||
+ | response_functions = 1 | ||
+ | descriptors = 'kinf' | ||
+ | no_gradients no_hessians | ||
+ | |||
+ | Serpent template file with {saltDensity} keyword to be replaced by the variations. | ||
+ | |||
+ | set title "Graphite block 12 cm, salt channel 5 cm" | ||
+ | |||
+ | pin 1 | ||
+ | salt 5 | ||
+ | graphite | ||
+ | |||
+ | pin e | ||
+ | graphite | ||
+ | |||
+ | lat lat.1 2 0.0 0.0 3 3 12 | ||
+ | e e e | ||
+ | e 1 e | ||
+ | e e e | ||
+ | |||
+ | surf S.1 hexyc 0.0 0.0 6 | ||
+ | |||
+ | cell C.1 0 fill lat.1 -S.1 | ||
+ | cell C.O 0 outside S.1 | ||
+ | |||
+ | mat salt {saltDensity} | ||
+ | 3007.02c 3.60000E-01 | ||
+ | 9019.02c 5.48000E-01 | ||
+ | 4009.02c 9.00000E-02 | ||
+ | 92235.02c 1.01214E-04 | ||
+ | 92238.02c 1.89742E-03 | ||
+ | 92234.02c 9.04661E-07 | ||
+ | 92236.02c 4.63607E-07 | ||
+ | |||
+ | mat graphite -1.8 moder grph12 6012 | ||
+ | 6012.02c 0.9893 | ||
+ | 6013.02c 0.0107 | ||
+ | therm grph12 900 gr30.85t gr30.86t | ||
+ | |||
+ | set acelib "/opt/ENDFB-8.0/endfb80.xsdir" | ||
+ | set declib "/opt/ENDFB-8.0/sss_endfb80.dec" | ||
+ | set nfylib "/opt/ENDFB-8.0/sss_endfb80.nfy" | ||
+ | |||
+ | set bc 3 | ||
+ | |||
+ | set pop 10000 500 20 | ||
+ | |||
+ | The next file is '''driver.sh''' file that depends on the computational environment. The presented version works with the NEcluster. This '''driver.sh''' file defines preprocessing command for DAKOTA, check for existence of output files, submit command for the Serpent job, waiting for the results, and command to get results from Serpent output file. | ||
+ | |||
+ | #!/bin/bash | ||
+ | |||
+ | dprepro params.in msrG12S5_template msrG12S5_input | ||
+ | |||
+ | if [ -f msrG12S5_input.done ]; then | ||
+ | rm msrG12S5_input.done | ||
+ | fi | ||
+ | |||
+ | qsub runScript.sh | ||
+ | |||
+ | while [ ! -f msrG12S5_input.done ]; do | ||
+ | echo "#" | ||
+ | sleep 30 | ||
+ | done | ||
+ | |||
+ | awk '/IMP_KEFF/ {print $7,'kinf'}' msrG12S5_input_res.m > results.out | ||
+ | |||
+ | For completeness also the '''runScript.sh''' is given here. It produces at the end also the output file for which the '''driver.sh''' script searches. | ||
+ | |||
+ | #!/bin/bash | ||
+ | #PBS -V | ||
+ | #PBS -q gen5 | ||
+ | #PBS -l nodes=4:ppn=4 | ||
+ | #PBS -l mem=4000mb | ||
+ | |||
+ | module load mpi | ||
+ | module load serpent | ||
+ | |||
+ | #### cd working directory (where you submitted your job) | ||
+ | cd ${PBS_O_WORKDIR} | ||
+ | |||
+ | #### Executable Line | ||
+ | mpirun -npernode 1 sss2 -omp 4 msrG12S5_input > nohup.out | ||
+ | touch msrG12S5_input.done |
Latest revision as of 21:53, 23 January 2019
DAKOTA developed by Sandia National Laboratory represents a tool for optimization of designs, sensitivity and uncertainty analysis of virtually unlimited kinds of simulations. The user manual can be found at DAKOTA homepage.
Running DAKOTA
It is the best to illustrate DAKOTA function by an example. Running DAKOTA requires typically DAKOTA input file, template file to generate variants of input files for the actual calculation tool, and driver script that defines for DAKOTA how to read the results. This example is built for Serpent and analysis of multiplication factor uncertainty due to fuel salt density uncertainty.
DAKOTA input file defines calculation parameters. Especially the sampling method, default value of the analysed parameter and its standard deviation.
environment tabular_data output_precision 1e-16 results_output method sampling sample_type lhs seed = 52983 samples = 100 model single variables active all normal_uncertain = 1 means -2.06684099705179 std_deviations 0.02 descriptors 'saltDensity' interface analysis_drivers = 'driver.sh' fork parameters_file = 'params.in' results_file = 'results.out' file_save responses response_functions = 1 descriptors = 'kinf' no_gradients no_hessians
Serpent template file with {saltDensity} keyword to be replaced by the variations.
set title "Graphite block 12 cm, salt channel 5 cm" pin 1 salt 5 graphite pin e graphite lat lat.1 2 0.0 0.0 3 3 12 e e e e 1 e e e e surf S.1 hexyc 0.0 0.0 6 cell C.1 0 fill lat.1 -S.1 cell C.O 0 outside S.1 mat salt {saltDensity} 3007.02c 3.60000E-01 9019.02c 5.48000E-01 4009.02c 9.00000E-02 92235.02c 1.01214E-04 92238.02c 1.89742E-03 92234.02c 9.04661E-07 92236.02c 4.63607E-07 mat graphite -1.8 moder grph12 6012 6012.02c 0.9893 6013.02c 0.0107 therm grph12 900 gr30.85t gr30.86t set acelib "/opt/ENDFB-8.0/endfb80.xsdir" set declib "/opt/ENDFB-8.0/sss_endfb80.dec" set nfylib "/opt/ENDFB-8.0/sss_endfb80.nfy" set bc 3 set pop 10000 500 20
The next file is driver.sh file that depends on the computational environment. The presented version works with the NEcluster. This driver.sh file defines preprocessing command for DAKOTA, check for existence of output files, submit command for the Serpent job, waiting for the results, and command to get results from Serpent output file.
#!/bin/bash dprepro params.in msrG12S5_template msrG12S5_input if [ -f msrG12S5_input.done ]; then rm msrG12S5_input.done fi qsub runScript.sh while [ ! -f msrG12S5_input.done ]; do echo "#" sleep 30 done awk '/IMP_KEFF/ {print $7,'kinf'}' msrG12S5_input_res.m > results.out
For completeness also the runScript.sh is given here. It produces at the end also the output file for which the driver.sh script searches.
#!/bin/bash #PBS -V #PBS -q gen5 #PBS -l nodes=4:ppn=4 #PBS -l mem=4000mb module load mpi module load serpent #### cd working directory (where you submitted your job) cd ${PBS_O_WORKDIR} #### Executable Line mpirun -npernode 1 sss2 -omp 4 msrG12S5_input > nohup.out touch msrG12S5_input.done