From 7a15a5e02d18c04c051d881d9a5d6e95e8dab262 Mon Sep 17 00:00:00 2001 From: Ulrich Noebauer Date: Mon, 9 Oct 2017 14:09:48 +0200 Subject: [PATCH 1/3] Change default nthreads to 0 --- tardis/io/schemas/montecarlo.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tardis/io/schemas/montecarlo.yml b/tardis/io/schemas/montecarlo.yml index f7424c3e3e7..17599d9ee0a 100644 --- a/tardis/io/schemas/montecarlo.yml +++ b/tardis/io/schemas/montecarlo.yml @@ -4,8 +4,9 @@ properties: nthreads: type: number multipleOf: 1.0 - default: 1 - description: The number of OpenMP threads. + default: 0 + description: The number of OpenMP threads (if 0, the maximum number of + available threads are used). seed: type: number multipleOf: 1.0 From 18437517435428c7b05a932b406c15840cb19b4d Mon Sep 17 00:00:00 2001 From: Ulrich Noebauer Date: Mon, 9 Oct 2017 14:10:37 +0200 Subject: [PATCH 2/3] Remove deprecated version of example config --- tardis/data/tardis_example_config.yml | 130 -------------------------- 1 file changed, 130 deletions(-) delete mode 100644 tardis/data/tardis_example_config.yml diff --git a/tardis/data/tardis_example_config.yml b/tardis/data/tardis_example_config.yml deleted file mode 100644 index 29fe51de8ee..00000000000 --- a/tardis/data/tardis_example_config.yml +++ /dev/null @@ -1,130 +0,0 @@ -#IMPORTANT any pure floats need to have a +/- after the e e.g. 2e+5 -#Hopefully pyyaml will fix this soon. ---- -#Currently only simple1d is allowed -config_type: simple1d - -#luminosity any astropy.unit convertible to erg/s -#special unit log_lsun(log(luminosity) - log(L_sun) -supernova: - luminosity: 9.44 log_lsun - time_explosion: 13 day - distance : 1 Mpc - -#time since explosion - - - -atom_data: atom_data.h5 - -plasma: - initial_t_inner: 10000 K - initial_t_rad: 10000 K - disable_electron_scattering: no - type: nebular - #radiative_rates_type - currently supported are lte, nebular and detailed - radiative_rates_type: detailed - #line interaction type - currently supported are scatter, downbranch and macroatom - line_interaction_type : macroatom - w_epsilon : 1.0e-10 - - nlte: - species: [Si 2, ca iii] -# coronal_approximation: False -# classical_nebular: False - -model: - structure: - type: file - filetype - filename - lowest_shell - highest_shell - no_of_shells : 20 -# file: -# type : artis -# name : artis_model.dat -# v_lowest: 10000.0 km/s -# v_highest: 20000.0 km/s - - - velocity: - type : linear - v_inner : 1.1e4 km/s - v_outer : 2e4 km/s - - - density: - #showing different configuration options separated by comments - #simple uniform: - #--------------- -# type : uniform -# value : 1e-12 g/cm^3 - #--------------- - - #branch85_w7 - fit of seven order polynomial to W7 (like Branch 85): - #--------------- - type : branch85_w7 - #value : 1e-12 - # default, no need to change! - #time_0 : 19.9999584 s - # default, no need to change! - #density_coefficient : 3e29 - #--------------- - - - abundances: - type: uniform | file - #file: - # type : artis - # name : artis_abundances.dat - -# abundance_set: -# type: uniform -# name: lucy99 -# nlte_species : [Si2] -# C: 0.01 -# O: 0.01 -# Ne: 0.01 -# Mg: 0.01 -# Si: 0.45 -# S: 0.35 -# Ar: 0.04 -# Ca: 0.03 -# Fe: 0.07 -# Co: 0.01 -# Ni: 0.01 - Si: 1.00 - - -montecarlo: - seed: 23111963171620 - no_of_packets : 2.e+4 - iterations: 100 - convergence_strategy: - type: specific - damping_constant: 0.5 - threshold: 0.05 - fraction: 0.8 - hold_iterations: 3 - - - -# convergence_strategy: -# type: 'tighten' -# tighten_parameters: [1., 1., 0.75, 0.5, 0.25, 0.125] -# convergence_percentage: 0.01 - -# type: 'undampened' -# t_inner_convergence: 0.01 - - -# last_no_of_packets: 2.0e+5 -# no_of_virtual_packets: 10 - - -spectrum: - start : 500 angstrom - end : 20000 angstrom - bins : 1000 - spectrum_type: flux #flux or lum_density From 8e8068b846ef5f1aa42757d08690d889941f4833 Mon Sep 17 00:00:00 2001 From: Ulrich Noebauer Date: Mon, 9 Oct 2017 14:23:58 +0200 Subject: [PATCH 3/3] Update schema info for nthreads = 0 --- tardis/io/schemas/montecarlo.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tardis/io/schemas/montecarlo.yml b/tardis/io/schemas/montecarlo.yml index 17599d9ee0a..7fed6027f9f 100644 --- a/tardis/io/schemas/montecarlo.yml +++ b/tardis/io/schemas/montecarlo.yml @@ -5,8 +5,9 @@ properties: type: number multipleOf: 1.0 default: 0 - description: The number of OpenMP threads (if 0, the maximum number of - available threads are used). + description: The number of OpenMP threads. If set to 0, the value stored in + the OMP_NUM_THREADS environment variable is used. If this variable is not + set, the maximum number of available threads are used. seed: type: number multipleOf: 1.0