Skip to content

Commit cba5d16

Browse files
author
Andrew Gontarek
committed
Added CTI and aarch64 changes
1. Added Cray Inc. contributed changes for both Cray Tools Interface (CTI) support and base support for aarch64 systems. 2. Removed cobo test Makefile.in. 3. A few minor changes from code review.
1 parent 449bb7a commit cba5d16

30 files changed

+1361
-603
lines changed

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ Dong H. Ahn (LLNL)
22
Matt LeGendre (LLNL)
33
Gregory Lee (LLNL)
44
Andrew Gontarek (Cray Inc)
5+
Karen Davis (Cray Inc)

config.h.in

+3
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@
242242
/* Define 1 for SUB_ARCH_BGQ */
243243
#undef SUB_ARCH_BGQ
244244

245+
/* Define 1 for SUB_ARCH_CRAY */
246+
#undef SUB_ARCH_CRAY
247+
245248
/* Define os-isa string */
246249
#undef TARGET_OS_ISA_STRING
247250

config/x_ac_platform.m4

+28-13
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
# --------------------------------------------------------------------------------
2929
#
3030
# Update Log:
31+
# May 02 2018 KMD: Added aarch64 support
32+
# Apr 01 2015 ADG: Added Cray CTI support.
3133
# Feb 20 2015 [email protected]: Fixes for Cray systems.
3234
# Jun 11 2008 DHA: File created.
3335
#
@@ -66,6 +68,11 @@ AC_DEFUN([X_AC_PLATFORM], [
6668
AC_SUBST(LNCHR_BIT_FLAGS, -m64)
6769
AC_DEFINE(BIT64, 1, [64bit])
6870
;;
71+
*aarch64*)AC_DEFINE(AARCH64_ARCHITECTURE,1,[Define 1 for AARCH64_ARCHITECTURE])
72+
ac_have_known_isa="yes"
73+
ac_target_isa="aarch64"
74+
AC_DEFINE(BIT64, 1, [64bit])
75+
;;
6976
*i686*) AC_DEFINE(X86_ARCHITECTURE,1,[Define 1 for X86_ARCHITECTURE])
7077
ac_have_known_isa="yes"
7178
ac_target_isa="x86"
@@ -118,8 +125,24 @@ AC_DEFUN([X_AC_PLATFORM], [
118125
AC_SUBST(ARCHHEADER,"/")
119126
AC_SUBST(ARCHLIB,"/")
120127
fi
121-
elif test "x$ac_target_os" = "xlinux" -a "x$ac_target_isa" = "xx86_64"; then
122-
if test -f "/opt/cray/alps/default/bin/aprun"; then
128+
elif test "x$ac_target_os" = "xlinux" -a "x$ac_target_isa" = "xx86_64" \
129+
-o "x$ac_target_os" = "xlinux" -a "x$ac_target_isa" = "xaarch64"; then
130+
#
131+
# Check for Cray CTI before falling back to the alps method.
132+
#
133+
PKG_CHECK_EXISTS([craytools_fe], [ac_have_cray_cti="yes"], [ac_have_cray_cti="no"])
134+
if test "x$ac_have_cray_cti" = "xyes"; then
135+
AC_DEFINE(SUB_ARCH_CRAY,1,[Define 1 for SUB_ARCH_CRAY])
136+
AC_DEFINE(RM_FE_COLOC_CMD, "cti_fe_colocator", [bulk launcher location])
137+
PKG_CHECK_MODULES([CRAY_CTI], [craytools_fe])
138+
AC_SUBST(ARCHHEADER,"/")
139+
AC_SUBST(ARCHLIB,"/")
140+
ac_target_rm="cray"
141+
else
142+
dnl For the cray build, we always want to force alps to tbe the target rm. We
143+
dnl might be building on a whitebox without aprun installed.
144+
PKG_CHECK_EXISTS([cray-alps], [ac_have_alps="yes"], [ac_have_alps="no"])
145+
if test "x$ac_have_alps" = "xyes"; then
123146
dnl This is the new OBS system
124147
AC_DEFINE(SUB_ARCH_ALPS,1,[Define 1 for SUB_ARCH_ALPS])
125148
AC_DEFINE(RM_BE_STUB_CMD, "alps_be_starter", [be starter stub location])
@@ -128,19 +151,10 @@ AC_DEFUN([X_AC_PLATFORM], [
128151
AC_SUBST(ARCHHEADER,"/")
129152
AC_SUBST(ARCHLIB,"/")
130153
ac_target_rm="alps"
131-
elif test -f "/usr/bin/aprun"; then
132-
dnl This is the old system. We hack things to work without pkg-config
133-
AC_DEFINE(SUB_ARCH_ALPS,1,[Define 1 for SUB_ARCH_ALPS])
134-
AC_DEFINE(RM_BE_STUB_CMD, "alps_be_starter", [be starter stub location])
135-
AC_DEFINE(RM_FE_COLOC_CMD, "alps_fe_colocator", [bulk launcher location])
136-
AC_SUBST(CRAY_ALPS_CFLAGS,"-I/usr/include")
137-
AC_SUBST(CRAY_ALPS_LIBS,"-L/usr/lib/alps -lalps")
138-
AC_SUBST(ARCHHEADER,"/")
139-
AC_SUBST(ARCHLIB,"/")
140-
ac_target_rm="alps"
141-
else
154+
else
142155
AC_SUBST(ARCHHEADER,"/")
143156
AC_SUBST(ARCHLIB,"/")
157+
fi
144158
fi
145159
else
146160
AC_SUBST(ARCHHEADER,"/")
@@ -149,6 +163,7 @@ AC_DEFUN([X_AC_PLATFORM], [
149163
150164
AC_DEFINE_UNQUOTED(TARGET_OS_ISA_STRING, "$ac_target_os-$ac_target_isa", [Define os-isa string])
151165
AC_DEFINE_UNQUOTED(TARGET_RM_STRING, "$ac_target_rm" ,[Define rm string])
166+
AM_CONDITIONAL([WITH_CTI], [test "x$ac_target_rm" = "xcray"])
152167
AM_CONDITIONAL([WITH_ALPS], [test "x$ac_target_rm" = "xalps"])
153168
AM_CONDITIONAL([WITH_CIOD], [test "x$ac_target_rm" = "xbglrm" \
154169
-o "x$ac_target_rm" = "xbgprm" \

configure.ac

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ dnl ----------------------------------------------------------------------------
2929
dnl
3030
dnl Update Log:
3131
dnl Apr 28 2016 DHA: Modernize autotool support
32+
dnl Apr 01 2015 ADG/KMD: Added Cray CTI support.
3233
dnl Feb 20 2015 [email protected]: Added Cray support.
3334
dnl Apr 30 2014 DHA: Declare 1.0.1 -- this doesn't have Cray support though.
3435
dnl Apr 15 2014 DHA: Drop tools/cobo/test
@@ -292,6 +293,7 @@ AC_CONFIG_FILES([
292293
tools/cobo/src/Makefile
293294
tools/alps/Makefile
294295
tools/alps/src/Makefile
296+
tools/cti/Makefile
295297
tools/handshake/Makefile
296298
launchmon/Makefile
297299
launchmon/src/Makefile

etc/Makefile.am

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
##--------------------------------------------------------------------------------
3030
##
3131
## Update Log:
32+
## May 18 2018 ADG: Added Cray CTI support
3233
## Apr 28 2016 DHA: Created file.
3334
##
3435

@@ -42,6 +43,7 @@ etc_SCRIPTS = \
4243
rm_bgprm.conf \
4344
rm_bgqrm.conf \
4445
rm_bgq_slurm.conf \
46+
rm_cray.conf \
4547
rm_mchecker.conf \
4648
rm_openrte.conf \
4749
rm_slurm.conf \
@@ -53,6 +55,7 @@ EXTRA_DIST = \
5355
rm_bglrm.conf \
5456
rm_bgprm.conf \
5557
rm_bgqrm.conf \
58+
rm_cray.conf \
5659
rm_gupc.conf \
5760
rm_bgq_slurm.conf \
5861
rm_mchecker.conf \

etc/rm_alps.conf

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ RM=alps
4949
RM_MPIR=STD_CRAY
5050
RM_launcher=aprun
5151
RM_launcher=aprun.orig
52-
RM_launcher=alps_fe_colocator
5352
RM_launcher_id=RM_launcher|sym|AprunUsageMsg
5453
RM_jobid=RM_launcher|pid
5554
RM_launch_helper=alps_fe_colocator

etc/rm_cray.conf

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## $Header: $
2+
##
3+
## rm_cray.conf
4+
##
5+
##--------------------------------------------------------------------------------
6+
## Copyright (c) 2008, Lawrence Livermore National Security, LLC. Produced at
7+
## the Lawrence Livermore National Laboratory. Written by Dong H. Ahn <[email protected]>.
8+
## LLNL-CODE-409469. All rights reserved.
9+
##
10+
## This file is part of LaunchMON. For details, see
11+
## https://computing.llnl.gov/?set=resources&page=os_projects
12+
##
13+
## Please also read LICENSE -- Our Notice and GNU Lesser General Public License.
14+
##
15+
##
16+
## This program is free software; you can redistribute it and/or modify it under the
17+
## terms of the GNU General Public License (as published by the Free Software
18+
## Foundation) version 2.1 dated February 1999.
19+
##
20+
## This program is distributed in the hope that it will be useful, but WITHOUT ANY
21+
## WARRANTY; without even the IMPLIED WARRANTY OF MERCHANTABILITY or
22+
## FITNESS FOR A PARTICULAR PURPOSE. See the terms and conditions of the GNU
23+
## General Public License for more details.
24+
##
25+
## You should have received a copy of the GNU Lesser General Public License along
26+
## with this program; if not, write to the Free Software Foundation, Inc., 59 Temple
27+
## Place, Suite 330, Boston, MA 02111-1307 USA
28+
##--------------------------------------------------------------------------------
29+
##
30+
## Update Log:
31+
## Mar 31 2015 [email protected]: Added file for Cray CTI support
32+
##
33+
##
34+
## RM: the name of Resource Manager
35+
## RM_launcher: the name of the launcher command
36+
## RM_launcher_id: the rule to get the launcher id
37+
## (e.g., RM_launcher|sym|srun says the launcher is identify by testing
38+
## RM_launcher's symbol by the name of srun)
39+
## RM_jobid: the rule to get the target jobid
40+
## (e.g., RM_jobid=RM_launcher|sym|totalview_jobid|string says
41+
## jobid can be obtained from the launcher's symbol, totalview_jobid,
42+
## interpreting that as the string type.
43+
## RM_launcher_helper= method or command to launch daemons
44+
## RM_launch_str= options and arguements used for RM_launch_mth.
45+
##
46+
47+
RM=cray
48+
RM_MPIR=STD_CRAY
49+
RM_launcher=aprun
50+
RM_launcher=aprun.orig
51+
RM_launcher_id=RM_launcher|sym|AprunUsageMsg
52+
RM_jobid=RM_launcher|pid
53+
RM_launch_helper=cti_fe_colocator
54+
RM_signal_for_kill=SIGINT
55+
RM_fail_detection=false
56+
RM_launch_str=--apid=%j --daemon=%d -- %o --lmonsharedsec=%s --lmonsecchk=%c

etc/rm_info.conf

+11
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
##
3030
## Update Log:
3131
## Sep 30 2011 DHA: Created file.
32+
## Apr 01 2015 ADG: Added CTI support.
33+
## Mar 01 2018 KMD: Added aarch64 support
3234
##
3335
##
3436
## [platform]
@@ -44,10 +46,19 @@ rm_mchecker.conf
4446
rm_slurm.conf
4547
rm_openrte.conf
4648
rm_alps.conf
49+
rm_cray.conf
4750
rm_mchecker.conf
4851
rm_mpiexec_hydra.conf
4952
rm_gupc.conf
5053

54+
[linux-aarch64]
55+
rm_slurm.conf
56+
rm_openrte.conf
57+
rm_alps.conf
58+
rm_cray.conf
59+
rm_mchecker.conf
60+
rm_gupc.conf
61+
5162
[linux-power]
5263
rm_bglrm.conf
5364
rm_bgprm.conf

etc/rm_slurm.conf

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
## Update Log:
3131
## Sep 30 2011 DHA: Created file.
3232
## Feb 02 2016 GLL: Added sattach.
33+
## May 18 2018 ADG: Modified launch string to avoid requesting resources.
3334
##
3435
##
3536
## RM: the name of Resource Manager
@@ -58,5 +59,5 @@ RM_jobid=RM_launcher|sym|totalview_jobid|string
5859
RM_launch_helper=srun
5960
RM_signal_for_kill=SIGINT|SIGINT
6061
RM_fail_detection=true
61-
RM_launch_str=--input=none --jobid=%j --nodes=%n --ntasks=%n --nodelist=%l %d %o --lmonsharedsec=%s --lmonsecchk=%c
62+
RM_launch_str=--input=none --gres=none --mem-per-cpu=0 --jobid=%j --nodes=%n --ntasks=%n --nodelist=%l %d %o --lmonsharedsec=%s --lmonsecchk=%c
6263

launchmon/src/linux/lmon_api/lmon_be.cxx

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
*--------------------------------------------------------------------------------
2727
*
2828
* Update Log:
29+
* Apr 01 2015 ADG: Added Cray CTI support.
2930
* Dec 11 2012 DHA: Added mods to initialize process control before
3031
* MPIR_Breakpoint release.
3132
* This fixes an apparent race where the early release
@@ -181,7 +182,7 @@ LMON_be_init ( int ver, int *argc, char ***argv )
181182
LMON_say_msg ( LMON_BE_MSG_PREFIX, true,
182183
"LMON BE fails to enable verbosity %d", lrc );
183184
}
184-
#elif SUB_ARCH_ALPS
185+
#elif SUB_ARCH_ALPS || SUB_ARCH_CRAY
185186
//
186187
// Without this, the no-verbose build will hang under ALPS
187188
//

launchmon/src/linux/lmon_api/lmon_be_sync_mpi.cxx

+7
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
*--------------------------------------------------------------------------------
2727
*
2828
* Update Log:
29+
* Apr 01 2015 ADG: Added Cray CTI support.
2930
* Dec 14 2012 DHA: Add support to fix MPIR_Breakpoint
3031
* release race
3132
* Nov 23 2011 DHA: File created
@@ -126,6 +127,7 @@ LMON_be_procctl_init ( rm_catalogue_e rmtype,
126127

127128
case RC_orte:
128129
case RC_alps:
130+
case RC_cray:
129131
case RC_gupc:
130132
case RC_mpiexec_hydra:
131133
//
@@ -184,6 +186,7 @@ LMON_be_procctl_stop ( rm_catalogue_e rmtype,
184186
case RC_slurm:
185187
case RC_orte:
186188
case RC_alps:
189+
case RC_cray:
187190
case RC_gupc:
188191
case RC_mpiexec_hydra:
189192
//
@@ -254,6 +257,7 @@ LMON_be_procctl_run ( rm_catalogue_e rmtype,
254257
case RC_slurm:
255258
case RC_orte:
256259
case RC_alps:
260+
case RC_cray:
257261
case RC_gupc:
258262
case RC_mpiexec_hydra:
259263
//
@@ -321,6 +325,7 @@ LMON_be_procctl_initdone( rm_catalogue_e rmtype,
321325

322326
case RC_orte:
323327
case RC_alps:
328+
case RC_cray:
324329
case RC_gupc:
325330
case RC_mpiexec_hydra:
326331
//
@@ -379,6 +384,7 @@ LMON_be_procctl_done(rm_catalogue_e rmtype,
379384
case RC_slurm:
380385
case RC_orte:
381386
case RC_alps:
387+
case RC_cray:
382388
case RC_gupc:
383389
case RC_mpiexec_hydra:
384390
//
@@ -441,6 +447,7 @@ LMON_be_procctl_perf ( rm_catalogue_e rmtype,
441447
case RC_slurm:
442448
case RC_orte:
443449
case RC_alps:
450+
case RC_cray:
444451
case RC_gupc:
445452
case RC_mpiexec_hydra:
446453
//

launchmon/src/linux/lmon_api/lmon_fe.cxx

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
*--------------------------------------------------------------------------------
2727
*
2828
* Update Log:
29+
* Apr 01 2015 ADG: Added Cray CTI support.
2930
* Apr 22 2014 DHA: Applied a patch to store RM args/opts into
3031
* a std::list object instead of a std:string string.
3132
* Apr 15 2014 DHA: Integrate COBO secure handshake
@@ -2582,7 +2583,7 @@ LMON_openBindAndListen ( int *sfd )
25822583
// Changed RM_BGL_MPIRUN to RM_BG_MPIRUN to genericize BlueGene Support
25832584
//
25842585
strcat (hn, "-io");
2585-
#elif SUB_ARCH_ALPS
2586+
#elif SUB_ARCH_ALPS || SUB_ARCH_CRAY
25862587
//
25872588
// Cray uses its own way to name a node, so overwriting
25882589
// hn with the name generated with their method

launchmon/src/linux/main.cxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
*--------------------------------------------------------------------------------
2727
*
2828
* Update Log:
29+
* May 02 2018 KMD: Added aarch64 support
2930
* Nov 08 2010 DHA: Added a lexical scope around the driver object
3031
* to support memory tools
3132
* Aug 10 2008 DHA: Now returns EXIT_FAILURE
@@ -53,10 +54,9 @@ int main(int argc, char* argv[])
5354
{
5455
try
5556
{
56-
5757
int rc = EXIT_FAILURE;
5858
{
59-
#if X86_ARCHITECTURE || X86_64_ARCHITECTURE || PPC_ARCHITECTURE
59+
#if X86_ARCHITECTURE || X86_64_ARCHITECTURE || PPC_ARCHITECTURE || AARCH64_ARCHITECTURE
6060
//
6161
// driver instantiation for the linux platform.
6262
//

launchmon/src/linux/sdbg_linux_bp.hxx

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
*--------------------------------------------------------------------------------
2727
*
2828
* Update Log:
29+
* May 02 2018 KMD: Added aarch64 support
2930
* Mar 06 2008 DHA: Added indirect breakpoint support
3031
* Mar 11 2008 DHA: Added Linux PowerPC support
3132
* Feb 09 2008 DHA: Added LLNS Copyright
@@ -40,7 +41,7 @@
4041
#include "sdbg_linux_mach.hxx"
4142

4243
#if BIT64
43-
# if X86_64_ARCHITECTURE
44+
# if X86_64_ARCHITECTURE || AARCH64_ARCHITECTURE
4445
const int NUM_BYTE_INCR_AFTER_SINGLESTEP = 8;
4546
# else
4647
const int NUM_BYTE_INCR_AFTER_SINGLESTEP = 4;

launchmon/src/linux/sdbg_linux_driver_impl.hxx

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
*--------------------------------------------------------------------------------
2727
*
2828
* Update Log:
29+
* May 02 2018 KMD: Added aarch64 support
2930
* Mar 11 2008 DHA: Added PowerPC support
3031
* Feb 09 2008 DHA: Added LLNS Copyright
3132
* Mar 13 2007 DHA: pipe_t support
@@ -102,6 +103,8 @@ linux_driver_t<LINUX_DRIVER_TEMPLPARAM>::create_process (
102103
return_proc = new linux_ppc_process_t(pid, mi, md, mt, mc);
103104
#elif IA64_ARCHITECTURE
104105
return_proc = new linux_ia64_process_t(pid, mi, md, mt, mc);
106+
#elif AARCH64_ARCHITECTURE
107+
return_proc = new linux_aarch64_process_t(pid, mi, md, mt, mc);
105108
#endif
106109

107110
return return_proc;
@@ -134,6 +137,8 @@ linux_driver_t<LINUX_DRIVER_TEMPLPARAM>::create_process (
134137
return_proc = new linux_ppc_process_t (pid, mi);
135138
#elif IA64_ARCHITECTURE
136139
return_proc = new linux_ia64_process_t (pid, mi);
140+
#elif AARCH64_ARCHITECTURE
141+
return_proc = new linux_aarch64_process_t (pid, mi);
137142
#endif
138143

139144
return return_proc;

0 commit comments

Comments
 (0)