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
b8b472f0
Commit
b8b472f0
authored
22 years ago
by
tewk
Browse files
Options
Downloads
Patches
Plain Diff
Removed \n on logging calls
parent
28338825
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
src/common/slurm_protocol_api.c
+3
-3
3 additions, 3 deletions
src/common/slurm_protocol_api.c
src/common/slurm_protocol_socket_implementation.c
+12
-36
12 additions, 36 deletions
src/common/slurm_protocol_socket_implementation.c
with
15 additions
and
39 deletions
src/common/slurm_protocol_api.c
+
3
−
3
View file @
b8b472f0
...
@@ -169,7 +169,7 @@ int slurm_receive_msg ( slurm_fd open_fd , slurm_msg_t * msg )
...
@@ -169,7 +169,7 @@ int slurm_receive_msg ( slurm_fd open_fd , slurm_msg_t * msg )
if
(
(
rc
=
_slurm_msg_recvfrom
(
open_fd
,
buffer
,
receive_len
,
SLURM_PROTOCOL_NO_SEND_RECV_FLAGS
,
&
(
msg
)
->
address
)
)
==
SLURM_SOCKET_ERROR
)
if
(
(
rc
=
_slurm_msg_recvfrom
(
open_fd
,
buffer
,
receive_len
,
SLURM_PROTOCOL_NO_SEND_RECV_FLAGS
,
&
(
msg
)
->
address
)
)
==
SLURM_SOCKET_ERROR
)
{
{
info
(
"Error recieving msg socket: errno %i
\n
"
,
errno
)
;
info
(
"Error recieving msg socket: errno %i"
,
errno
)
;
return
rc
;
return
rc
;
}
}
...
@@ -240,7 +240,7 @@ int slurm_send_node_msg ( slurm_fd open_fd , slurm_msg_t * msg )
...
@@ -240,7 +240,7 @@ int slurm_send_node_msg ( slurm_fd open_fd , slurm_msg_t * msg )
/* send msg */
/* send msg */
if
(
(
rc
=
_slurm_msg_sendto
(
open_fd
,
buf_temp
,
SLURM_PROTOCOL_MAX_MESSAGE_BUFFER_SIZE
-
pack_len
,
SLURM_PROTOCOL_NO_SEND_RECV_FLAGS
,
&
msg
->
address
)
)
==
SLURM_SOCKET_ERROR
)
if
(
(
rc
=
_slurm_msg_sendto
(
open_fd
,
buf_temp
,
SLURM_PROTOCOL_MAX_MESSAGE_BUFFER_SIZE
-
pack_len
,
SLURM_PROTOCOL_NO_SEND_RECV_FLAGS
,
&
msg
->
address
)
)
==
SLURM_SOCKET_ERROR
)
{
{
info
(
"Error sending msg socket: errno %i
\n
"
,
errno
)
;
info
(
"Error sending msg socket: errno %i"
,
errno
)
;
}
}
return
rc
;
return
rc
;
}
}
...
@@ -265,7 +265,7 @@ int slurm_receive_buffer ( slurm_fd open_fd , slurm_addr * source_address , slur
...
@@ -265,7 +265,7 @@ int slurm_receive_buffer ( slurm_fd open_fd , slurm_addr * source_address , slur
if
(
(
rc
=
_slurm_msg_recvfrom
(
open_fd
,
buffer
,
receive_len
,
SLURM_PROTOCOL_NO_SEND_RECV_FLAGS
,
source_address
)
)
==
SLURM_SOCKET_ERROR
)
;
if
(
(
rc
=
_slurm_msg_recvfrom
(
open_fd
,
buffer
,
receive_len
,
SLURM_PROTOCOL_NO_SEND_RECV_FLAGS
,
source_address
)
)
==
SLURM_SOCKET_ERROR
)
;
{
{
info
(
"Error recieving msg socket: errno %i
\n
"
,
errno
)
;
info
(
"Error recieving msg socket: errno %i"
,
errno
)
;
return
rc
;
return
rc
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/common/slurm_protocol_socket_implementation.c
+
12
−
36
View file @
b8b472f0
...
@@ -48,7 +48,6 @@ int _slurm_close_accepted_conn ( slurm_fd open_fd )
...
@@ -48,7 +48,6 @@ int _slurm_close_accepted_conn ( slurm_fd open_fd )
ssize_t
_slurm_msg_recvfrom
(
slurm_fd
open_fd
,
char
*
buffer
,
size_t
size
,
uint32_t
flags
,
slurm_addr
*
slurm_address
)
ssize_t
_slurm_msg_recvfrom
(
slurm_fd
open_fd
,
char
*
buffer
,
size_t
size
,
uint32_t
flags
,
slurm_addr
*
slurm_address
)
{
{
/* slurm_fd connection_fd ; */
size_t
recv_len
;
size_t
recv_len
;
char
size_buffer_temp
[
8
]
;
char
size_buffer_temp
[
8
]
;
...
@@ -58,17 +57,9 @@ ssize_t _slurm_msg_recvfrom ( slurm_fd open_fd, char *buffer , size_t size , uin
...
@@ -58,17 +57,9 @@ ssize_t _slurm_msg_recvfrom ( slurm_fd open_fd, char *buffer , size_t size , uin
unsigned
int
transmit_size
;
unsigned
int
transmit_size
;
unsigned
int
total_len
;
unsigned
int
total_len
;
/*
if ( ( connection_fd = _slurm_accept_stream ( open_fd , slurm_address ) ) == SLURM_SOCKET_ERROR )
{
info ( "Error opening stream socket to receive msg datagram emulation layer\n" ) ;
return connection_fd ;
}
if ( ( recv_len = _slurm_recv ( connection_fd , size_buffer_temp , sizeof ( uint32_t ) , NO_SEND_RECV_FLAGS ) ) != sizeof ( uint32_t ) )
*/
if
(
(
recv_len
=
_slurm_recv
(
open_fd
,
size_buffer_temp
,
sizeof
(
uint32_t
)
,
SLURM_PROTOCOL_NO_SEND_RECV_FLAGS
)
)
!=
sizeof
(
uint32_t
)
)
if
(
(
recv_len
=
_slurm_recv
(
open_fd
,
size_buffer_temp
,
sizeof
(
uint32_t
)
,
SLURM_PROTOCOL_NO_SEND_RECV_FLAGS
)
)
!=
sizeof
(
uint32_t
)
)
{
{
info
(
"Error receiving length of datagram. Total bytes received %i
\n
"
,
recv_len
)
;
info
(
"Error receiving length of datagram. Total bytes received %i"
,
recv_len
)
;
return
0
;
return
0
;
}
}
unpack32
(
&
transmit_size
,
(
void
**
)
&
size_buffer
,
&
size_buffer_len
)
;
unpack32
(
&
transmit_size
,
(
void
**
)
&
size_buffer
,
&
size_buffer_len
)
;
...
@@ -76,10 +67,9 @@ ssize_t _slurm_msg_recvfrom ( slurm_fd open_fd, char *buffer , size_t size , uin
...
@@ -76,10 +67,9 @@ ssize_t _slurm_msg_recvfrom ( slurm_fd open_fd, char *buffer , size_t size , uin
total_len
=
0
;
total_len
=
0
;
while
(
total_len
<
transmit_size
)
while
(
total_len
<
transmit_size
)
{
{
/* if ( ( recv_len = _slurm_recv ( connection_fd , buffer , transmit_size , NO_SEND_RECV_FLAGS ) ) == SLURM_SOCKET_ERROR ) */
if
(
(
recv_len
=
_slurm_recv
(
open_fd
,
moving_buffer
,
transmit_size
,
SLURM_PROTOCOL_NO_SEND_RECV_FLAGS
)
)
==
SLURM_SOCKET_ERROR
)
if
(
(
recv_len
=
_slurm_recv
(
open_fd
,
moving_buffer
,
transmit_size
,
SLURM_PROTOCOL_NO_SEND_RECV_FLAGS
)
)
==
SLURM_SOCKET_ERROR
)
{
{
info
(
"Error receiving length of datagram. errno %i
\n
"
,
errno
)
;
info
(
"Error receiving length of datagram. errno %i"
,
errno
)
;
return
recv_len
;
return
recv_len
;
}
}
if
(
recv_len
>=
0
)
if
(
recv_len
>=
0
)
...
@@ -88,15 +78,12 @@ ssize_t _slurm_msg_recvfrom ( slurm_fd open_fd, char *buffer , size_t size , uin
...
@@ -88,15 +78,12 @@ ssize_t _slurm_msg_recvfrom ( slurm_fd open_fd, char *buffer , size_t size , uin
moving_buffer
+=
recv_len
;
moving_buffer
+=
recv_len
;
}
}
}
}
/*
_slurm_close ( connection_fd ) ;
*/
return
total_len
;
return
total_len
;
}
}
ssize_t
_slurm_msg_sendto
(
slurm_fd
open_fd
,
char
*
buffer
,
size_t
size
,
uint32_t
flags
,
slurm_addr
*
slurm_address
)
ssize_t
_slurm_msg_sendto
(
slurm_fd
open_fd
,
char
*
buffer
,
size_t
size
,
uint32_t
flags
,
slurm_addr
*
slurm_address
)
{
{
/* slurm_fd connection_fd ; */
size_t
send_len
;
size_t
send_len
;
char
size_buffer_temp
[
8
]
;
char
size_buffer_temp
[
8
]
;
...
@@ -104,29 +91,18 @@ ssize_t _slurm_msg_sendto ( slurm_fd open_fd, char *buffer , size_t size , uint3
...
@@ -104,29 +91,18 @@ ssize_t _slurm_msg_sendto ( slurm_fd open_fd, char *buffer , size_t size , uint3
unsigned
int
size_buffer_len
=
8
;
unsigned
int
size_buffer_len
=
8
;
pack32
(
size
,
(
void
**
)
&
size_buffer
,
&
size_buffer_len
)
;
pack32
(
size
,
(
void
**
)
&
size_buffer
,
&
size_buffer_len
)
;
/*
if ( ( connection_fd = _slurm_open_stream ( slurm_address ) ) ==SLURM_SOCKET_ERROR )
{
info ( "Error opening stream socket to send msg datagram emulation layer\n" ) ;
return connection_fd ;
}
if ( ( send_len = _slurm_send ( connection_fd , size_buffer_temp , sizeof ( uint32_t ) , NO_SEND_RECV_FLAGS ) ) != sizeof ( uint32_t ) )
*/
if
(
(
send_len
=
_slurm_send
(
open_fd
,
size_buffer_temp
,
sizeof
(
uint32_t
)
,
SLURM_PROTOCOL_NO_SEND_RECV_FLAGS
)
)
!=
sizeof
(
uint32_t
)
)
if
(
(
send_len
=
_slurm_send
(
open_fd
,
size_buffer_temp
,
sizeof
(
uint32_t
)
,
SLURM_PROTOCOL_NO_SEND_RECV_FLAGS
)
)
!=
sizeof
(
uint32_t
)
)
{
{
info
(
"Error sending length of datagram
\n
"
)
;
info
(
"Error sending length of datagram"
)
;
}
}
/* send_len = _slurm_send ( connection_fd , buffer , size , NO_SEND_RECV_FLAGS ) ; */
send_len
=
_slurm_send
(
open_fd
,
buffer
,
size
,
SLURM_PROTOCOL_NO_SEND_RECV_FLAGS
)
;
send_len
=
_slurm_send
(
open_fd
,
buffer
,
size
,
SLURM_PROTOCOL_NO_SEND_RECV_FLAGS
)
;
if
(
send_len
!=
size
)
if
(
send_len
!=
size
)
{
{
info
(
"_slurm_msg_sendto only transmitted %i of %i bytes
\n
"
,
send_len
,
size
)
;
info
(
"_slurm_msg_sendto only transmitted %i of %i bytes"
,
send_len
,
size
)
;
}
}
/*
_slurm_close ( connection_fd ) ;
*/
return
send_len
;
return
send_len
;
}
}
...
@@ -142,7 +118,7 @@ slurm_fd _slurm_listen_stream ( slurm_addr * slurm_address )
...
@@ -142,7 +118,7 @@ slurm_fd _slurm_listen_stream ( slurm_addr * slurm_address )
const
int
one
=
1
;
const
int
one
=
1
;
if
(
(
connection_fd
=
_slurm_create_socket
(
SLURM_STREAM
)
)
==
SLURM_SOCKET_ERROR
)
if
(
(
connection_fd
=
_slurm_create_socket
(
SLURM_STREAM
)
)
==
SLURM_SOCKET_ERROR
)
{
{
info
(
"Error creating slurm stream socket: errno %i
\n
"
,
errno
)
;
info
(
"Error creating slurm stream socket: errno %i"
,
errno
)
;
return
connection_fd
;
return
connection_fd
;
}
}
...
@@ -153,13 +129,13 @@ slurm_fd _slurm_listen_stream ( slurm_addr * slurm_address )
...
@@ -153,13 +129,13 @@ slurm_fd _slurm_listen_stream ( slurm_addr * slurm_address )
if
(
(
rc
=
_slurm_bind
(
connection_fd
,
(
struct
sockaddr
const
*
)
slurm_address
,
sizeof
(
slurm_addr
)
)
)
==
SLURM_SOCKET_ERROR
)
if
(
(
rc
=
_slurm_bind
(
connection_fd
,
(
struct
sockaddr
const
*
)
slurm_address
,
sizeof
(
slurm_addr
)
)
)
==
SLURM_SOCKET_ERROR
)
{
{
info
(
"Error binding slurm stream socket: errno %i
\n
"
,
errno
)
;
info
(
"Error binding slurm stream socket: errno %i"
,
errno
)
;
return
rc
;
return
rc
;
}
}
if
(
(
rc
=
_slurm_listen
(
connection_fd
,
SLURM_PROTOCOL_DEFAULT_LISTEN_BACKLOG
)
)
==
SLURM_SOCKET_ERROR
)
if
(
(
rc
=
_slurm_listen
(
connection_fd
,
SLURM_PROTOCOL_DEFAULT_LISTEN_BACKLOG
)
)
==
SLURM_SOCKET_ERROR
)
{
{
info
(
"Error listening on slurm stream socket: errno %i
\n
"
,
errno
)
;
info
(
"Error listening on slurm stream socket: errno %i"
,
errno
)
;
return
rc
;
return
rc
;
}
}
...
@@ -172,7 +148,7 @@ slurm_fd _slurm_accept_stream ( slurm_fd open_fd , slurm_addr * slurm_address )
...
@@ -172,7 +148,7 @@ slurm_fd _slurm_accept_stream ( slurm_fd open_fd , slurm_addr * slurm_address )
slurm_fd
connection_fd
;
slurm_fd
connection_fd
;
if
(
(
connection_fd
=
_slurm_accept
(
open_fd
,
(
struct
sockaddr
*
)
slurm_address
,
&
addr_len
)
)
==
SLURM_SOCKET_ERROR
)
if
(
(
connection_fd
=
_slurm_accept
(
open_fd
,
(
struct
sockaddr
*
)
slurm_address
,
&
addr_len
)
)
==
SLURM_SOCKET_ERROR
)
{
{
info
(
"Error accepting slurm stream socket: errno %i
\n
"
,
errno
)
;
info
(
"Error accepting slurm stream socket: errno %i"
,
errno
)
;
}
}
return
connection_fd
;
return
connection_fd
;
...
@@ -184,13 +160,13 @@ slurm_fd _slurm_open_stream ( slurm_addr * slurm_address )
...
@@ -184,13 +160,13 @@ slurm_fd _slurm_open_stream ( slurm_addr * slurm_address )
slurm_fd
connection_fd
;
slurm_fd
connection_fd
;
if
(
(
connection_fd
=
_slurm_create_socket
(
SLURM_STREAM
)
)
==
SLURM_SOCKET_ERROR
)
if
(
(
connection_fd
=
_slurm_create_socket
(
SLURM_STREAM
)
)
==
SLURM_SOCKET_ERROR
)
{
{
info
(
"Error creating slurm stream socket: errno %i
\n
"
,
errno
)
;
info
(
"Error creating slurm stream socket: errno %i"
,
errno
)
;
return
connection_fd
;
return
connection_fd
;
}
}
if
(
(
rc
=
_slurm_connect
(
connection_fd
,
(
struct
sockaddr
const
*
)
slurm_address
,
sizeof
(
slurm_addr
)
)
)
==
SLURM_SOCKET_ERROR
)
if
(
(
rc
=
_slurm_connect
(
connection_fd
,
(
struct
sockaddr
const
*
)
slurm_address
,
sizeof
(
slurm_addr
)
)
)
==
SLURM_SOCKET_ERROR
)
{
{
info
(
"Error listening on slurm stream socket: errno %i
\n
"
,
errno
)
;
info
(
"Error listening on slurm stream socket: errno %i"
,
errno
)
;
return
rc
;
return
rc
;
}
}
...
...
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