Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
Pablo
dice
Commits
0fcf5271
Commit
0fcf5271
authored
4 years ago
by
Pablo
Browse files
Options
Download
Email Patches
Plain Diff
Some fixes
parent
4ecdc540
master
imss_flusher
imss_output
rados
recursive_dirs
s3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
CMakeLists.txt
+5
-2
CMakeLists.txt
src/CMakeLists.txt
+0
-6
src/CMakeLists.txt
tests/main_bntest.cpp
+14
-13
tests/main_bntest.cpp
tests/main_filetest.cpp
+21
-18
tests/main_filetest.cpp
tests/main_outtest.cpp
+5
-5
tests/main_outtest.cpp
vendors/lib-imss
+1
-1
vendors/lib-imss
with
46 additions
and
45 deletions
+46
-45
CMakeLists.txt
+
5
-
2
View file @
0fcf5271
...
...
@@ -25,9 +25,12 @@ endif (ENABLE_HDFS)
if
(
ENABLE_IMSS
)
MESSAGE
(
STATUS
"Added support for IMSS"
)
add_definitions
(
-DASPIDE_SUPPORT_IMSS
)
add_subdirectory
(
vendors/lib-imss
)
include
(
FindPkgConfig
)
pkg_check_modules
(
GLIB glib-2.0 REQUIRED
)
INCLUDE_DIRECTORIES
(
"
${
CMAKE_SOURCE_DIR
}
/vendors/lib-imss/inc"
)
INCLUDE_DIRECTORIES
(
"
${
PROJECT_SOURCE_DIR
}
/include/imss"
)
INCLUDE_DIRECTORIES
(
"
${
PROJECT_SOURCE_DIR
}
/vendors/lib-imss/inc"
)
LINK_DIRECTORIES
(
"
${
PROJECT_BINARY_DIR
}
/vendors/lib-imss/app"
)
add_subdirectory
(
vendors/lib-imss
)
endif
(
ENABLE_IMSS
)
...
...
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
0
-
6
View file @
0fcf5271
...
...
@@ -9,14 +9,8 @@ endif (ENABLE_HDFS)
if
(
ENABLE_IMSS
)
include
(
FindPkgConfig
)
pkg_check_modules
(
GLIB glib-2.0 REQUIRED
)
INCLUDE_DIRECTORIES
(
"
${
CMAKE_SOURCE_DIR
}
/vendors/lib-imss/inc"
)
LINK_DIRECTORIES
(
"
${
PROJECT_BINARY_DIR
}
/vendors/lib-imss/app"
)
link_directories
(
${
IMSS_BUILD_PATH
}
)
file
(
GLOB cont_imss
"imss/*.cpp"
)
list
(
APPEND base_link
${
MPI_LIBRARIES
}
imss
${
GLIB_LIBRARIES
}
)
message
(
STATUS
"IMSS enabled "
${
IMSS_BUILD_PATH
}
)
endif
(
ENABLE_IMSS
)
#Base text container srcs
...
...
This diff is collapsed.
Click to expand it.
tests/main_bntest.cpp
+
14
-
13
View file @
0fcf5271
...
...
@@ -6,14 +6,16 @@
#ifdef ASPIDE_SUPPORT_IMSS
#include
"imss.h"
#include
"hercules.h"
#endif
#include
"mpi.h"
//Test IMSS deploy
void
deploy_imss_test
(
char
**
data
,
int
dlen
);
bool
imss
=
false
;
int32_t
datasetd
;
bool
imss_
=
false
;
int32_t
datasetd_
;
int
rank
;
int
main
(
int
argc
,
char
**
argv
){
...
...
@@ -65,11 +67,11 @@ int main(int argc, char ** argv){
std
::
cout
<<
a_occ
<<
'\n'
;
#ifdef ASPIDE_SUPPORT_IMSS
if
(
imss
){
release_dataset
(
datasetd
)
if
(
imss
_
){
release_dataset
(
datasetd
_
);
release_imss
(
argv
[
1
],
CLOSE_ATTACHED
);
release
_stat
();
hercules_release
();
stat_
release
();
hercules_release
(
rank
);
MPI_Barrier
(
MPI_COMM_WORLD
);
MPI_Finalize
();
}
...
...
@@ -86,18 +88,17 @@ int main(int argc, char ** argv){
void
deploy_imss_test
(
char
**
data
,
int
dlen
){
//Check args number
if
(
dlen
!=
4
)
exit
(
-
1
);
if
(
dlen
!=
3
)
exit
(
-
1
);
//Itit MPI
MPI_Init
(
NULL
,
NULL
);
imss
=
true
;
imss
_
=
true
;
int
rank
;
//Get MPI rank
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
)
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
)
;
//Hercules init -- Attached deploy
if
(
hercules_init
(
rank
,
2048
,
5555
,
5569
,
1024
,
"./metadata"
)
==
-
1
)
return
-
1
;
if
(
hercules_init
(
rank
,
2048
,
5555
,
5569
,
1024
,
"./metadata"
)
==
-
1
)
exit
(
-
1
)
;
//Metadata server
if
(
stat_init
(
data
[
1
],
5569
,
rank
)
==
-
1
)
exit
(
-
1
);
...
...
@@ -106,7 +107,7 @@ void deploy_imss_test(char ** data, int dlen){
if
(
init_imss
(
data
[
0
],
data
[
2
],
4
,
5555
,
1024
,
ATTACHED
,
NULL
)
==
-
1
)
exit
(
-
1
);
//Create dataset, 1 Block of 1 Kbyte
if
((
datasetd
=
create_dataset
(
data
[
0
],
"RR"
,
3
,
1
,
NONE
))
<
0
)
exit
(
-
1
);
if
((
datasetd
_
=
create_dataset
(
data
[
0
],
"RR"
,
3
,
1
,
NONE
))
<
0
)
exit
(
-
1
);
//Dump data -- Remark: DATA MUST BE IN DYNAMIC MEMORY
for
(
int
i
=
0
;
i
<
3
;
++
i
){
...
...
@@ -118,7 +119,7 @@ void deploy_imss_test(char ** data, int dlen){
memcpy
(
buffer
,
testdata
,
strlen
(
testdata
));
//Set the data in 2 Blocks
int32_t
data_sent
=
set_data
(
datasetd
,
i
,
(
unsigned
char
*
)
buffer
);
int32_t
data_sent
=
set_data
(
datasetd
_
,
i
,
(
unsigned
char
*
)
buffer
);
}
}
...
...
This diff is collapsed.
Click to expand it.
tests/main_filetest.cpp
+
21
-
18
View file @
0fcf5271
#include
"text_in_container.hpp"
#include
<iostream>
#include
<string.h>
#include
"mpi.h"
#ifdef ASPIDE_SUPPORT_IMSS
#include
"imss.h"
#include
"mpi.h"
#include
"hercules.h"
#endif
/*
...
...
@@ -16,8 +17,9 @@
*/
void
deploy_imss_test
(
char
**
data
,
int
dlen
);
bool
imss
=
false
;
int32_t
datasetd
;
bool
imss_
=
false
;
int32_t
datasetd_
;
int
rank
;
int
main
(
int
argc
,
char
**
argv
){
...
...
@@ -70,11 +72,11 @@ int main(int argc, char ** argv){
for
(
auto
line
:
mytest
)
std
::
cout
<<
line
<<
std
::
endl
;
#ifdef ASPIDE_SUPPORT_IMSS
if
(
imss
){
release_dataset
(
datasetd
)
if
(
imss
_
){
release_dataset
(
datasetd
_
);
release_imss
(
argv
[
1
],
CLOSE_ATTACHED
);
release
_stat
();
hercules_release
();
stat_
release
();
hercules_release
(
rank
);
MPI_Barrier
(
MPI_COMM_WORLD
);
MPI_Finalize
();
}
...
...
@@ -91,27 +93,27 @@ int main(int argc, char ** argv){
void
deploy_imss_test
(
char
**
data
,
int
dlen
){
//Check args number
if
(
dlen
!=
4
)
exit
(
-
1
);
if
(
dlen
!=
3
)
exit
(
-
1
);
//Itit MPI
MPI_Init
(
NULL
,
NULL
);
imss
=
true
;
//
MPI_Init(NULL, NULL);
imss
_
=
true
;
int
rank
;
//Get MPI rank
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
)
//MPI_Comm_rank(MPI_COMM_WORLD, &rank);
rank
=
0
;
//Hercules init -- Attached deploy
if
(
hercules_init
(
rank
,
2048
,
5555
,
5569
,
1024
,
"./metadata"
)
==
-
1
)
return
-
1
;
if
(
hercules_init
(
rank
,
2048
,
5555
,
5569
,
1024
,
"./metadata"
)
==
-
1
)
exit
(
-
1
)
;
//Metadata server
if
(
stat_init
(
data
[
1
],
5569
,
rank
)
==
-
1
)
exit
(
-
1
);
//Imss deploy
if
(
init_imss
(
data
[
0
]
,
data
[
2
],
4
,
5555
,
1024
,
ATTACHED
,
NULL
)
==
-
1
)
exit
(
-
1
);
if
(
init_imss
(
"imss://"
,
data
[
2
],
1
,
5555
,
1024
,
ATTACHED
,
NULL
)
==
-
1
)
exit
(
-
1
);
//Create dataset, 1 Block of 1 Kbyte
if
((
datasetd
=
create_dataset
(
data
[
0
],
"RR"
,
3
,
1
,
NONE
))
<
0
)
exit
(
-
1
);
if
((
datasetd
_
=
create_dataset
(
data
[
0
],
"RR"
,
3
,
1
,
NONE
))
<
0
)
exit
(
-
1
);
//Dump data -- Remark: DATA MUST BE IN DYNAMIC MEMORY
for
(
int
i
=
0
;
i
<
3
;
++
i
){
...
...
@@ -123,8 +125,9 @@ void deploy_imss_test(char ** data, int dlen){
memcpy
(
buffer
,
testdata
,
strlen
(
testdata
));
//Set the data in 2 Blocks
int32_t
data_sent
=
set_data
(
datasetd
,
i
,
(
unsigned
char
*
)
buffer
);
int32_t
data_sent
=
set_data
(
datasetd
_
,
i
,
(
unsigned
char
*
)
buffer
);
}
release_dataset
(
datasetd_
);
}
#endif
\ No newline at end of file
#endif
This diff is collapsed.
Click to expand it.
tests/main_outtest.cpp
+
5
-
5
View file @
0fcf5271
...
...
@@ -14,7 +14,7 @@
void
deploy_imss_test
(
char
**
data
,
int
dlen
);
bool
imss_
=
false
;
int32_t
datasetd
;
int32_t
datasetd
_
;
int
rank
;
int
main
(
int
argc
,
char
**
argv
){
...
...
@@ -54,7 +54,7 @@ int main(int argc, char ** argv){
#ifdef ASPIDE_SUPPORT_IMSS
if
(
imss_
){
release_dataset
(
datasetd
);
release_dataset
(
datasetd
_
);
release_imss
(
argv
[
1
],
CLOSE_ATTACHED
);
stat_release
();
hercules_release
(
rank
);
...
...
@@ -73,7 +73,7 @@ int main(int argc, char ** argv){
void
deploy_imss_test
(
char
**
data
,
int
dlen
){
//Check args number
if
(
dlen
!=
4
)
exit
(
-
1
);
if
(
dlen
!=
3
)
exit
(
-
1
);
//Itit MPI
MPI_Init
(
NULL
,
NULL
);
...
...
@@ -92,7 +92,7 @@ void deploy_imss_test(char ** data, int dlen){
if
(
init_imss
(
data
[
0
],
data
[
2
],
4
,
5555
,
1024
,
ATTACHED
,
NULL
)
==
-
1
)
exit
(
-
1
);
//Create dataset, 1 Block of 1 Kbyte
if
((
datasetd
=
create_dataset
(
data
[
0
],
"RR"
,
3
,
1
,
NONE
))
<
0
)
exit
(
-
1
);
if
((
datasetd
_
=
create_dataset
(
data
[
0
],
"RR"
,
3
,
1
,
NONE
))
<
0
)
exit
(
-
1
);
//Dump data -- Remark: DATA MUST BE IN DYNAMIC MEMORY
for
(
int
i
=
0
;
i
<
3
;
++
i
){
...
...
@@ -104,7 +104,7 @@ void deploy_imss_test(char ** data, int dlen){
memcpy
(
buffer
,
testdata
,
strlen
(
testdata
));
//Set the data in 2 Blocks
int32_t
data_sent
=
set_data
(
datasetd
,
i
,
(
unsigned
char
*
)
buffer
);
int32_t
data_sent
=
set_data
(
datasetd
_
,
i
,
(
unsigned
char
*
)
buffer
);
}
}
...
...
This diff is collapsed.
Click to expand it.
lib-imss
@
a71fb83c
Compare
e454ea5a
...
a71fb83c
Subproject commit
e454ea5a92b84ba3db8505f701d9bd1eb36f95ad
Subproject commit
a71fb83ceb953afdb331f3ddb1e8715de0ae20f7
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets