Browse files

CRAY - Make sure GA code only gets compiled on systems that have

the correct lib.
  • Loading branch information...
1 parent b345c19 commit a120197fcac9a75b2327dd85d220d919e17b96bb @dannyauble dannyauble committed Feb 28, 2014
Showing with 11 additions and 3 deletions.
  1. +8 −0 auxdir/x_ac_cray.m4
  2. +3 −3 src/plugins/select/cray/select_cray.c
View
8 auxdir/x_ac_cray.m4
@@ -120,6 +120,14 @@ AC_DEFUN([X_AC_CRAY],
)],
[have_cray_files="yes"],
[AC_MSG_ERROR(There is a problem linking to the Cray api.)])
+
+ # See if we have 5.2UP01 alpscomm functions
+ AC_SEARCH_LIBS([alpsc_get_topology],
+ [alpscomm_sn],
+ [AC_DEFINE(HAVE_NATIVE_CRAY_GA, 1,
+ [Define to 1 if alpscomm functions new to CLE 5.2UP01 are defined])])
+
+
LIBS="$saved_LIBS"
CPPFLAGS="$saved_CPPFLAGS"
View
6 src/plugins/select/cray/select_cray.c
@@ -1400,7 +1400,7 @@ extern int select_p_node_init(struct node_record *node_ptr, int node_cnt)
int i, j;
uint64_t blade_id = 0;
-#ifdef HAVE_NATIVE_CRAY
+#ifdef HAVE_NATIVE_CRAY_GA
int nn, end_nn, last_nn = 0;
bool found = 0;
alpsc_topology_t *topology = NULL;
@@ -1455,7 +1455,7 @@ extern int select_p_node_init(struct node_record *node_ptr, int node_cnt)
nodeinfo->nid = atoll(nid_char);
}
-#ifdef HAVE_NATIVE_CRAY
+#ifdef HAVE_NATIVE_CRAY_GA
end_nn = num_nodes;
start_again:
@@ -1511,7 +1511,7 @@ extern int select_p_node_init(struct node_record *node_ptr, int node_cnt)
/* give back the memory */
xrealloc(blade_array, sizeof(blade_info_t) * blade_cnt);
-#ifdef HAVE_NATIVE_CRAY
+#ifdef HAVE_NATIVE_CRAY_GA
free(topology);
#endif

0 comments on commit a120197

Please sign in to comment.