Basic execution¶
Command Line Help¶
$ llg3d -h
usage: llg3d [-h] [-v] [--element {Cobalt,Iron,Nickel}] [--N N] [--dt DT]
[--Jx JX] [--Jy JY] [--Jz JZ] [--dx DX] [--T T] [--H_ext H_EXT]
[--init_type {0,dw,double_dw}] [--result_file RESULT_FILE]
[--start_averaging START_AVERAGING] [--n_mean N_MEAN]
[--n_profile N_PROFILE] [--solver {opencl,mpi,numpy,jax}]
[--precision {single,double}] [--blocking] [--seed SEED]
[--device {cpu,gpu,auto}] [--profiling]
[--verbosity {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [--np NP]
[--geometry {finite_box,periodic_wire,periodic_layer,periodic_box}]
Define a CLI for running LLG3D simulations.
options:
-h, --help show this help message and exit
-v, --version Affiche le numéro de version de llg3d
--element {Cobalt,Iron,Nickel}
Chemical element of the sample (default: Cobalt)
--N N Number of time iterations (default: 5000)
--dt DT Time step (default: 1e-14)
--Jx JX Number of points in x (default: 300)
--Jy JY Number of points in y (default: 21)
--Jz JZ Number of points in z (default: 21)
--dx DX Step in x (default: 1e-09)
--T T Temperature (K) (default: 0.0)
--H_ext H_EXT External field (A/m) (default: 0.0)
--init_type {0,dw,double_dw}
Type of initialization ('0' for uniform, 'dw' for
domain wall) (default: 0)
--result_file RESULT_FILE
Name of the npz result file (default: run.npz)
--start_averaging START_AVERAGING
Start index of time average (default: 4000)
--n_mean N_MEAN Spatial average frequency (number of iterations)
(default: 1)
--n_profile N_PROFILE
x-profile save frequency (number of iterations)
(default: 0)
--solver {opencl,mpi,numpy,jax}
Solver to use for the simulation (default: numpy)
--precision {single,double}
Precision of the floating point (single or double)
(default: double)
--blocking Use blocking communications (MPI solver only)
(default: False)
--seed SEED Random seed for temperature fluctuations (default:
12345)
--device {cpu,gpu,auto}
Device to use by the OpenCL solver (default: auto)
--profiling Enable profiling output (internal profiler) (default:
False)
--verbosity {DEBUG,INFO,WARNING,ERROR,CRITICAL}
Logging verbosity level (default: INFO)
--np NP Number of processes (for MPI solver) (default: 1)
--geometry {finite_box,periodic_wire,periodic_layer,periodic_box}
Sample geometry: 'finite_box' (Neumann x/y/z),
'periodic_wire' (PBC x, Neumann y/z), 'periodic_layer'
(PBC x/y, Neumann z), 'periodic_box' (PBC x/y/z)
(default: periodic_wire)
Simple NumPy execution¶
$ llg3d --N 100
---
x y z
J 300 21 21
L 2.99000000e-07 2.00000000e-08 2.00000000e-08
d 1.00000000e-09 1.00000000e-09 1.00000000e-09
---
dV = 1.00000000e-27
V = 1.19600000e-22
ntot = 132300
ncell = 119600
---
element : Cobalt
N = 100
dt = 1e-14
Jx = 300
Jy = 21
Jz = 21
dx = 1e-09
T = 0.0
H_ext = 0.0
init_type : 0
result_file : run.npz
start_averaging = 4000
n_mean = 1
n_profile = 0
solver : numpy
precision : double
blocking = False
seed = 12345
device : auto
profiling = False
verbosity : INFO
np = 1
geometry : periodic_wire
0%| | 0/100 [00:00<?, ?it/s]
2%|▏ | 2/100 [00:00<00:05, 19.49it/s]
5%|▌ | 5/100 [00:00<00:04, 22.18it/s]
8%|▊ | 8/100 [00:00<00:03, 23.47it/s]
11%|█ | 11/100 [00:00<00:03, 24.02it/s]
14%|█▍ | 14/100 [00:00<00:03, 24.38it/s]
17%|█▋ | 17/100 [00:00<00:03, 24.51it/s]
20%|██ | 20/100 [00:00<00:03, 24.66it/s]
23%|██▎ | 23/100 [00:00<00:03, 24.72it/s]
26%|██▌ | 26/100 [00:01<00:02, 24.79it/s]
29%|██▉ | 29/100 [00:01<00:02, 24.82it/s]
32%|███▏ | 32/100 [00:01<00:02, 24.83it/s]
35%|███▌ | 35/100 [00:01<00:02, 24.87it/s]
38%|███▊ | 38/100 [00:01<00:02, 24.48it/s]
41%|████ | 41/100 [00:01<00:02, 24.62it/s]
44%|████▍ | 44/100 [00:01<00:02, 24.67it/s]
47%|████▋ | 47/100 [00:01<00:02, 24.67it/s]
50%|█████ | 50/100 [00:02<00:02, 24.76it/s]
53%|█████▎ | 53/100 [00:02<00:01, 24.73it/s]
56%|█████▌ | 56/100 [00:02<00:01, 24.79it/s]
59%|█████▉ | 59/100 [00:02<00:01, 24.83it/s]
62%|██████▏ | 62/100 [00:02<00:01, 24.88it/s]
65%|██████▌ | 65/100 [00:02<00:01, 24.93it/s]
68%|██████▊ | 68/100 [00:02<00:01, 24.89it/s]
71%|███████ | 71/100 [00:02<00:01, 24.87it/s]
74%|███████▍ | 74/100 [00:03<00:01, 24.90it/s]
77%|███████▋ | 77/100 [00:03<00:00, 24.83it/s]
80%|████████ | 80/100 [00:03<00:00, 24.86it/s]
83%|████████▎ | 83/100 [00:03<00:00, 24.92it/s]
86%|████████▌ | 86/100 [00:03<00:00, 24.87it/s]
89%|████████▉ | 89/100 [00:03<00:00, 24.90it/s]
92%|█████████▏| 92/100 [00:03<00:00, 24.86it/s]
95%|█████████▌| 95/100 [00:03<00:00, 24.85it/s]
98%|█████████▊| 98/100 [00:03<00:00, 24.88it/s]
100%|██████████| 100/100 [00:04<00:00, 24.67it/s]N iterations = 100
total_time [s] = 4.109
time/ite [s/ite] = 4.109e-02
throughput [point/s] = 3.220e+06
CFL = 0.075
Saving run.npz
Output file¶
The execution produces the archive file run.npz which contains the parameters and the result data:
$ unzip -l run.npz
Archive: run.npz
Length Date Time Name
--------- ---------- ----- ----
152 1980-01-01 00:00 params/element.npy
136 1980-01-01 00:00 params/N.npy
136 1980-01-01 00:00 params/dt.npy
136 1980-01-01 00:00 params/Jx.npy
136 1980-01-01 00:00 params/Jy.npy
136 1980-01-01 00:00 params/Jz.npy
136 1980-01-01 00:00 params/dx.npy
136 1980-01-01 00:00 params/T.npy
136 1980-01-01 00:00 params/H_ext.npy
132 1980-01-01 00:00 params/init_type.npy
156 1980-01-01 00:00 params/result_file.npy
136 1980-01-01 00:00 params/start_averaging.npy
136 1980-01-01 00:00 params/n_mean.npy
136 1980-01-01 00:00 params/n_profile.npy
148 1980-01-01 00:00 params/solver.npy
152 1980-01-01 00:00 params/precision.npy
129 1980-01-01 00:00 params/blocking.npy
136 1980-01-01 00:00 params/seed.npy
144 1980-01-01 00:00 params/device.npy
129 1980-01-01 00:00 params/profiling.npy
144 1980-01-01 00:00 params/verbosity.npy
136 1980-01-01 00:00 params/np.npy
180 1980-01-01 00:00 params/geometry.npy
136 1980-01-01 00:00 results/metrics/total_time.npy
136 1980-01-01 00:00 results/metrics/time_per_ite.npy
136 1980-01-01 00:00 results/metrics/throughput.npy
136 1980-01-01 00:00 results/metrics/CFL.npy
1744 1980-01-01 00:00 results/records/xyz_average.npy
--------- -------
5522 28 files
To post-process this result file, see here.