Comments (2)
@k06a That's the purpose of the "direct" writing strategy.
See Program usage for information on how to use it (gpuPlotGenerator help generate
).
See #18 for a windows optimized version. The pre-allocation part needs to be ported to linux and OSX now.
from gpuplotgenerator.
This code works fine for macOS and linux:
unsigned long long file_size = ((unsigned long long) nonces) * PLOT_SIZE;
#ifdef HAVE_FALLOCATE
printf("Using fallocate to expand file size to %lluGB\n", file_size/1024/1024/1024);
ftruncate(ofd, 0);
int ret = fallocate(ofd, FALLOC_FL_UNSHARE, 0, file_size);
if (ret == -1) {
printf("Failed to expand file to size %llu (errno %d - %s).\n", file_size, errno, strerror(errno));
exit(-1);
}
#elif defined(HAVE_POSIX_FALLOCATE)
printf("Using posix_fallocate to expand file size to %lluGB\n", file_size/1024/1024/1024);
ftruncate(ofd, 0);
int ret = posix_fallocate(ofd, 0, file_size);
if (ret == -1) {
printf("Failed to expand file to size %llu (errno %d - %s).\n", file_size, errno, strerror(errno));
exit(-1);
}
#elif defined(__APPLE__)
printf("Using fcntl::F_SETSIZE to expand file size to %lluGB\n", file_size/1024/1024/1024);
unsigned long long result_size = file_size;
int ret = fcntl(ofd, F_SETSIZE, &result_size);
if(ret == -1) {
printf("Failed set size %llu (errno %d - %s).\n", file_size, errno, strerror(errno));
exit(-1);
}
#else
printf("Using ftruncate to expand file size to %lluGB\n", file_size/1024/1024/1024);
ftruncate(ofd, file_size);
#endif
from gpuplotgenerator.
Related Issues (20)
- Statistics stop updating but maybe it's still working HOT 2
- [ERROR] Unable to open the source file HOT 2
- Concerning version 'GLIBCXX_3.4.xx' not found errors
- Performance and Write speed Question HOT 5
- shows CPU memory instead of GPU HOT 7
- NTFS partition under linux throws [ERROR] Unable to extend output file HOT 1
- cmake openCL compile error
- 2.0 POC Support? HOT 7
- Unable to extend output file when using direct method on NTFS formatted drive HOT 3
- Issue Compiling fatal error: constants.h: No such file or directory HOT 1
- Poc2 with error in "buffer and direct" (Linux ) HOT 9
- 4.2.2 Release win x64 ? HOT 3
- Crash generating POC2 (WIndows 10 x64) HOT 7
- v4.2.1 win Unable to open source file HOT 8
- Incorrect PoC2 file if using multiple output HOT 2
- error when running 4.2.2 win version HOT 1
- [ERROR 942682161] deadline exceeds deadline limit of the pool
- CL_INVALID_COMMAND_QUEUE
- [ERROR][-54][CL_INVALID_WORK_GROUP_SIZE] Error in step1 kernel launch HOT 4
- Error: call to 'as_uint' is ambiguous HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpuplotgenerator.