Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SWP-CM22-Planbased OMPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
felixkhals
SWP-CM22-Planbased OMPI
Merge requests
!2
Fix buffer size specification in function calls
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix buffer size specification in function calls
bugfix/buffer_length
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
felixkhals
requested to merge
bugfix/buffer_length
into
master
2 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
to send(), recv() and snprintf()
0
0
Merge request reports
Compare
master
version 1
9a7c54ce
2 years ago
master (base)
and
latest version
latest version
28950f55
1 commit,
2 years ago
version 1
9a7c54ce
3 commits,
2 years ago
1 file
+
3
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
ompi/communicator/comm_init.c
+
3
−
3
Options
@@ -138,15 +138,15 @@ static int getProcessAgentRank(uint32_t jobid, uint32_t vpid, size_t size) {
pid_t
pid
=
getpid
();
char
info_to_send
[
BUFFLEN
];
snprintf
(
info_to_send
,
BUFFLEN
+
1
,
snprintf
(
info_to_send
,
BUFFLEN
,
"%d,%u,%u,%zu"
,
pid
,
vpid
,
jobid
,
size
);
if
(
send
(
socket_fd
,
info_to_send
,
BUFFLEN
+
1
,
0
)
<
0
)
{
if
(
send
(
socket_fd
,
info_to_send
,
BUFFLEN
,
0
)
<
0
)
{
errorExit
(
"send"
);
}
char
rank_to_recv
[
BUFFLEN
];
recv
(
socket_fd
,
rank_to_recv
,
BUFFLEN
+
1
,
0
);
recv
(
socket_fd
,
rank_to_recv
,
BUFFLEN
,
0
);
int
received_rank
=
(
int
)
strtol
(
rank_to_recv
,
NULL
,
0
);
printf
(
"Received from server: %d
\n
"
,
received_rank
);
Loading