Skip to content
Snippets Groups Projects
Commit cd606813 authored by Jim Garlick's avatar Jim Garlick
Browse files

Modify configure.ac to look for -lrmscall not -lrms.

Update src/test/runqsw.c to fail if it fails to determine network Id.
Update src/common/qsw.c to work with new driver (elan3_create requires
a handle from elan3_control_open now instead of _elan3_init).
parent ebdfa46f
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,7 @@ if test $with_elan; then
[],
[AC_MSG_ERROR([unable to find the Elan3 library needed for Elan support.])],
)
AC_CHECK_LIB(rms, rms_prgcreate,
AC_CHECK_LIB(rmscall, rms_prgcreate,
[],
[AC_MSG_ERROR([unable to find the RMS library needed for Elan support])],
)
......
......@@ -538,7 +538,11 @@ void
qsw_prog_fini(qsw_jobinfo_t jobinfo)
{
if (jobinfo->j_ctx) {
#if OLD_ELAN_DRIVER
_elan3_fini(jobinfo->j_ctx);
#else
elan3_control_close(jobinfo->j_ctx);
#endif
jobinfo->j_ctx = NULL;
}
}
......@@ -550,10 +554,14 @@ int
qsw_prog_init(qsw_jobinfo_t jobinfo, uid_t uid)
{
int err;
#if OLD_ELAN_DRIVER
/* obtain an Elan context (not the same as a hardware context num!) */
if ((jobinfo->j_ctx = _elan3_init(0)) == NULL)
goto fail;
#else
if ((jobinfo->j_ctx = elan3_control_open(0)) == NULL)
goto fail;
#endif
/* associate this process and its children with prgnum */
if (rms_prgcreate(jobinfo->j_prognum, uid, 1) < 0)
......@@ -605,7 +613,11 @@ qsw_getnodeid(void)
if (ctx) {
nodeid = ctx->devinfo.NodeId;
#if OLD_ELAN_DRIVER
_elan3_fini(ctx);
#else
elan3_control_close(ctx);
#endif
}
return nodeid;
}
......
......@@ -200,6 +200,10 @@ main(int argc, char *argv[])
usage();
if (nprocs == 0)
nprocs = 2;
if (nodeid < 0) {
fprintf(stderr, "runqsw: could not determine elan address\n");
exit(1);
}
while (optind < argc)
sprintf(cmdbuf + strlen(cmdbuf), "%s ", argv[optind++]);
cmdbuf[strlen(cmdbuf) - 1] = '\0';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment