Commit 485afdf9 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Add test case for parallel SPHERE

parent 3ce1423c
Loading
Loading
Loading
Loading
+15 −6
Original line number Diff line number Diff line
@@ -236,19 +236,25 @@ running_stage:
      - cd build/libnptm
      - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH;$PWD"
      - cd ../sphere
      - echo "Testing configurator for sphere"
      - echo "Testing configurator for SPHERE"
      - ../../src/scripts/model_maker.py ../../test_data/sphere/config_dev.yml
      - echo "Running np_sphere"
      - chmod +x np_sphere
      - OMP_NUM_THREADS=1 ./np_sphere DEDFB DSPH .
      - mv c_OSPH c_OSPH_dev
      - echo "Testing parallel execution of SPHERE"
      - ../../src/scripts/model_maker.py ../../test_data/sphere/config_181_xi.yml
      - echo "Running parallel np_sphere"
      - OMP_NUM_THREADS=2 ./np_sphere DEDFB_181_xi DSPH_181_xi .
      - mv c_OSPH c_OSPH_181_xi
      - cd ../cluster
      - echo "Testing configurator for cluster"
      - echo "Testing configurator for CLUSTER"
      - ../../src/scripts/model_maker.py ../../test_data/cluster/config_dev.yml
      - echo "Running np_cluster"
      - chmod +x np_cluster
      - OMP_NUM_THREADS=1 ./np_cluster DEDFB DCLU .
      - cd ../inclusion
      - echo "Testing configurator for inclusion"
      - echo "Testing configurator for INCLUSION"
      - ../../src/scripts/model_maker.py ../../test_data/inclusion/config_dev.yml
      - echo "Running np_inclusion"
      - chmod +x np_inclusion
@@ -282,9 +288,12 @@ testing_stage:
      - cd build/libnptm
      - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH;$PWD"
      - cd ../sphere
      - export FFILE=../../test_data/sphere/OSPH
      - echo "Comparing output of SPHERE"
      - python3 ../../src/scripts/pycompare.py --no-progress --ffile $FFILE --cfile c_OSPH --html
      - export FFILE=../../test_data/sphere/OSPH
      - python3 ../../src/scripts/pycompare.py --no-progress --ffile $FFILE --cfile c_OSPH_dev --html
      - echo "Comparing output of parallel SPHERE"
      - export FFILE=../../test_data/sphere/OSPH_181_xi
      - python3 ../../src/scripts/pycompare.py --no-progress --ffile $FFILE --cfile c_OSPH_181_xi --html
      - echo "Checking consistency among legacy and HDF5 configuration files"
      - ../testing/test_TEDF ../../test_data/sphere/DEDFB c_TEDF c_TEDF.hd5
      - cd ../inclusion
@@ -316,7 +325,7 @@ testing_stage:
      - export FFILE=../../test_data/cluster/OCLU_24
      - python3 ../../src/scripts/pycompare.py --no-progress --ffile $FFILE --cfile c_OCLU_24
      - rm -rf c_OCLU_24
      - echo "Checking consistency of HDF5 incluson output"
      - echo "Checking consistency of HDF5 inclusion output"
      - chmod u+x test_inclusion_outputs
      - ./test_inclusion_outputs
      - export FFILE=../../test_data/inclusion/OINCLU
+6172 −0

File added.

Preview size limit exceeded, changes collapsed.

+126 −0
Original line number Diff line number Diff line
system_settings:
  # Limit on host RAM use in Gb (0 for no configuration limit)
  max_host_ram : 0
  # Limit on GPU RAM use in Gb ( 0 for no configuration limit)
  max_gpu_ram  : 0

input_settings:
  # Folder to write the code input configuration files
  input_folder : "."
  # Name of the scatterer description file
  spheres_file : "DEDFB_181_xi"
  # Name of the geometry description file
  geometry_file: "DSPH_181_xi"
  
output_settings:
  # Folder for the code output storage
  output_folder: "."
  # Name of the main output file
  output_name  : "c_OSPH"
  # Requested output formats
  formats      : [ "LEGACY", "HDF5" ]
  # Index of the scale for transition matrix output
  jwtm         : 1

particle_settings:
  # What application to use (SPHERE | CLUSTER | INCLUSION)
  application : "SPHERE"
  # Number of spheres
  n_spheres   : 1
  # Number of sphere types
  n_types     : 1
  # Vector of sphere type identifiers (what type is each sphere)
  sph_types   : [ 1 ]
  # Vector of layers in types (how many layers in each type)
  n_layers    : [ 2 ]
  # Spherical monomer radii in m (one size for each type)
  radii       : [ 9.085603e-8 ]
  # Layer fractional radii (one per layer in each type)
  rad_frac    : [ [ 0.5, 1.0 ] ]
  # Index of the dielectric constants (one per layer in each type)
  #
  # 1 is first file in `dielec_file`, 2 is second ...
  dielec_id   : [ [ 1, 2 ] ]

material_settings:
  diel_flag   : 0
  # External medium dielectric constant
  extern_diel : 1.00e+00
  # Dielectric constant files folder
  dielec_path : "../../ref_data"
  # List of dielectric constant files (used if diel_flag = 0)
  dielec_file : [ "eps_draine_Si.csv", "eps_ashok_C.csv" ]
  # Dielectric constant files format (same for all files)
  dielec_fmt  : [ "CSV" ]
  # Matching method between optical constants and radiation wavelengths
  #
  # INTERPOLATE: the constants are interpolated on wavelengths
  # GRID: only the wavelengths with defined constants are computed
  #
  match_mode  : "INTERPOLATE"
  # Reference dielectric constants (used if diel_flag = -1)
  #
  # One real and one imaginary part for each layer in each type.
  diel_const  : [ ]

radiation_settings:
  # Radiation field polarization (LINEAR | CIRCULAR)
  polarization: "LINEAR"
  # First scale to be used
  scale_start : 1.00e-07
  # Last scale to be used
  scale_end   : 1.00e-06
  # Calculation step (overridden if `match_mode` is GRID)
  scale_step  : 5.00e-09
  # Peak Omega
  wp          : 3.00e+08
  # Peak scale
  xip         : 1.00e+00
  # Define scale explicitly (0) or in equal steps (1)
  step_flag   : 0
  # Type of scaling variable
  scale_name  : "WAVELENGTH"

geometry_settings:
  # Maximum internal field expansion
  li          : 4
  # Maximum external field expansion (not used by SPHERE)
  le          : 8
  # Number of transition layer integration points
  npnt        : 149
  # Number of non transition layer integration points
  npntts      : 300
  # Averaging mode
  iavm        : 0
  # Meridional plane flag
  isam        : 0
  # Starting incidence azimuth angle
  in_th_start : 0.0
  # Incidence azimuth angle incremental step
  in_th_step  : 0.0
  # Ending incidence azimuth angle
  in_th_end   : 0.0
  # Starting incidence elevation angle
  in_ph_start : 0.0
  # Incidence elevation angle incremental step
  in_ph_step  : 0.0
  # Ending incidence elevation angle
  in_ph_end   : 0.0
  # Starting scattered azimuth angle
  sc_th_start : 0.0
  # Scattered azimuth angle incremental step
  sc_th_step  : 0.0
  # Ending scattered azimuth angle
  sc_th_end   : 0.0
  # Starting scattered elevation angle
  sc_ph_start : 0.0
  # Scattered elevation angle incremental step
  sc_ph_step  : 0.0
  # Ending scattered elevation angle
  sc_ph_end   : 0.0
  # Vector of sphere X coordinates (one per sphere or empty for random)
  x_coords    : [ ]
  # Vector of sphere Y coordinates (one per sphere or empty for random)
  y_coords    : [ ]
  # Vector of sphere Z coordinates (one per sphere or empty for random)
  z_coords    : [ ]