Skip to content

Commit 3d125c9

Browse files
Merge pull request #9320 from awallace-cray/mpr9148
Adjust launchers to work with CHPL_THIRD_PARTY (cp PR #9148) [for release 1.17.1]
2 parents d171ef6 + 1938342 commit 3d125c9

16 files changed

+34
-26
lines changed

runtime/src/launch/gasnetrun_ibv/Makefile.share

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ LAUNCHER_SRCS = \
2222
# is this the right time to set this variable? Or is user code
2323
# compile time
2424
#
25-
RUNTIME_CFLAGS += -DLAUNCH_PATH="$(THIRD_PARTY_DIR)/gasnet/$(GASNET_INSTALL_SUBDIR)/bin/"
25+
RUNTIME_CFLAGS += -DLAUNCH_PATH="gasnet/$(GASNET_INSTALL_SUBDIR)/bin/"
2626

2727
SVN_SRCS = $(LAUNCHER_SRCS)
2828
SRCS = $(SVN_SRCS)

runtime/src/launch/gasnetrun_ibv/launch-gasnetrun_ibv.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include <stdio.h>
2121
#include <string.h>
22+
#include "chplcgfns.h"
2223
#include "chpllaunch.h"
2324
#include "chpl-mem.h"
2425
#include "error.h"
@@ -48,9 +49,9 @@ static char** chpl_launch_create_argv(const char *launch_cmd,
4849

4950

5051
int chpl_launch(int argc, char* argv[], int32_t numLocales) {
51-
int len = strlen(WRAP_TO_STR(LAUNCH_PATH)) + strlen("gasnetrun_ibv") + 1;
52+
int len = strlen(CHPL_THIRD_PARTY) + strlen(WRAP_TO_STR(LAUNCH_PATH)) + strlen("gasnetrun_ibv") + 2;
5253
char *cmd = chpl_mem_allocMany(len, sizeof(char), CHPL_RT_MD_COMMAND_BUFFER, -1, 0);
53-
sprintf(cmd, "%sgasnetrun_ibv", WRAP_TO_STR(LAUNCH_PATH));
54+
sprintf(cmd, "%s/%sgasnetrun_ibv", CHPL_THIRD_PARTY, WRAP_TO_STR(LAUNCH_PATH));
5455

5556
return chpl_launch_using_exec(cmd,
5657
chpl_launch_create_argv(cmd, argc, argv,

runtime/src/launch/gasnetrun_mpi/Makefile.share

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ LAUNCHER_SRCS = \
2222
# is this the right time to set this variable? Or is user code
2323
# compile time
2424
#
25-
RUNTIME_CFLAGS += -DLAUNCH_PATH="$(THIRD_PARTY_DIR)/gasnet/$(GASNET_INSTALL_SUBDIR)/bin/"
25+
RUNTIME_CFLAGS += -DLAUNCH_PATH="gasnet/$(GASNET_INSTALL_SUBDIR)/bin/"
2626

2727
SVN_SRCS = $(LAUNCHER_SRCS)
2828
SRCS = $(SVN_SRCS)

runtime/src/launch/gasnetrun_mpi/launch-gasnetrun_mpi.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include <stdio.h>
2121
#include <string.h>
22+
#include "chplcgfns.h"
2223
#include "chpllaunch.h"
2324
#include "chpl-mem.h"
2425
#include "error.h"
@@ -46,9 +47,9 @@ static char** chpl_launch_create_argv(const char *launch_cmd,
4647
}
4748

4849
int chpl_launch(int argc, char* argv[], int32_t numLocales) {
49-
int len = strlen(WRAP_TO_STR(LAUNCH_PATH)) + strlen("gasnetrun_mpi") + 1;
50+
int len = strlen(CHPL_THIRD_PARTY) + strlen(WRAP_TO_STR(LAUNCH_PATH)) + strlen("gasnetrun_mpi") + 2;
5051
char *cmd = chpl_mem_allocMany(len, sizeof(char), CHPL_RT_MD_COMMAND_BUFFER, -1, 0);
51-
sprintf(cmd, "%sgasnetrun_mpi", WRAP_TO_STR(LAUNCH_PATH));
52+
sprintf(cmd, "%s/%sgasnetrun_mpi", CHPL_THIRD_PARTY, WRAP_TO_STR(LAUNCH_PATH));
5253

5354
return chpl_launch_using_exec(cmd,
5455
chpl_launch_create_argv(cmd, argc, argv,

runtime/src/launch/gasnetrun_ofi/Makefile.share

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ LAUNCHER_SRCS = \
2222
# is this the right time to set this variable? Or is user code
2323
# compile time
2424
#
25-
RUNTIME_CFLAGS += -DLAUNCH_PATH="$(THIRD_PARTY_DIR)/gasnet/$(GASNET_INSTALL_SUBDIR)/bin/"
25+
RUNTIME_CFLAGS += -DLAUNCH_PATH="gasnet/$(GASNET_INSTALL_SUBDIR)/bin/"
2626

2727
SVN_SRCS = $(LAUNCHER_SRCS)
2828
SRCS = $(SVN_SRCS)

runtime/src/launch/gasnetrun_ofi/launch-gasnetrun_ofi.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include <stdio.h>
2121
#include <string.h>
22+
#include "chplcgfns.h"
2223
#include "chpllaunch.h"
2324
#include "chpl-mem.h"
2425
#include "error.h"
@@ -48,9 +49,9 @@ static char** chpl_launch_create_argv(const char *launch_cmd,
4849

4950

5051
int chpl_launch(int argc, char* argv[], int32_t numLocales) {
51-
int len = strlen(WRAP_TO_STR(LAUNCH_PATH)) + strlen("gasnetrun_ofi") + 1;
52+
int len = strlen(CHPL_THIRD_PARTY) + strlen(WRAP_TO_STR(LAUNCH_PATH)) + strlen("gasnetrun_ofi") + 2;
5253
char *cmd = chpl_mem_allocMany(len, sizeof(char), CHPL_RT_MD_COMMAND_BUFFER, -1, 0);
53-
sprintf(cmd, "%sgasnetrun_ofi", WRAP_TO_STR(LAUNCH_PATH));
54+
sprintf(cmd, "%s/%sgasnetrun_ofi", CHPL_THIRD_PARTY, WRAP_TO_STR(LAUNCH_PATH));
5455

5556
return chpl_launch_using_exec(cmd,
5657
chpl_launch_create_argv(cmd, argc, argv,

runtime/src/launch/gasnetrun_psm/Makefile.share

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ LAUNCHER_SRCS = \
2222
# is this the right time to set this variable? Or is user code
2323
# compile time
2424
#
25-
RUNTIME_CFLAGS += -DLAUNCH_PATH="$(THIRD_PARTY_DIR)/gasnet/$(GASNET_INSTALL_SUBDIR)/bin/"
25+
RUNTIME_CFLAGS += -DLAUNCH_PATH="gasnet/$(GASNET_INSTALL_SUBDIR)/bin/"
2626

2727
SVN_SRCS = $(LAUNCHER_SRCS)
2828
SRCS = $(SVN_SRCS)

runtime/src/launch/gasnetrun_psm/launch-gasnetrun_psm.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include <stdio.h>
2121
#include <string.h>
22+
#include "chplcgfns.h"
2223
#include "chpllaunch.h"
2324
#include "chpl-mem.h"
2425
#include "error.h"
@@ -48,9 +49,9 @@ static char** chpl_launch_create_argv(const char *launch_cmd,
4849

4950

5051
int chpl_launch(int argc, char* argv[], int32_t numLocales) {
51-
int len = strlen(WRAP_TO_STR(LAUNCH_PATH)) + strlen("gasnetrun_psm") + 1;
52+
int len = strlen(CHPL_THIRD_PARTY) + strlen(WRAP_TO_STR(LAUNCH_PATH)) + strlen("gasnetrun_psm") + 2;
5253
char *cmd = chpl_mem_allocMany(len, sizeof(char), CHPL_RT_MD_COMMAND_BUFFER, -1, 0);
53-
sprintf(cmd, "%sgasnetrun_psm", WRAP_TO_STR(LAUNCH_PATH));
54+
sprintf(cmd, "%s/%sgasnetrun_psm", CHPL_THIRD_PARTY, WRAP_TO_STR(LAUNCH_PATH));
5455

5556
return chpl_launch_using_exec(cmd,
5657
chpl_launch_create_argv(cmd, argc, argv,

runtime/src/launch/lsf-gasnetrun_ibv/Makefile.share

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ LAUNCHER_SRCS = \
2020

2121
# from ../gasnetrun_ibv/Makefile.share:
2222
#
23-
RUNTIME_CFLAGS += -DLAUNCH_PATH="$(THIRD_PARTY_DIR)/gasnet/$(GASNET_INSTALL_SUBDIR)/bin/"
23+
RUNTIME_CFLAGS += -DLAUNCH_PATH="gasnet/$(GASNET_INSTALL_SUBDIR)/bin/"
2424

2525
SVN_SRCS = $(LAUNCHER_SRCS)
2626
SRCS = $(SVN_SRCS)

runtime/src/launch/lsf-gasnetrun_ibv/launch-lsf-gasnetrun_ibv.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <string.h>
2323
#include <sys/types.h>
2424
#include <unistd.h>
25+
#include "chplcgfns.h"
2526
#include "chpllaunch.h"
2627
#include "chpl-mem.h"
2728
#include "error.h"
@@ -48,9 +49,9 @@
4849
static char _nlbuf[16];
4950
static char** chpl_launch_create_argv(int argc, char* argv[],
5051
int32_t numLocales) {
51-
int len = strlen(WRAP_TO_STR(LAUNCH_PATH)) + strlen("gasnetrun_ibv") + 1;
52+
int len = strlen(CHPL_THIRD_PARTY) + strlen(WRAP_TO_STR(LAUNCH_PATH)) + strlen("gasnetrun_ibv") + 2;
5253
char *cmd = chpl_mem_allocMany(len, sizeof(char), CHPL_RT_MD_COMMAND_BUFFER, -1, 0);
53-
sprintf(cmd, "%sgasnetrun_ibv", WRAP_TO_STR(LAUNCH_PATH));
54+
sprintf(cmd, "%s/%sgasnetrun_ibv", CHPL_THIRD_PARTY, WRAP_TO_STR(LAUNCH_PATH));
5455

5556
const int largc = 9;
5657
char *largv[largc];

runtime/src/launch/marenostrum/Makefile.share

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ LAUNCHER_SRCS = \
2222
# is this the right time to set this variable? Or is user code
2323
# compile time
2424
#
25-
RUNTIME_CFLAGS += -DLAUNCH_PATH="$(THIRD_PARTY_DIR)/gasnet/$(GASNET_INSTALL_SUBDIR)/bin/" -DCHPL_COMM_SUBSTRATE=$(CHPL_MAKE_COMM_SUBSTRATE)
25+
RUNTIME_CFLAGS += -DLAUNCH_PATH="gasnet/$(GASNET_INSTALL_SUBDIR)/bin/" -DCHPL_COMM_SUBSTRATE=$(CHPL_MAKE_COMM_SUBSTRATE)
2626

2727
SVN_SRCS = $(LAUNCHER_SRCS)
2828
SRCS = $(SVN_SRCS)

runtime/src/launch/marenostrum/launch-marenostrum.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <string.h>
2424
#include <sys/types.h>
2525
#include <unistd.h>
26+
#include "chplcgfns.h"
2627
#include "chpllaunch.h"
2728
#include "chpl-mem.h"
2829
#include "chpltypes.h"
@@ -104,12 +105,12 @@ static char* chpl_launch_create_command(int argc, char* argv[],
104105
}
105106
fprintf(llFile, "\n");
106107

107-
fprintf(llFile, "%samudprun ", WRAP_TO_STR(LAUNCH_PATH));
108+
fprintf(llFile, "%s/%samudprun ", CHPL_THIRD_PARTY, WRAP_TO_STR(LAUNCH_PATH));
108109
#elif CHPL_COMM_SUBSTRATE == mpi
109110
fprintf(llFile, "export MPIRUN_CMD='srun --kill-on-bad-exit %%C'\n");
110111
fprintf(llFile, "export MPIRUN_CMD_OK=true\n");
111112
fprintf(llFile, "\n");
112-
fprintf(llFile, "%sgasnetrun_mpi ", WRAP_TO_STR(LAUNCH_PATH));
113+
fprintf(llFile, "%s/%sgasnetrun_mpi ", CHPL_THIRD_PARTY, WRAP_TO_STR(LAUNCH_PATH));
113114
#elif CHPL_COMM_SUBSTRATE == none
114115
#else
115116
#error "Unknown CHPL_COMM_SUBSTRATE"

runtime/src/launch/pbs-gasnetrun_ibv/Makefile.share

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
LAUNCHER_SRCS = \
1919
launch-pbs-gasnetrun_ibv.c \
2020

21-
RUNTIME_CFLAGS += -DLAUNCH_PATH="$(THIRD_PARTY_DIR)/gasnet/$(GASNET_INSTALL_SUBDIR)/bin/"
21+
RUNTIME_CFLAGS += -DLAUNCH_PATH="gasnet/$(GASNET_INSTALL_SUBDIR)/bin/"
2222

2323
SVN_SRCS = $(LAUNCHER_SRCS)
2424
SRCS = $(SVN_SRCS)

runtime/src/launch/pbs-gasnetrun_ibv/launch-pbs-gasnetrun_ibv.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <string.h>
2424
#include <sys/types.h>
2525
#include <unistd.h>
26+
#include "chplcgfns.h"
2627
#include "chpllaunch.h"
2728
#include "chpl-mem.h"
2829
#include "chpltypes.h"
@@ -168,8 +169,8 @@ static char* chpl_launch_create_command(int argc, char* argv[],
168169
fprintf(expectFile, "expect -re $prompt\n");
169170
fprintf(expectFile, "send \"cd \\$PBS_O_WORKDIR\\n\"\n");
170171
fprintf(expectFile, "expect -re $prompt\n");
171-
fprintf(expectFile, "send \"%s/gasnetrun_ibv -n %d %s ",
172-
WRAP_TO_STR(LAUNCH_PATH), numLocales, chpl_get_real_binary_name());
172+
fprintf(expectFile, "send \"%s/%s/gasnetrun_ibv -n %d %s ",
173+
CHPL_THIRD_PARTY, WRAP_TO_STR(LAUNCH_PATH), numLocales, chpl_get_real_binary_name());
173174
for (i=1; i<argc; i++) {
174175
fprintf(expectFile, " '%s'", argv[i]);
175176
}

runtime/src/launch/slurm-gasnetrun_ibv/Makefile.share

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
LAUNCHER_SRCS = \
1919
launch-slurm-gasnetrun_ibv.c \
2020

21-
RUNTIME_CFLAGS += -DLAUNCH_PATH="$(THIRD_PARTY_DIR)/gasnet/$(GASNET_INSTALL_SUBDIR)/bin/"
21+
RUNTIME_CFLAGS += -DLAUNCH_PATH="gasnet/$(GASNET_INSTALL_SUBDIR)/bin/"
2222

2323
SVN_SRCS = $(LAUNCHER_SRCS)
2424
SRCS = $(SVN_SRCS)

runtime/src/launch/slurm-gasnetrun_ibv/launch-slurm-gasnetrun_ibv.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <sys/types.h>
2525
#include <sys/stat.h>
2626
#include <unistd.h>
27+
#include "chplcgfns.h"
2728
#include "chpllaunch.h"
2829
#include "chpl-mem.h"
2930
#include "chpltypes.h"
@@ -215,8 +216,8 @@ static char* chpl_launch_create_command(int argc, char* argv[],
215216
else
216217
fprintf(slurmFile, "#SBATCH -o %s.%%j.out\n", argv[0]);
217218
// fprintf(slurmFile, "cd $SBATCH_O_WORKDIR\n");
218-
fprintf(slurmFile, "%s/gasnetrun_ibv -n %d %s ",
219-
WRAP_TO_STR(LAUNCH_PATH), numLocales, chpl_get_real_binary_name());
219+
fprintf(slurmFile, "%s/%s/gasnetrun_ibv -n %d %s ",
220+
CHPL_THIRD_PARTY, WRAP_TO_STR(LAUNCH_PATH), numLocales, chpl_get_real_binary_name());
220221
for (i=1; i<argc; i++) {
221222
fprintf(slurmFile, " '%s'", argv[i]);
222223
}
@@ -249,8 +250,8 @@ static char* chpl_launch_create_command(int argc, char* argv[],
249250
fprintf(expectFile, " -C %s", constraint);
250251
}
251252
// fprintf(expectFile, "-I %s ", slurmFilename);
252-
fprintf(expectFile, " %s/gasnetrun_ibv -n %d %s ",
253-
WRAP_TO_STR(LAUNCH_PATH), numLocales, chpl_get_real_binary_name());
253+
fprintf(expectFile, " %s/%s/gasnetrun_ibv -n %d %s ",
254+
CHPL_THIRD_PARTY, WRAP_TO_STR(LAUNCH_PATH), numLocales, chpl_get_real_binary_name());
254255
for (i=1; i<argc; i++) {
255256
fprintf(expectFile, " %s", argv[i]);
256257
}

0 commit comments

Comments
 (0)