Skip to content

Commit 1741a21

Browse files
Merge pull request ComputationalRadiationPhysics#2543 from ax3l/topic-inputDevices
Refactor .cfg files: devices
2 parents ff87a58 + bd25ef9 commit 1741a21

File tree

25 files changed

+293
-293
lines changed

25 files changed

+293
-293
lines changed

docs/TBG_macros.cfg

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,19 @@
3939
# Batch system walltime
4040
TBG_wallTime="1:00:00"
4141

42-
# Number of GPUs in each dimension (x,y,z) to use for the simulation
43-
TBG_gpu_x=1
44-
TBG_gpu_y=2
45-
TBG_gpu_z=1
42+
# Number of devices in each dimension (x,y,z) to use for the simulation
43+
TBG_devices_x=1
44+
TBG_devices_y=2
45+
TBG_devices_z=1
4646

47-
# Size of the simulation grid in cells as "-g X Y Z"
47+
# Size of the simulation grid in cells as "X Y Z"
4848
# note: the number of cells needs to be an exact multiple of a supercell
49-
# and has to be at least 3 supercells per GPU,
49+
# and has to be at least 3 supercells per device,
5050
# the size of a supercell (in cells) is defined in `memory.param`
51-
TBG_gridSize="-g 128 256 128"
51+
TBG_gridSize="128 256 128"
5252

53-
# Number of simulation steps/iterations as "-s N"
54-
TBG_steps="-s 100"
53+
# Number of simulation steps/iterations as "N"
54+
TBG_steps="100"
5555

5656

5757
################################################################################
@@ -76,8 +76,8 @@ TBG_dstPath
7676
TBG_version="--versionOnce"
7777

7878

79-
# Regex to describe the static distribution of the cells for each GPU
80-
# default: equal distribution over all GPUs
79+
# Regex to describe the static distribution of the cells for each device
80+
# default: equal distribution over all devices
8181
# example for -d 2 4 1 -g 128 192 12
8282
TBG_gridDist="--gridDist '64{2}' '64,32{2},64'"
8383

@@ -260,16 +260,16 @@ TBG_resourceLog="--resourceLog.period 1 --resourceLog.stream stdout
260260
## variables. These should not be modified except when you know what you are doing!
261261
################################################################################
262262

263-
# Number of compute devices in each dimension as "-d X Y Z"
264-
TBG_devices="-d !TBG_gpu_x !TBG_gpu_y !TBG_gpu_z"
263+
# Number of compute devices in each dimension as "X Y Z"
264+
TBG_deviceDist="!TBG_devices_x !TBG_devices_y !TBG_devices_z"
265265

266266

267267
# Combines all declared variables. These are passed to PIConGPU as command line flags.
268268
# The program output (stdout) is stored in a file called output.stdout.
269-
TBG_programParams="!TBG_devices \
270-
!TBG_gridSize \
271-
!TBG_steps \
269+
TBG_programParams="-d !TBG_deviceDist \
270+
-g !TBG_gridSize \
271+
-s !TBG_steps \
272272
!TBG_plugins"
273273

274-
# Total number of GPUs
275-
TBG_tasks="$(( TBG_gpu_x * TBG_gpu_y * TBG_gpu_z ))"
274+
# Total number of devices
275+
TBG_tasks="$(( TBG_devices_x * TBG_devices_y * TBG_devices_z ))"

share/picongpu/dockerfiles/ubuntu-1604/start_lwfa.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ sleep 5
1616
cd /opt/picInputs/lwfa
1717
tbg \
1818
-s "bash -l" \
19-
-c etc/picongpu/0001gpus_isaac.cfg \
19+
-c etc/picongpu/1_isaac.cfg \
2020
-t etc/picongpu/bash/mpirun.tpl \
2121
/tmp/lwfa_001
2222

share/picongpu/examples/Bremsstrahlung/etc/picongpu/0008gpus.cfg renamed to share/picongpu/examples/Bremsstrahlung/etc/picongpu/8.cfg

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@
3333

3434
TBG_wallTime="8:00:00"
3535

36-
TBG_gpu_x=8
37-
TBG_gpu_y=1
38-
TBG_gpu_z=1
36+
TBG_devices_x=8
37+
TBG_devices_y=1
38+
TBG_devices_z=1
3939

40-
TBG_gridSize="-g 2048 2048 1"
41-
TBG_steps="-s 5000"
40+
TBG_gridSize="2048 2048 1"
41+
TBG_steps="5000"
4242

4343
TBG_periodic="--periodic 0 0 0"
4444

@@ -63,15 +63,15 @@ TBG_plugins="--hdf5.period 1000 --hdf5.file simData \
6363
## Section: Program Parameters ##
6464
#################################
6565

66-
TBG_devices="-d !TBG_gpu_x !TBG_gpu_y !TBG_gpu_z"
66+
TBG_deviceDist="!TBG_devices_x !TBG_devices_y !TBG_devices_z"
6767

68-
TBG_programParams="!TBG_devices \
69-
!TBG_gridSize \
70-
!TBG_steps \
71-
!TBG_plugins \
68+
TBG_programParams="-d !TBG_deviceDist \
69+
-g !TBG_gridSize \
70+
-s !TBG_steps \
71+
!TBG_plugins \
7272
--versionOnce"
7373

74-
# TOTAL number of GPUs
75-
TBG_tasks="$(( TBG_gpu_x * TBG_gpu_y * TBG_gpu_z ))"
74+
# TOTAL number of devices
75+
TBG_tasks="$(( TBG_devices_x * TBG_devices_y * TBG_devices_z ))"
7676

7777
"$TBG_cfgPath"/submitAction.sh

share/picongpu/examples/Bunch/etc/picongpu/bunch_0032.cfg renamed to share/picongpu/examples/Bunch/etc/picongpu/32.cfg

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@
3333

3434
TBG_wallTime="72:00:00"
3535

36-
TBG_gpu_x=2
37-
TBG_gpu_y=8
38-
TBG_gpu_z=2
36+
TBG_devices_x=2
37+
TBG_devices_y=8
38+
TBG_devices_z=2
3939

40-
TBG_gridSize="-g 128 3072 128"
41-
TBG_steps="-s 7500"
40+
TBG_gridSize="128 3072 128"
41+
TBG_steps="7500"
4242

4343
TBG_periodic="--periodic 1 0 1"
4444

@@ -64,16 +64,16 @@ TBG_plugins="!TBG_eBin \
6464
## Section: Program Parameters ##
6565
#################################
6666

67-
TBG_devices="-d !TBG_gpu_x !TBG_gpu_y !TBG_gpu_z"
67+
TBG_deviceDist="!TBG_devices_x !TBG_devices_y !TBG_devices_z"
6868

69-
TBG_programParams="!TBG_devices \
70-
!TBG_gridSize \
71-
!TBG_steps \
72-
!TBG_periodic \
73-
!TBG_plugins \
69+
TBG_programParams="-d !TBG_deviceDist \
70+
-g !TBG_gridSize \
71+
-s !TBG_steps \
72+
!TBG_periodic \
73+
!TBG_plugins \
7474
--versionOnce"
7575

76-
# TOTAL number of GPUs
77-
TBG_tasks="$(( TBG_gpu_x * TBG_gpu_y * TBG_gpu_z ))"
76+
# TOTAL number of devices
77+
TBG_tasks="$(( TBG_devices_x * TBG_devices_y * TBG_devices_z ))"
7878

7979
"$TBG_cfgPath"/submitAction.sh

share/picongpu/examples/Empty/etc/picongpu/1gpu.cfg renamed to share/picongpu/examples/Empty/etc/picongpu/1.cfg

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232

3333
TBG_wallTime="2:00:00"
3434

35-
TBG_gpu_x=1
36-
TBG_gpu_y=1
37-
TBG_gpu_z=1
35+
TBG_devices_x=1
36+
TBG_devices_y=1
37+
TBG_devices_z=1
3838

39-
TBG_gridSize="-g 128 256 128"
40-
TBG_steps="-s 1000"
39+
TBG_gridSize="128 256 128"
40+
TBG_steps="1000"
4141

4242
#################################
4343
## Section: Optional Variables ##
@@ -54,15 +54,15 @@ TBG_plugins="!TBG_e_histogram"
5454
## Section: Program Parameters ##
5555
#################################
5656

57-
TBG_devices="-d !TBG_gpu_x !TBG_gpu_y !TBG_gpu_z"
57+
TBG_deviceDist="!TBG_devices_x !TBG_devices_y !TBG_devices_z"
5858

59-
TBG_programParams="!TBG_devices \
60-
!TBG_gridSize \
61-
!TBG_steps \
62-
!TBG_plugins \
59+
TBG_programParams="-d !TBG_deviceDist \
60+
-g !TBG_gridSize \
61+
-s !TBG_steps \
62+
!TBG_plugins \
6363
--versionOnce"
6464

65-
# TOTAL number of GPUs
66-
TBG_tasks="$(( TBG_gpu_x * TBG_gpu_y * TBG_gpu_z ))"
65+
# TOTAL number of devices
66+
TBG_tasks="$(( TBG_devices_x * TBG_devices_y * TBG_devices_z ))"
6767

6868
"$TBG_cfgPath"/submitAction.sh

share/picongpu/examples/FoilLCT/etc/picongpu/0004gpus.cfg renamed to share/picongpu/examples/FoilLCT/etc/picongpu/4.cfg

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232

3333
TBG_wallTime="2:00:00"
3434

35-
TBG_gpu_x=2
36-
TBG_gpu_y=2
37-
TBG_gpu_z=1
35+
TBG_devices_x=2
36+
TBG_devices_y=2
37+
TBG_devices_z=1
3838

39-
TBG_gridSize="-g 256 1280"
40-
TBG_steps="-s 5000"
39+
TBG_gridSize="256 1280"
40+
TBG_steps="5000"
4141

4242
TBG_periodic="--periodic 1 0"
4343

@@ -82,16 +82,16 @@ TBG_plugins="!TBG_e_histogram !TBG_H_histogram !TBG_C_histogram !TBG_N_histogram
8282
## Section: Program Parameters ##
8383
#################################
8484

85-
TBG_devices="-d !TBG_gpu_x !TBG_gpu_y !TBG_gpu_z"
85+
TBG_deviceDist="!TBG_devices_x !TBG_devices_y !TBG_devices_z"
8686

87-
TBG_programParams="!TBG_devices \
88-
!TBG_gridSize \
89-
!TBG_steps \
90-
!TBG_periodic \
91-
!TBG_plugins \
87+
TBG_programParams="-d !TBG_deviceDist \
88+
-g !TBG_gridSize \
89+
-s !TBG_steps \
90+
!TBG_periodic \
91+
!TBG_plugins \
9292
--versionOnce"
9393

94-
# TOTAL number of GPUs
95-
TBG_tasks="$(( TBG_gpu_x * TBG_gpu_y * TBG_gpu_z ))"
94+
# TOTAL number of devices
95+
TBG_tasks="$(( TBG_devices_x * TBG_devices_y * TBG_devices_z ))"
9696

9797
"$TBG_cfgPath"/submitAction.sh

share/picongpu/examples/KelvinHelmholtz/etc/picongpu/0016gpus.cfg renamed to share/picongpu/examples/KelvinHelmholtz/etc/picongpu/16.cfg

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232

3333
TBG_wallTime="23:53:00"
3434

35-
TBG_gpu_x=2
36-
TBG_gpu_y=8
37-
TBG_gpu_z=1
35+
TBG_devices_x=2
36+
TBG_devices_y=8
37+
TBG_devices_z=1
3838

39-
TBG_gridSize="-g 192 512 12"
40-
TBG_steps="-s 2000"
39+
TBG_gridSize="192 512 12"
40+
TBG_steps="2000"
4141

4242
TBG_periodic="--periodic 1 1 1"
4343

@@ -75,16 +75,16 @@ TBG_plugins="!TBG_ipngYZ \
7575
## Section: Program Parameters ##
7676
#################################
7777

78-
TBG_devices="-d !TBG_gpu_x !TBG_gpu_y !TBG_gpu_z"
78+
TBG_deviceDist="!TBG_devices_x !TBG_devices_y !TBG_devices_z"
7979

80-
TBG_programParams="!TBG_devices \
81-
!TBG_gridSize \
82-
!TBG_steps \
83-
!TBG_periodic \
84-
!TBG_plugins \
80+
TBG_programParams="-d !TBG_deviceDist \
81+
-g !TBG_gridSize \
82+
-s !TBG_steps \
83+
!TBG_periodic \
84+
!TBG_plugins \
8585
--versionOnce"
8686

87-
# TOTAL number of GPUs
88-
TBG_tasks="$(( TBG_gpu_x * TBG_gpu_y * TBG_gpu_z ))"
87+
# TOTAL number of devices
88+
TBG_tasks="$(( TBG_devices_x * TBG_devices_y * TBG_devices_z ))"
8989

9090
"$TBG_cfgPath"/submitAction.sh

share/picongpu/examples/KelvinHelmholtz/etc/picongpu/0004gpus.cfg renamed to share/picongpu/examples/KelvinHelmholtz/etc/picongpu/4.cfg

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232

3333
TBG_wallTime="23:53:00"
3434

35-
TBG_gpu_x=1
36-
TBG_gpu_y=4
37-
TBG_gpu_z=1
35+
TBG_devices_x=1
36+
TBG_devices_y=4
37+
TBG_devices_z=1
3838

39-
TBG_gridSize="-g 192 512 12"
40-
TBG_steps="-s 2000"
39+
TBG_gridSize="192 512 12"
40+
TBG_steps="2000"
4141

4242
TBG_periodic="--periodic 1 1 1"
4343

@@ -69,16 +69,16 @@ TBG_plugins="!TBG_ipngYX \
6969
## Section: Program Parameters ##
7070
#################################
7171

72-
TBG_devices="-d !TBG_gpu_x !TBG_gpu_y !TBG_gpu_z"
72+
TBG_deviceDist="!TBG_devices_x !TBG_devices_y !TBG_devices_z"
7373

74-
TBG_programParams="!TBG_devices \
75-
!TBG_gridSize \
76-
!TBG_steps \
77-
!TBG_periodic \
78-
!TBG_plugins \
74+
TBG_programParams="-d !TBG_deviceDist \
75+
-g !TBG_gridSize \
76+
-s !TBG_steps \
77+
!TBG_periodic \
78+
!TBG_plugins \
7979
--versionOnce"
8080

81-
# TOTAL number of GPUs
82-
TBG_tasks="$(( TBG_gpu_x * TBG_gpu_y * TBG_gpu_z ))"
81+
# TOTAL number of devices
82+
TBG_tasks="$(( TBG_devices_x * TBG_devices_y * TBG_devices_z ))"
8383

8484
"$TBG_cfgPath"/submitAction.sh

share/picongpu/examples/LaserWakefield/etc/picongpu/0001gpus.cfg renamed to share/picongpu/examples/LaserWakefield/etc/picongpu/1.cfg

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232

3333
TBG_wallTime="1:00:00"
3434

35-
TBG_gpu_x=1
36-
TBG_gpu_y=1
37-
TBG_gpu_z=1
35+
TBG_devices_x=1
36+
TBG_devices_y=1
37+
TBG_devices_z=1
3838

39-
TBG_gridSize="-g 128 256 128"
40-
TBG_steps="-s 1024"
39+
TBG_gridSize="128 256 128"
40+
TBG_steps="1024"
4141

4242
#################################
4343
## Section: Optional Variables ##
@@ -54,15 +54,15 @@ TBG_plugins="!TBG_pngYX \
5454
## Section: Program Parameters ##
5555
#################################
5656

57-
TBG_devices="-d !TBG_gpu_x !TBG_gpu_y !TBG_gpu_z"
57+
TBG_deviceDist="!TBG_devices_x !TBG_devices_y !TBG_devices_z"
5858

59-
TBG_programParams="!TBG_devices \
60-
!TBG_gridSize \
61-
!TBG_steps \
62-
!TBG_plugins \
59+
TBG_programParams="-d !TBG_deviceDist \
60+
-g !TBG_gridSize \
61+
-s !TBG_steps \
62+
!TBG_plugins \
6363
--versionOnce"
6464

65-
# TOTAL number of GPUs
66-
TBG_tasks="$(( TBG_gpu_x * TBG_gpu_y * TBG_gpu_z ))"
65+
# TOTAL number of devices
66+
TBG_tasks="$(( TBG_devices_x * TBG_devices_y * TBG_devices_z ))"
6767

6868
"$TBG_cfgPath"/submitAction.sh

0 commit comments

Comments
 (0)