-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparfu_rank_move_data.hh
93 lines (74 loc) · 2.46 KB
/
parfu_rank_move_data.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
////////////////////////////////////////////////////////////////////////////////
//
// University of Illinois/NCSA Open Source License
// http://otm.illinois.edu/disclose-protect/illinois-open-source-license
//
// Parfu is copyright (c) 2017-2022,
// by The Trustees of the University of Illinois.
// All rights reserved.
//
// Parfu was developed by:
// The University of Illinois
// The National Center For Supercomputing Applications (NCSA)
// Blue Waters Science and Engineering Applications Support Team (SEAS)
// Craig P Steffen <[email protected]>
// Roland Haas <[email protected]>
//
// https://github.com/ncsa/parfu_archive_tool
// http://www.ncsa.illinois.edu/People/csteffen/parfu/
//
// For full licnse text see the LICENSE file provided with the source
// distribution.
//
////////////////////////////////////////////////////////////////////////////////
#ifndef PARFU_RANK_MOVE_DATA_HH__
#define PARFU_RANK_MOVE_DATA_HH__
//#include "parfu_main.hh"
//#include "parfu_2021_legacy.hh"
//#include "parfu_primary.h"
void parfu_make_tar_header_at(string full_filename,
void* current_bucket_buffer,
unsigned long location_in_bucket);
// each of this is one move order for either a file or a file slice
typedef struct{
int file_index;
string rel_filename;
char file_type;
string symlink_target;
unsigned long file_size;
unsigned header_size;
unsigned long position_in_archive;
unsigned long offset_in_file;
}parfu_move_order_t;
#endif
/////////////////////////////
//
class Parfu_rank_order_set
{
public:
// construct an order set from a buffer with
// text order instructions
Parfu_rank_order_set(string order_buffer);
int move_data_Create(string base_path,
unsigned long bucket_size,
MPI_File *my_file_handle);
int n_orders(void);
unsigned long total_size(void);
string order_n_filename(int order_index);
private:
vector <parfu_move_order_t> orders;
};
/*
std::vector<char> temp_file_header_C;
tarentry my_tar_header_C;
if(!(myl->list[current_entry].location_in_orig_file)){
my_tar_header_C = tarentry(myl->list[current_entry].relative_filename,0);
temp_file_header_C = my_tar_header_C.make_tar_header();
std::copy(temp_file_header_C.begin(), temp_file_header_C.end(),
((((char*)(transfer_buffer))+
((myl->list[current_entry].location_in_archive_file -
current_bucket_loc)
- myl->list[current_entry].our_tar_header_size)
)));
}
*/