Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NP_TMcode
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Mulas
NP_TMcode
Commits
485afdf9
Commit
485afdf9
authored
4 months ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Add test case for parallel SPHERE
parent
3ce1423c
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+15
-6
15 additions, 6 deletions
.gitlab-ci.yml
test_data/sphere/OSPH_181_xi
+6172
-0
6172 additions, 0 deletions
test_data/sphere/OSPH_181_xi
test_data/sphere/config_181_xi.yml
+126
-0
126 additions, 0 deletions
test_data/sphere/config_181_xi.yml
with
6313 additions
and
6 deletions
.gitlab-ci.yml
+
15
−
6
View file @
485afdf9
...
...
@@ -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 inclus
i
on output"
-
chmod u+x test_inclusion_outputs
-
./test_inclusion_outputs
-
export FFILE=../../test_data/inclusion/OINCLU
...
...
This diff is collapsed.
Click to expand it.
test_data/sphere/OSPH_181_xi
0 → 100644
+
6172
−
0
View file @
485afdf9
This diff is collapsed.
Click to expand it.
test_data/sphere/config_181_xi.yml
0 → 100644
+
126
−
0
View file @
485afdf9
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
:
[
]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment