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
02d6f6a5
Commit
02d6f6a5
authored
10 years ago
by
Danny Auble
Browse files
Options
Downloads
Patches
Plain Diff
Alter tests to use uint64_t instead of long long unsigned ints
parent
da8409c0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
testsuite/expect/test1.89.prog.c
+6
-3
6 additions, 3 deletions
testsuite/expect/test1.89.prog.c
testsuite/expect/test1.91.prog.c
+8
-5
8 additions, 5 deletions
testsuite/expect/test1.91.prog.c
with
14 additions
and
8 deletions
testsuite/expect/test1.89.prog.c
+
6
−
3
View file @
02d6f6a5
...
@@ -33,6 +33,9 @@
...
@@ -33,6 +33,9 @@
#include
<stdio.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<stdlib.h>
#include
<string.h>
#include
<string.h>
#include
<stdint.h>
#include
<inttypes.h>
#include
"config.h"
#include
"config.h"
static
void
_load_mask
(
cpu_set_t
*
mask
)
static
void
_load_mask
(
cpu_set_t
*
mask
)
...
@@ -52,9 +55,9 @@ static void _load_mask(cpu_set_t *mask)
...
@@ -52,9 +55,9 @@ static void _load_mask(cpu_set_t *mask)
}
}
}
}
static
long
long
unsigned
in
t
_mask_to_int
(
cpu_set_t
*
mask
)
static
uint64_
t
_mask_to_int
(
cpu_set_t
*
mask
)
{
{
long
long
unsigned
in
t
i
,
rc
=
0
;
uint64_
t
i
,
rc
=
0
;
for
(
i
=
0
;
i
<
CPU_SETSIZE
;
i
++
)
{
for
(
i
=
0
;
i
<
CPU_SETSIZE
;
i
++
)
{
if
(
CPU_ISSET
(
i
,
mask
))
if
(
CPU_ISSET
(
i
,
mask
))
rc
+=
(
1
<<
i
);
rc
+=
(
1
<<
i
);
...
@@ -77,6 +80,6 @@ main (int argc, char **argv)
...
@@ -77,6 +80,6 @@ main (int argc, char **argv)
exit
(
1
);
exit
(
1
);
}
}
task_id
=
atoi
(
task_str
);
task_id
=
atoi
(
task_str
);
printf
(
"TASK_ID:%d,MASK:%
llu
\n
"
,
task_id
,
_mask_to_int
(
&
mask
));
printf
(
"TASK_ID:%d,MASK:%
"
PRIu64
"
\n
"
,
task_id
,
_mask_to_int
(
&
mask
));
exit
(
0
);
exit
(
0
);
}
}
This diff is collapsed.
Click to expand it.
testsuite/expect/test1.91.prog.c
+
8
−
5
View file @
02d6f6a5
...
@@ -33,6 +33,9 @@
...
@@ -33,6 +33,9 @@
#include
<stdio.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<stdlib.h>
#include
<string.h>
#include
<string.h>
#include
<stdint.h>
#include
<inttypes.h>
#include
"config.h"
#include
"config.h"
static
void
_load_mask
(
cpu_set_t
*
mask
)
static
void
_load_mask
(
cpu_set_t
*
mask
)
...
@@ -52,17 +55,17 @@ static void _load_mask(cpu_set_t *mask)
...
@@ -52,17 +55,17 @@ static void _load_mask(cpu_set_t *mask)
}
}
}
}
static
long
long
unsigned
int
_mask_to_int
(
cpu_set_t
*
mask
)
static
uint64_t
_mask_to_int
(
cpu_set_t
*
mask
)
{
{
long
long
unsigned
in
t
i
,
rc
=
0
;
uint64_
t
i
,
rc
=
0
;
for
(
i
=
0
;
i
<
CPU_SETSIZE
;
i
++
)
{
for
(
i
=
0
;
i
<
CPU_SETSIZE
;
i
++
)
{
if
(
CPU_ISSET
(
i
,
mask
))
if
(
CPU_ISSET
(
i
,
mask
))
rc
+=
(
(
long
long
unsigned
int
)
1
<<
i
);
rc
+=
(
1
<<
i
);
}
}
return
rc
;
return
rc
;
}
}
main
(
int
argc
,
char
**
argv
)
main
(
int
argc
,
char
**
argv
)
{
{
char
*
task_str
;
char
*
task_str
;
...
@@ -77,6 +80,6 @@ main (int argc, char **argv)
...
@@ -77,6 +80,6 @@ main (int argc, char **argv)
exit
(
1
);
exit
(
1
);
}
}
task_id
=
atoi
(
task_str
);
task_id
=
atoi
(
task_str
);
printf
(
"TASK_ID:%d,MASK:%
llu
\n
"
,
task_id
,
_mask_to_int
(
&
mask
));
printf
(
"TASK_ID:%d,MASK:%
"
PRIu64
"
\n
"
,
task_id
,
_mask_to_int
(
&
mask
));
exit
(
0
);
exit
(
0
);
}
}
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