Our current implementation of Maxwellian sampling is wrong. This PR fixes the sampling and improve the shock demo.
The new sampling is based on the Box-Muller method. We remove the option of nparticles inputs since it's less frequently used in practice, although it's supposed to be faster.
Since we are sampling in each 1D direction separately, we should follow the 1D thermal speed equation.
Benchmark result
# Judge result
# Benchmark Report for */home/runner/work/TestParticle.jl/TestParticle.jl*
## Job Properties
* Time of benchmarks:
- Target: 5 Mar 2024 - 18:08
- Baseline: 5 Mar 2024 - 18:10
* Package commits:
- Target: fa17c5
- Baseline: eb4601
* Julia commits:
- Target: bd47ec
- Baseline: bd47ec
* Julia command flags:
- Target: None
- Baseline: None
* Environment variables:
- Target: None
- Baseline: None
## Results
A ratio greater than `1.0` denotes a possible regression (marked with :x:), while a ratio less
than `1.0` denotes a possible improvement (marked with :white_check_mark:). Only significant results - results
that indicate possible regressions or improvements - are shown below (thus, an empty table means that all
benchmark results remained invariant between builds).
| ID | time ratio | memory ratio |
|-----------------------------------------------------|---------------|--------------|
| `["trace", "analytic field", "out of place"]` | 1.08 (5%) :x: | 1.00 (1%) |
## Benchmark Group List
Here's a list of all the benchmark groups executed by this job:
- `["trace", "analytic field"]`
- `["trace", "numerical field"]`
- `["trace", "time-dependent field"]`
## Julia versioninfo
### Target
```
Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
Ubuntu 22.04.4 LTS
uname: Linux 6.5.0-1015-azure #15~22.04.1-Ubuntu SMP Tue Feb 13 01:15:12 UTC 2024 x86_64 x86_64
CPU: AMD EPYC 7763 64-Core Processor:
speed user nice sys idle irq
#1 3108 MHz 1791 s 0 s 164 s 2940 s 0 s
#2 2552 MHz 2366 s 0 s 175 s 2348 s 0 s
#3 3244 MHz 2007 s 0 s 165 s 2734 s 0 s
#4 2445 MHz 2074 s 0 s 174 s 2652 s 0 s
Memory: 15.606491088867188 GB (13990.66015625 MB free)
Uptime: 492.94 sec
Load Avg: 1.23 1.51 0.84
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)
```
### Baseline
```
Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
Ubuntu 22.04.4 LTS
uname: Linux 6.5.0-1015-azure #15~22.04.1-Ubuntu SMP Tue Feb 13 01:15:12 UTC 2024 x86_64 x86_64
CPU: AMD EPYC 7763 64-Core Processor:
speed user nice sys idle irq
#1 2445 MHz 2025 s 0 s 176 s 3654 s 0 s
#2 2445 MHz 2872 s 0 s 190 s 2789 s 0 s
#3 3243 MHz 2112 s 0 s 178 s 3577 s 0 s
#4 3232 MHz 2207 s 0 s 191 s 3461 s 0 s
Memory: 15.606491088867188 GB (13710.43359375 MB free)
Uptime: 589.25 sec
Load Avg: 1.1 1.4 0.87
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)
```
---
# Target result
# Benchmark Report for */home/runner/work/TestParticle.jl/TestParticle.jl*
## Job Properties
* Time of benchmark: 5 Mar 2024 - 18:8
* Package commit: fa17c5
* Julia commit: bd47ec
* Julia command flags: None
* Environment variables: None
## Results
Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the `ID` column have the structure `[parent_group, child_group, ..., key]`, and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.
| ID | time | GC time | memory | allocations |
|-----------------------------------------------------|---------------:|--------:|---------------:|------------:|
| `["trace", "analytic field", "in place"]` | 6.993 μs (5%) | | 10.58 KiB (1%) | 114 |
| `["trace", "analytic field", "out of place"]` | 4.793 μs (5%) | | 8.73 KiB (1%) | 88 |
| `["trace", "numerical field", "Boris ensemble"]` | 3.622 μs (5%) | | 3.28 KiB (1%) | 19 |
| `["trace", "numerical field", "Boris"]` | 1.877 μs (5%) | | 1.88 KiB (1%) | 15 |
| `["trace", "numerical field", "in place"]` | 20.278 μs (5%) | | 12.83 KiB (1%) | 114 |
| `["trace", "numerical field", "out of place"]` | 14.307 μs (5%) | | 9.94 KiB (1%) | 88 |
| `["trace", "time-dependent field", "in place"]` | 8.576 μs (5%) | | 11.33 KiB (1%) | 123 |
| `["trace", "time-dependent field", "out of place"]` | 5.975 μs (5%) | | 9.52 KiB (1%) | 97 |
## Benchmark Group List
Here's a list of all the benchmark groups executed by this job:
- `["trace", "analytic field"]`
- `["trace", "numerical field"]`
- `["trace", "time-dependent field"]`
## Julia versioninfo
```
Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
Ubuntu 22.04.4 LTS
uname: Linux 6.5.0-1015-azure #15~22.04.1-Ubuntu SMP Tue Feb 13 01:15:12 UTC 2024 x86_64 x86_64
CPU: AMD EPYC 7763 64-Core Processor:
speed user nice sys idle irq
#1 3108 MHz 1791 s 0 s 164 s 2940 s 0 s
#2 2552 MHz 2366 s 0 s 175 s 2348 s 0 s
#3 3244 MHz 2007 s 0 s 165 s 2734 s 0 s
#4 2445 MHz 2074 s 0 s 174 s 2652 s 0 s
Memory: 15.606491088867188 GB (13990.66015625 MB free)
Uptime: 492.94 sec
Load Avg: 1.23 1.51 0.84
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)
```
---
# Baseline result
# Benchmark Report for */home/runner/work/TestParticle.jl/TestParticle.jl*
## Job Properties
* Time of benchmark: 5 Mar 2024 - 18:10
* Package commit: eb4601
* Julia commit: bd47ec
* Julia command flags: None
* Environment variables: None
## Results
Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the `ID` column have the structure `[parent_group, child_group, ..., key]`, and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.
| ID | time | GC time | memory | allocations |
|-----------------------------------------------------|---------------:|--------:|---------------:|------------:|
| `["trace", "analytic field", "in place"]` | 7.011 μs (5%) | | 10.58 KiB (1%) | 114 |
| `["trace", "analytic field", "out of place"]` | 4.440 μs (5%) | | 8.73 KiB (1%) | 88 |
| `["trace", "numerical field", "Boris ensemble"]` | 3.602 μs (5%) | | 3.28 KiB (1%) | 19 |
| `["trace", "numerical field", "Boris"]` | 1.860 μs (5%) | | 1.88 KiB (1%) | 15 |
| `["trace", "numerical field", "in place"]` | 20.277 μs (5%) | | 12.83 KiB (1%) | 114 |
| `["trace", "numerical field", "out of place"]` | 14.387 μs (5%) | | 9.94 KiB (1%) | 88 |
| `["trace", "time-dependent field", "in place"]` | 8.525 μs (5%) | | 11.33 KiB (1%) | 123 |
| `["trace", "time-dependent field", "out of place"]` | 6.073 μs (5%) | | 9.52 KiB (1%) | 97 |
## Benchmark Group List
Here's a list of all the benchmark groups executed by this job:
- `["trace", "analytic field"]`
- `["trace", "numerical field"]`
- `["trace", "time-dependent field"]`
## Julia versioninfo
```
Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
Ubuntu 22.04.4 LTS
uname: Linux 6.5.0-1015-azure #15~22.04.1-Ubuntu SMP Tue Feb 13 01:15:12 UTC 2024 x86_64 x86_64
CPU: AMD EPYC 7763 64-Core Processor:
speed user nice sys idle irq
#1 2445 MHz 2025 s 0 s 176 s 3654 s 0 s
#2 2445 MHz 2872 s 0 s 190 s 2789 s 0 s
#3 3243 MHz 2112 s 0 s 178 s 3577 s 0 s
#4 3232 MHz 2207 s 0 s 191 s 3461 s 0 s
Memory: 15.606491088867188 GB (13710.43359375 MB free)
Uptime: 589.25 sec
Load Avg: 1.1 1.4 0.87
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)
```
---
# Runtime information
| Runtime Info | |
|:--|:--|
| BLAS #threads | 2 |
| `BLAS.vendor()` | `lbt` |
| `Sys.CPU_THREADS` | 4 |
`lscpu` output:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 48 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Vendor ID: AuthenticAMD
Model name: AMD EPYC 7763 64-Core Processor
CPU family: 25
Model: 1
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
Stepping: 1
BogoMIPS: 4890.86
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext invpcid_single vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr rdpru arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload umip vaes vpclmulqdq rdpid fsrm
Virtualization: AMD-V
Hypervisor vendor: Microsoft
Virtualization type: full
L1d cache: 64 KiB (2 instances)
L1i cache: 64 KiB (2 instances)
L2 cache: 1 MiB (2 instances)
L3 cache: 32 MiB (1 instance)
NUMA node(s): 1
NUMA node0 CPU(s): 0-3
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Mitigation; safe RET, no microcode
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Retpolines, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
| Cpu Property | Value |
|:------------------ |:---------------------------------------------------------- |
| Brand | AMD EPYC 7763 64-Core Processor |
| Vendor | :AMD |
| Architecture | :Unknown |
| Model | Family: 0xaf, Model: 0x01, Stepping: 0x01, Type: 0x00 |
| Cores | 16 physical cores, 16 logical cores (on executing CPU) |
| | No Hyperthreading hardware capability detected |
| Clock Frequencies | Not supported by CPU |
| Data Cache | Level 1:3 : (32, 512, 32768) kbytes |
| | 64 byte cache line size |
| Address Size | 48 bits virtual, 48 bits physical |
| SIMD | 256 bit = 32 byte max. SIMD vector size |
| Time Stamp Counter | TSC is accessible via `rdtsc` |
| | TSC runs at constant rate (invariant from clock frequency) |
| Perf. Monitoring | Performance Monitoring Counters (PMC) are not supported |
| Hypervisor | Yes, Microsoft |
Our current implementation of Maxwellian sampling is wrong. This PR fixes the sampling and improve the shock demo. The new sampling is based on the Box-Muller method. We remove the option of
nparticles
inputs since it's less frequently used in practice, although it's supposed to be faster.Since we are sampling in each 1D direction separately, we should follow the 1D thermal speed equation.
vth
for thermal speed instead ofuth
.150