Skip to content

Commit 89fb37f

Browse files
committed
(re)move simulation_defines: pic-* tools
Update path to param files and warn if old structure is found.
1 parent 648db54 commit 89fb37f

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

pic-configure

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ if [ -z "$install_path" ] ; then
147147
fi
148148
extension_param="-DPIC_EXTENSION_PATH=$extension_param"
149149

150+
# legacy check: we removed simulation_defines/ after PIConGPU 0.3.X
151+
if [ -d "$extension_param/include/picongpu/simulation_defines" ]; then
152+
echo "ERROR: simulation_defines/ directory found!" >&2
153+
echo " Please update your input directory to the new structure!" >&2
154+
exit 3
155+
fi
156+
150157
# warn on missing backend selection
151158
if [ -z "$alpaka_backend" ] ; then
152159
echo "Warning: no compute backend set! " >&2

pic-create

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,18 @@ if [ -d "$src_path/include/picongpu" ] ; then
9393
src_path="$src_path"
9494
fi
9595

96+
# legacy check: we removed simulation_defines/ after PIConGPU 0.3.X
97+
if [ -d "$src_path/include/picongpu/simulation_defines" ]; then
98+
echo "ERROR: simulation_defines/ directory found in source!" >&2
99+
echo " Please update your input directory to the new structure!" >&2
100+
exit 3
101+
fi
102+
if [ -d "$dst_path/include/picongpu/simulation_defines" ]; then
103+
echo "ERROR: simulation_defines/ directory found in destination!" >&2
104+
echo " Please update your input directory to the new structure!" >&2
105+
exit 4
106+
fi
107+
96108
if [ -d "$dst_path" ] && [ "$force_param" -eq 0 ] ; then
97109
echo "$dst_path already exists!" >&2
98110
read -e -p "Merge data into $dst_path [yes|NO]? : " input

pic-edit

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
this_dir=$(cd $(dirname $0) && pwd)
2323
known_editors=( 'nano' 'vim' 'vi' 'emacs' )
24-
file_prefix="include/picongpu/simulation_defines/param"
24+
file_prefix="include/picongpu/param"
2525

2626
find_inputs()
2727
{
@@ -112,14 +112,21 @@ while [[ $# -gt 0 ]] ; do
112112
done
113113

114114
# check if we are in an input directory
115-
if [ ! -d "include/picongpu/simulation_defines/param" ]
115+
if [ ! -d "include/picongpu/param" ]
116116
then
117117
echo "ERROR: Could not find directory" >&2
118-
echo " 'include/picongpu/simulation_defines/param'!" >&2
118+
echo " 'include/picongpu/param'!" >&2
119119
echo " Are you in a PIConGPU input directory?" >&2
120120
exit 1
121121
fi
122122

123+
# legacy check: we removed simulation_defines/ after PIConGPU 0.3.X
124+
if [ -d "include/picongpu/simulation_defines" ]; then
125+
echo "ERROR: simulation_defines/ directory found!" >&2
126+
echo " Please update your input directory to the new structure!" >&2
127+
exit 5
128+
fi
129+
123130
for input in "${cmd_line_args[@]}"
124131
do
125132
# check if the file exists locally (even if it does not exist in defaults)

0 commit comments

Comments
 (0)