Changeset - fc875724cf6f
[Not reviewed]
default
0 4 0
ethanzonca - 16 years ago 2009-09-05 20:14:22

Added various fixes, and added code to discover the number of online processors in the resident system
4 files changed with 8 insertions and 3 deletions:
0 comments (0 inline, 0 general)
TODO
Show inline comments
 
@@ -9,6 +9,7 @@ x-finished task
 
Build
 

	
 
Master
 
*-Code dummy data/processes to test the current queueing system / watchdog / etc.
 
*-Add calls to remotio
 
 -Write more meat into the pseudo-code main() to pull everything together
 
 -Write a stub for getting info from the tarball/validifying the tarball. Read distren-job.xml, a file in the tarball, to find out 1. which rendering system to use (that system, e.g. blender/povray, can read more specifics, such as name of file to pass to blender and frames. Options common between different systems will be handled in common as best as possible)
src/server/slave.c
Show inline comments
 
@@ -129,6 +129,7 @@ char *pathtoXml;     // Full path to the
 
char *pathtoOutput;  // Full path to the output (rendered) file
 
char *outputExt;     // Output Extension (e.g., JPG)
 

	
 
int threads = sysconf(_SC_NPROCESSORS_ONLN); // Equals the number of currently online processors
 
struct distrenjob *myjob; // Structure to hold data gathered from the XML file
 

	
 
// If the slave is getting job info...
 
@@ -197,7 +198,10 @@ if(gotframe ==1)
 
    _distren_asprintf(&pathtoOutput, "%s/job%d/output/frame%d.%s", datadir, jobnum, framenum, outputExt ); // Prepares the path to the jobfile
 

	
 

	
 
     exec_blender(myjob, pathtoJobfile, pathtoOutput, framenum); // @TODO: This warning should be fixed :D
 
    /** Series of IF's for jobtype based on xml content */
 
    if(1==1){
 
     exec_blender(myjob, pathtoJobfile, pathtoOutput, framenum, threads); // @TODO: This warning should be fixed :D
 
    }
 

	
 
    // Consider placing the following in the exec_blender() function
 
    while(busy == 1){
src/server/slavefuncs.c
Show inline comments
 
@@ -364,7 +364,7 @@ return 1; // Success
 

	
 

	
 
/** Executor function for Blender operations */
 
void exec_blender(struct distrenjob* distrenjob, char *input, char *output, int frame)
 
void exec_blender(struct distrenjob* distrenjob, char *input, char *output, int frame, int threads)
 
{
 
  int ret;
 
  char *frame_str;
src/server/slavefuncs.h
Show inline comments
 
@@ -34,7 +34,7 @@ int ssh_keygen();
 
int register_user(char *username, char *email);
 
int login_user(char *username);
 
int conf_replace(char *username);
 
void exec_blender(struct distrenjob* distrenjob, char *input, char *output, int frame);
 
void exec_blender(struct distrenjob* distrenjob, char *input, char *output, int frame, int threads);
 
void xmlinit();
 
void xmlcleanup();
 

	
0 comments (0 inline, 0 general)