File: build_static.sh

package info (click to toggle)
mpich 4.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 101,184 kB
  • sloc: ansic: 1,040,629; cpp: 82,270; javascript: 40,763; perl: 27,933; python: 16,041; sh: 14,676; xml: 14,418; f90: 12,916; makefile: 9,270; fortran: 8,046; java: 4,635; asm: 324; ruby: 103; awk: 27; lisp: 19; php: 8; sed: 4
file content (69 lines) | stat: -rwxr-xr-x 1,521 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash -eExl
#
# Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# See file LICENSE for terms.
#

realdir=$(realpath $(dirname $0))
source ${realdir}/common.sh
source ${realdir}/../az-helpers.sh
long_test=${long_test:-no}

#
# Build with static library
#
build_static() {
	az_module_load dev/libnl
	az_module_load dev/numactl

	${WORKSPACE}/contrib/configure-devel --prefix=$ucx_inst
	$MAKEP
	$MAKEP install

	# Build test applications
	SAVE_PKG_CONFIG_PATH=$PKG_CONFIG_PATH
	export PKG_CONFIG_PATH=$ucx_inst/lib/pkgconfig:$PKG_CONFIG_PATH

	$MAKE -C test/apps/uct_info

	export PKG_CONFIG_PATH=$SAVE_PKG_CONFIG_PATH

	# Run test applications and check script
	SAVE_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
	export LD_LIBRARY_PATH=$ucx_inst/lib:$LD_LIBRARY_PATH

	cd ./test/apps/uct_info

	./uct_info
	./uct_info_static

	${WORKSPACE}/buildlib/tools/check_tls.sh $EXTRA_TLS

	# Set port number for hello_world applications
	server_port=$((10000 + (1000 * EXECUTOR_NUMBER)))
	server_port_arg="-p $server_port"

	for tls in tcp $RUN_TLS; do
		echo UCX_TLS=$tls
		UCX_TLS=$tls ./ucp_hello_world_static ${server_port_arg} &
		PID=$!
		# allow server to start
		sleep 10
		UCX_TLS=$tls ./ucp_hello_world_static ${server_port_arg} -n localhost
		wait ${pid} || true
	done

	export LD_LIBRARY_PATH=$SAVE_LD_LIBRARY_PATH

	az_module_unload dev/numactl
	az_module_unload dev/libnl
}

az_init_modules
prepare_build

# Don't cross-connect RoCE devices
export UCX_IB_ROCE_SUBNET_PREFIX_LEN=inf
build_static