ZIP Input files

Message boards : Server programs : ZIP Input files
Message board moderation

To post messages, you must log in.

AuthorMessage
Larrax

Send message
Joined: 17 Nov 17
Posts: 2
Message 83021 - Posted: 17 Nov 2017, 13:39:29 UTC

Hello,
in my project, I am sending some text files as input files. I would like to send them zipped.

In my generator I have similar way of creating files as in sample_generator.cpp ...

    // make a unique name (for the job and its input file)
    sprintf(name, "%s_%d_%d", app_name, start_time, seqno++);

    // Create the input file.
    // Put it at the right place in the download dir hierarchy
    retval = config.download_path(name, path);
    if (retval) return retval;
    FILE* f = fopen(path, "w");
    if (!f) return ERR_FOPEN;
    fprintf(f, "This is the input file for job %s", name);
    fclose(f);


I have tried setting <gzip/> tag in input template, but when calling create_work, I receive following error:

    process_input_template: missing gzip file /home/.../...1510922622_15.gz


And indeed in my directory, there is only 1510922622_15 file, as I created it with generator - without .gz and in plaintext, not zipped.
I have read the file must be "staged with --gzip option". How can I do this from the generator code, before calling create_work? So the missing file was created.

Looking forward to your answers!
ID: 83021 · Report as offensive
Profile Jord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15477
Netherlands
Message 83022 - Posted: 17 Nov 2017, 13:48:04 UTC - in response to Message 83021.  

ID: 83022 · Report as offensive
Larrax

Send message
Joined: 17 Nov 17
Posts: 2
Message 83023 - Posted: 17 Nov 2017, 14:32:05 UTC - in response to Message 83022.  

Thank you for the reply.

"If there is demand, we will extend this mechanism to work for job input files also."

...That means the gzip flag does not work for input files? That does not correspond to this article https://boinc.berkeley.edu/trac/wiki/JobTemplates, where there is a gzip flag in input file template.

So this flag is information ONLY for clients and the zipping on server must be done manually, as described in Application-level compression chapter, i.e. using boinc_zip() function?
ID: 83023 · Report as offensive

Message boards : Server programs : ZIP Input files

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.