Skip to content

Commit

Permalink
Update 01-Parallel-IO-posix.md
Browse files Browse the repository at this point in the history
  • Loading branch information
csccva authored Apr 30, 2024
1 parent 6dc8000 commit 48eec3f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions parallel-io/docs/01-Parallel-IO-posix.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,21 @@ thousands of nodes on the supercomputer to physical disks
- Also stripe size can be specified, see *man lfs* for details
- Proper striping can enhance I/O performance a lot

# Lustre file striping in C codes
- The striping policy for files within an application
-
```c
...
#include <lustre/lustraapi.h>
int main(int argc, char **argv){
int fd;
char fname[]="lfile";
unsigned long long stripe_size;
int stripe_count, stripe_pattern=0, stripe_offset=-1;
// Try to create file
stripe_size=1048576; stripe_count=4;
fd=llapi_file_open(fname,O_CREAT|O_RDWR,S_IRWXU,stripe_size,stripe_offset,stripe_count,stripe_pattern);
```
# Performance with Lustre striping
Expand Down

0 comments on commit 48eec3f

Please sign in to comment.