Commit c25d0dc9 authored by Jonathan Jenkins's avatar Jonathan Jenkins
Browse files

clean up err handling for LP registration

parent b3dd47d2
......@@ -396,6 +396,7 @@ static void codes_mapping_init(void)
char lp_type_name[MAX_NAME_LENGTH];
int nkp_per_pe = g_tw_nkp;
tw_lpid lpid, kpid;
const tw_lptype *lptype;
/* have 16 kps per pe, this is the optimized configuration for ROSS custom mapping */
for(kpid = 0; kpid < nkp_per_pe; kpid++)
......@@ -419,7 +420,12 @@ static void codes_mapping_init(void)
tw_lp_onpe(ross_lid, pe, ross_gid);
tw_lp_onkp(g_tw_lp[ross_lid], g_tw_kp[kpid]);
tw_lp_settype(ross_lid, lp_type_lookup(lp_type_name));
lptype = lp_type_lookup(lp_type_name);
if (lptype == NULL)
tw_error(TW_LOC, "could not find LP with type name \"%s\", "
"did you forget to register the LP?\n", lp_type_name);
tw_lp_settype(ross_lid, lptype);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment