Skip to content
Snippets Groups Projects
Commit 7c19e08d authored by Danny Auble's avatar Danny Auble
Browse files

bluegene.conf file is made correctly.

parent 554e1f3b
No related branches found
No related tags found
No related merge requests found
...@@ -100,20 +100,20 @@ static int _create_allocation(char *com, List allocated_partitions) ...@@ -100,20 +100,20 @@ static int _create_allocation(char *com, List allocated_partitions)
pa_request_t *request = (pa_request_t*) xmalloc(sizeof(pa_request_t)); pa_request_t *request = (pa_request_t*) xmalloc(sizeof(pa_request_t));
request->geometry[0] = -1; request->geometry[0] = -1;
request->conn_type=MESH; request->conn_type=TORUS;
request->rotate = false; request->rotate = false;
request->elongate = false; request->elongate = false;
request->force_contig = false; request->force_contig = false;
request->co_proc = false; request->co_proc = true;
while(i<len) { while(i<len) {
while(com[i-1]!=' ' && i<len) { while(com[i-1]!=' ' && i<len) {
i++; i++;
} }
if(!strncasecmp(com+i, "torus", 5)) { if(!strncasecmp(com+i, "mesh", 4)) {
request->conn_type=TORUS; request->conn_type=MESH;
i+=5; i+=4;
} else if(!strncasecmp(com+i, "rotate", 6)) { } else if(!strncasecmp(com+i, "rotate", 6)) {
request->rotate=true; request->rotate=true;
i+=6; i+=6;
...@@ -123,9 +123,9 @@ static int _create_allocation(char *com, List allocated_partitions) ...@@ -123,9 +123,9 @@ static int _create_allocation(char *com, List allocated_partitions)
} else if(!strncasecmp(com+i, "force", 5)) { } else if(!strncasecmp(com+i, "force", 5)) {
request->force_contig=true; request->force_contig=true;
i+=5; i+=5;
} else if(!strncasecmp(com+i, "proc", 4)) { } else if(!strncasecmp(com+i, "virtual", 7)) {
request->co_proc=true; request->co_proc=false;
i+=4; i+=7;
} else if(i2<0 && (com[i] < 58 && com[i] > 47)) { } else if(i2<0 && (com[i] < 58 && com[i] > 47)) {
i2=i; i2=i;
i++; i++;
...@@ -253,21 +253,21 @@ static int _remove_allocation(char *com, List allocated_partitions) ...@@ -253,21 +253,21 @@ static int _remove_allocation(char *com, List allocated_partitions)
static int _alter_allocation(char *com, List allocated_partitions) static int _alter_allocation(char *com, List allocated_partitions)
{ {
int torus=MESH, i=5, i2=0; int torus=TORUS, i=5, i2=0;
int len = strlen(com); int len = strlen(com);
bool rotate = false; bool rotate = false;
bool elongate = false; bool elongate = false;
bool force_contig = false; bool force_contig = false;
bool co_proc = false; bool co_proc = true;
while(i<len) { while(i<len) {
while(com[i-1]!=' ' && i<len) { while(com[i-1]!=' ' && i<len) {
i++; i++;
} }
if(!strncasecmp(com+i, "torus", 5)) { if(!strncasecmp(com+i, "mesh", 4)) {
torus=TORUS; torus=MESH;
i+=5; i+=4;
} else if(!strncasecmp(com+i, "rotate", 6)) { } else if(!strncasecmp(com+i, "rotate", 6)) {
rotate=true; rotate=true;
i+=6; i+=6;
...@@ -277,9 +277,9 @@ static int _alter_allocation(char *com, List allocated_partitions) ...@@ -277,9 +277,9 @@ static int _alter_allocation(char *com, List allocated_partitions)
} else if(!strncasecmp(com+i, "force", 5)) { } else if(!strncasecmp(com+i, "force", 5)) {
force_contig=true; force_contig=true;
i+=5; i+=5;
} else if(!strncasecmp(com+i, "proc", 4)) { } else if(!strncasecmp(com+i, "virtual", 7)) {
co_proc=true; co_proc=false;
i+=4; i+=7;
} else if(i2<0 && (com[i] < 58 && com[i] > 47)) { } else if(i2<0 && (com[i] < 58 && com[i] > 47)) {
i2=i; i2=i;
i++; i++;
...@@ -392,6 +392,9 @@ static int _save_allocation(char *com, List allocated_partitions) ...@@ -392,6 +392,9 @@ static int _save_allocation(char *com, List allocated_partitions)
char filename[20]; char filename[20];
char save_string[255]; char save_string[255];
FILE *file_ptr; FILE *file_ptr;
char *co_proc;
char *conn_type;
ListIterator results_i; ListIterator results_i;
memset(filename,0,20); memset(filename,0,20);
...@@ -413,13 +416,25 @@ static int _save_allocation(char *com, List allocated_partitions) ...@@ -413,13 +416,25 @@ static int _save_allocation(char *com, List allocated_partitions)
} }
file_ptr = fopen(filename,"w"); file_ptr = fopen(filename,"w");
if (file_ptr!=NULL) { if (file_ptr!=NULL) {
fputs ("BlrtsImage=/bgl/BlueLight/ppcfloor/bglsys/bin/rts_hw.rts\n", file_ptr);
fputs ("LinuxImage=/bgl/BlueLight/ppcfloor/bglsys/bin/zImage.elf\n", file_ptr);
fputs ("MloaderImage=/bgl/BlueLight/ppcfloor/bglsys/bin/mmcs-mloader.rts\n", file_ptr);
fputs ("RamDiskImage=/bgl/BlueLight/ppcfloor/bglsys/bin/ramdisk.elf\n", file_ptr);
results_i = list_iterator_create(allocated_partitions); results_i = list_iterator_create(allocated_partitions);
while((allocated_part = list_next(results_i)) != NULL) { while((allocated_part = list_next(results_i)) != NULL) {
memset(save_string,0,255); memset(save_string,0,255);
sprintf(save_string, "Nodes=bgl[%s] Type=%d Use=%d\n", if(allocated_part->request->conn_type == TORUS)
conn_type = "TORUS";
else
conn_type = "MESH";
if(allocated_part->request->co_proc)
co_proc = "COPROCCESSOR";
else
co_proc = "VIRTUAL";
sprintf(save_string, "Nodes=bgl[%s] Type=%s Use=%s\n",
allocated_part->request->save_name, allocated_part->request->save_name,
allocated_part->request->conn_type, conn_type,
allocated_part->request->co_proc); co_proc);
fputs (save_string,file_ptr); fputs (save_string,file_ptr);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment