Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lastephey/hackathon test #43

Merged
merged 2 commits into from
May 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 34 additions & 8 deletions DockerfileREADME.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,52 @@ The image is called `registry.nersc.gov/das/delta:3.0`.

As a backup, there is also an image that has delta installed inside: `registry.nersc.gov/das/delta-inside:1.0`


### Haswell

```
salloc -N 4 -C haswell -q interactive --image=registry.nersc.gov/das/delta:3.0
```

cd to wherever you have installed delta. For me it's

```
cd /global/cscratch1/sd/stephey/delta/delta
```

And then launch delta:


```
OMP_NUM_THREADS=16 srun -n 16 -c 16 --cpu-bind=cores shifter python3 -m mpi4py.futures processor.py --config configs/hackathon_test.json --transport transport_tx --num_ranks_preprocess=4 --num_ranks_analysis=12 --num_queue_threads=4 --run_id=test_25259_GT
```


### corigpu

On corigpu, request the image during your interactive job:

```
module load cgpu
salloc -N 1 -C gpu -G 1 -t 120 -A m499 --image=registry.nersc.gov/das/delta:3.0
```

On Cori, `module unload cgpu` and adjust your salloc/sbatch accordingly.
```
OMP_NUM_THREADS=16 srun -n 16 -c 1 --cpu-bind=cores shifter python3 -m mpi4py.futures processor.py --config configs/hackathon_test.json --transport transport_tx --num_ranks_preprocess=2 --num_ranks_analysis=2 --num_queue_threads=2 --run_id=test_25259_GT


To open a shell inside the container and run tests/scripts inside:
### Debugging inside the container

```
shifter --volume="/global/cscratch1/sd/stephey/delta:/opt/delta" /bin/bash
shifter /bin/bash
```

The `--volume` command will bind-mount your delta installation into
`/opt/delta` inside the image. Note that the bind location `/opt/delta` must
exist inside the image.
### Known issues

To use shifter to run your tests/scripts:
Pytest has trouble running in the bind-mounted configuration for reasons I
don't understand. To run pytest you'll have to run in the container:

shifter --volume="/global/cscratch1/sd/stephey/delta:/opt/delta" ls /opt/delta/tests
```
shifter --volume="/global/cscratch1/sd/stephey/delta/delta:/opt/delta" /bin/bash
pytest /opt/delta/tests
```
2 changes: 1 addition & 1 deletion delta/analysis/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from analysis.task_spectral_cy import task_coherence_cy, task_crosspower_cy, task_crossphase_cy
try:
from analysis.task_spectral_cu import task_coherence_cu, task_crosscorr_cu, task_crossphase_cu, task_crosspower_cu
except ModuleNotFoundError:
except:
None

from analysis.task_spectral_numba import task_spectral_GAP
Expand Down
78 changes: 78 additions & 0 deletions delta/configs/hackathon_test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"diagnostic":
{
"name": "kstarecei",
"shotnr": 25259,
"dev": "GT",
"datasource":
{
"source_file": "/global/cscratch1/sd/rkube/KSTAR/kstar_streaming/025259/ECEI.025259.GT.h5",
"chunk_size": 10000,
"num_chunks": 500,
"channel_range": ["0101-2408"],
"datatype": "float",
"t_norm": [-0.099, -0.089]
}
},
"transport_rx":
{
"engine": "BP4",
"params":
{
"IPAddress": "203.230.120.125",
"Timeout": "120",
"Port": "50001",
"TransportMode": "fast"
}
},
"transport_tx":
{
"engine": "BP4",
"params":
{
"IPAddress": "128.55.205.18",
"Timeout": "120",
"Port": "50055",
"TransportMode": "fast"
}
},
"storage":
{
"backend": "null"
},
"preprocess": {
"bandpass_fir": {"N": 5, "Wn": [0.14, 0.2], "btype": "bandpass", "output": "sos"},
"no_wavelet": {"wavelet": "db5", "method": "BayesShrink", "wavelet_levels": 5, "rescale_sigma": false},
"no_plot": {"time_range": [2.7175, 2.7178], "plot_dir": "/global/homes/r/rkube/delta_runs/plots/"},
"stft": {"nfft": 512, "fs": 500000, "window": "hann", "overlap": 0.5, "noverlap": 256, "detrend": "constant", "full": true}
},
"analysis_gpu": {
"spectral_GAP": {
"channel_chunk_size": 32768,
"ref_channels": [1, 1, 24, 8],
"cmp_channels": [1, 1, 24, 8]
}
},
"analysis": {
"crosscorr": {
"channel_chunk_size": 32768,
"ref_channels": [1, 1, 24, 8],
"cmp_channels": [1, 1, 24, 8]
},
"crosspower_cy": {
"channel_chunk_size": 32768,
"ref_channels": [1, 1, 24, 8],
"cmp_channels": [1, 1, 24, 8]
},
"crossphase_cy": {
"channel_chunk_size": 32768,
"ref_channels": [1, 1, 24, 8],
"cmp_channels": [1, 1, 24, 8]
},
"coherence_cy": {
"channel_chunk_size": 32768,
"ref_channels": [1, 1, 24, 8],
"cmp_channels": [1, 1, 24, 8]
}
}
}