Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
e6823d9a
Commit
e6823d9a
authored
19 years ago
by
Christopher J. Morrone
Browse files
Options
Downloads
Patches
Plain Diff
Use correct adapter name for all windows in fed_unload_table
parent
95a53b2c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/switch/federation/federation.c
+25
-34
25 additions, 34 deletions
src/plugins/switch/federation/federation.c
with
25 additions
and
34 deletions
src/plugins/switch/federation/federation.c
+
25
−
34
View file @
e6823d9a
...
@@ -288,57 +288,45 @@ _cache_lid(fed_adapter_t *ap)
...
@@ -288,57 +288,45 @@ _cache_lid(fed_adapter_t *ap)
strncpy
(
lid_cache
[
adapter_num
].
name
,
ap
->
name
,
FED_ADAPTERNAME_LEN
);
strncpy
(
lid_cache
[
adapter_num
].
name
,
ap
->
name
,
FED_ADAPTERNAME_LEN
);
}
}
/* Check lid cache for a given lid and return the associated adapter
* name.
*
* Used by: slurmd
*/
static
char
*
_get_adapter_from_lid
(
int
lid
)
{
int
i
;
for
(
i
=
0
;
i
<
FED_MAXADAPTERS
;
i
++
)
{
if
(
lid_cache
[
i
].
lid
==
lid
)
{
return
lid_cache
[
i
].
name
;
}
}
return
NULL
;
}
/* Check lid cache for a
given lid
and return the
associated
network
_
id
/* Check lid cache for a
n adapter name
and return the network
id
.
*
*
* Used by: slurmd
* Used by: slurmd
*/
*/
static
uint16_t
static
uint16_t
_get_network_id_from_
lid
(
int
lid
)
_get_network_id_from_
adapter
(
char
*
adapter_name
)
{
{
int
i
;
int
i
;
for
(
i
=
0
;
i
<
FED_MAXADAPTERS
;
i
++
)
{
for
(
i
=
0
;
i
<
FED_MAXADAPTERS
;
i
++
)
{
if
(
lid_cache
[
i
].
lid
==
lid
)
{
if
(
!
strncmp
(
adapter_name
,
lid_cache
[
i
].
name
,
FED_ADAPTERNAME_LEN
))
return
lid_cache
[
i
].
network_id
;
return
lid_cache
[
i
].
network_id
;
}
}
}
return
-
1
;
return
(
uint16_t
)
-
1
;
}
}
/* Check lid cache for an adapter name and return the lid.
*
* Used by: slurmd
*/
static
uint16_t
static
uint16_t
_get_
network_
id_from_adapter
(
char
*
adapter_name
)
_get_
l
id_from_adapter
(
char
*
adapter_name
)
{
{
int
i
;
int
i
;
for
(
i
=
0
;
i
<
FED_MAXADAPTERS
;
i
++
)
{
for
(
i
=
0
;
i
<
FED_MAXADAPTERS
;
i
++
)
{
if
(
!
strncmp
(
adapter_name
,
lid_cache
[
i
].
name
,
if
(
!
strncmp
(
adapter_name
,
lid_cache
[
i
].
name
,
FED_ADAPTERNAME_LEN
))
FED_ADAPTERNAME_LEN
))
return
lid_cache
[
i
].
network_
id
;
return
lid_cache
[
i
].
l
id
;
}
}
return
(
uint16_t
)
-
1
;
return
(
uint16_t
)
-
1
;
}
}
/* Explicitly strip out carriage-return and new-line */
/* Explicitly strip out carriage-return and new-line */
static
void
_strip_cr_nl
(
char
*
line
)
static
void
_strip_cr_nl
(
char
*
line
)
{
{
...
@@ -1818,23 +1806,26 @@ fed_unload_table(fed_jobinfo_t *jp)
...
@@ -1818,23 +1806,26 @@ fed_unload_table(fed_jobinfo_t *jp)
{
{
int
i
,
j
;
int
i
,
j
;
int
err
;
int
err
;
char
*
adapter
;
char
*
adapter
_name
;
NTBL
**
table
;
NTBL
**
table
;
uint32_t
table_length
;
uint32_t
table_length
;
int
local_lid
;
assert
(
jp
);
assert
(
jp
);
assert
(
jp
->
magic
==
FED_JOBINFO_MAGIC
);
assert
(
jp
->
magic
==
FED_JOBINFO_MAGIC
);
for
(
i
=
0
;
i
<
jp
->
tables_per_task
;
i
++
)
{
for
(
i
=
0
;
i
<
jp
->
tables_per_task
;
i
++
)
{
table
=
jp
->
tableinfo
[
i
].
table
;
table
=
jp
->
tableinfo
[
i
].
table
;
table_length
=
jp
->
tableinfo
[
i
].
table_length
;
table_length
=
jp
->
tableinfo
[
i
].
table_length
;
adapter_name
=
jp
->
tableinfo
[
i
].
adapter_name
;
local_lid
=
_get_lid_from_adapter
(
adapter_name
);
for
(
j
=
0
;
j
<
table_length
;
j
++
)
{
for
(
j
=
0
;
j
<
table_length
;
j
++
)
{
adapter
=
_get_adapter_from_lid
(
table
[
j
]
->
lid
);
if
(
table
[
j
]
->
lid
!=
local_lid
)
if
(
adapter
==
NULL
)
continue
;
continue
;
debug3
(
" freeing adapter %s window %d job_key %d"
,
debug3
(
"freeing adapter %s lid %d window %d job_key %d"
,
adapter
,
table
[
j
]
->
window_id
,
jp
->
job_key
);
adapter_name
,
table
[
j
]
->
lid
,
err
=
ntbl_unload_window
(
NTBL_VERSION
,
adapter
,
table
[
j
]
->
window_id
,
jp
->
job_key
);
err
=
ntbl_unload_window
(
NTBL_VERSION
,
adapter_name
,
jp
->
job_key
,
jp
->
job_key
,
table
[
j
]
->
window_id
);
table
[
j
]
->
window_id
);
if
(
err
!=
NTBL_SUCCESS
)
{
if
(
err
!=
NTBL_SUCCESS
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment