Commit c437c212 authored by iker_martin's avatar iker_martin
Browse files

Fix de inicio de la aplicacion.

parent 436bcd12
......@@ -102,15 +102,11 @@ void node_dist(slurm_job_info_t job_record, int type, int total_procs, int **qty
procs[i] += total_procs - asigCores;
(*used_nodes)++;
}
if(*used_nodes > job_record.num_nodes) *used_nodes = job_record.num_nodes;
if(*used_nodes > job_record.num_nodes) *used_nodes = job_record.num_nodes; //FIXME Si ocurre esto no es un error?
}
*used_nodes=job_record.num_nodes;
for(i=0; i<*used_nodes; i++) {
if(procs[i] == 0){
procs[i]++;
}
}
// Antes se ponia aqui todos los nodos sin cpus a 1
*qty = procs;
}
......@@ -153,6 +149,7 @@ void fill_hostfile(slurm_job_info_t job_record, int ptr, int *qty, int used_node
hostlist = slurm_hostlist_create(job_record.nodes);
while ( (host = slurm_hostlist_shift(hostlist)) && i < used_nodes) {
if(qty[i] != 0)
write_hostfile_node(ptr, qty[i], host);
i++;
free(host);
......
......@@ -15,5 +15,3 @@ elif [ $dist == "cpu" ]; then
fi
$dir/Recordnodelist.o $numP $dist
echo $numP
......@@ -9,8 +9,7 @@ module load mpich-3.4.1-noucx
numP=$(bash recordMachinefile.sh $1)
mpirun -f hostfile.o$SLURM_JOB_ID -np $numP ./a.out $1 $2
#mpirun -np 2 ./a.out test.ini
mpiexec -f hostfile.o$SLURM_JOB_ID ./a.out $1 $2
rm hostfile.o$SLURM_JOB_ID
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment