Commit 0fb35135 authored by iker_martin's avatar iker_martin
Browse files

Fixed minor error when obtaining data as a target process. All methods seems...

Fixed minor error when obtaining data as a target process. All methods seems to work. Added a few scripts for executions.
parent fc5bd315
...@@ -108,9 +108,8 @@ int main (int argc, char *argv[]) { ...@@ -108,9 +108,8 @@ int main (int argc, char *argv[]) {
MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &req); MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &req);
MPI_Comm_size(MPI_COMM_WORLD, &numP); MPI_Comm_size(MPI_COMM_WORLD, &numP);
MPI_Comm_rank(MPI_COMM_WORLD, &myId); MPI_Comm_rank(MPI_COMM_WORLD, &myId);
printf("Nuevo set %d/%d\n", myId, numP);
dist_data.comm = MPI_COMM_WORLD; dist_data.comm = MPI_COMM_WORLD;
printf("Nuevo set %d/%d\n", myId, numP);
int new_group = init_malleability(myId, numP, ROOT, dist_data.comm, argv[0], nodelist, num_cpus, num_nodes); int new_group = init_malleability(myId, numP, ROOT, dist_data.comm, argv[0], nodelist, num_cpus, num_nodes);
update_dist_data(&dist_data); update_dist_data(&dist_data);
...@@ -123,7 +122,7 @@ int main (int argc, char *argv[]) { ...@@ -123,7 +122,7 @@ int main (int argc, char *argv[]) {
} }
//if(computeData.iter==0) // if(computeData.iter==0)
terminate = compute(&computeData, &dist_data, sm); terminate = compute(&computeData, &dist_data, sm);
if(myId == ROOT && terminate) { if(myId == ROOT && terminate) {
...@@ -405,7 +404,7 @@ int compute(Compute_data *computeData, struct Dist_data *dist_data, int sm) { ...@@ -405,7 +404,7 @@ int compute(Compute_data *computeData, struct Dist_data *dist_data, int sm) {
computeData->maxiter = 1000; computeData->maxiter = 1000;
dumb(computeData,dist_data); // dumb(computeData,dist_data);
while ((computeData->iter < computeData->maxiter) && (computeData->tol > computeData->umbral)) { while ((computeData->iter < computeData->maxiter) && (computeData->tol > computeData->umbral)) {
//while (computeData->tol > computeData->umbral) { //while (computeData->tol > computeData->umbral) {
...@@ -552,7 +551,6 @@ int dist_old(struct Dist_data *dist_data, Compute_data *computeData, int num_chi ...@@ -552,7 +551,6 @@ int dist_old(struct Dist_data *dist_data, Compute_data *computeData, int num_chi
//FIXME SIguientes valores pueden ser asincronos //FIXME SIguientes valores pueden ser asincronos
malleability_add_data(computeData->vlen, computeData->n, MAL_INT, 1+MAL_DATA_INDEPENDENT, 0, send_synch); malleability_add_data(computeData->vlen, computeData->n, MAL_INT, 1+MAL_DATA_INDEPENDENT, 0, send_synch);
malleability_add_data(computeData->subm.vpos, computeData->n, MAL_INT, 1+MAL_DATA_DEPENDENT, 0, send_synch); malleability_add_data(computeData->subm.vpos, computeData->n, MAL_INT, 1+MAL_DATA_DEPENDENT, 0, send_synch);
malleability_add_data(computeData->subm.vval, computeData->n, MAL_DOUBLE, 1+MAL_DATA_DEPENDENT, 0, send_synch); malleability_add_data(computeData->subm.vval, computeData->n, MAL_DOUBLE, 1+MAL_DATA_DEPENDENT, 0, send_synch);
} }
...@@ -609,22 +607,22 @@ void dist_new(struct Dist_data *dist_data, Compute_data *computeData) { ...@@ -609,22 +607,22 @@ void dist_new(struct Dist_data *dist_data, Compute_data *computeData) {
dcopy (&(dist_data->tamBl), &(computeData->d_full[dist_data->ini]), &IONE, computeData->d, &IONE); // d = d_full[ini] to d_full[ini+tamBl] dcopy (&(dist_data->tamBl), &(computeData->d_full[dist_data->ini]), &IONE, computeData->d, &IONE); // d = d_full[ini] to d_full[ini+tamBl]
malleability_get_entries(&entries, 0, 0); //Get if there is any asynch data to recover malleability_get_entries(&entries, 0, 0); //Get if there is any asynch data to recover
if(entries) is_synch=0; if(entries) { is_synch=0; entry=0; }
malleability_get_data(&value, entry, 0, is_synch); malleability_get_data(&value, entry, 0, is_synch);
computeData->vlen = ((int *)value); computeData->vlen = ((int *)value);
CreateSparseMatrixVptr(&(computeData->subm), dist_data->tamBl, computeData->n, 0); CreateSparseMatrixVptr(&(computeData->subm), dist_data->tamBl, computeData->n, 0);
computeData->subm.vptr[0] = 0; computeData->subm.vptr[0] = 0;
for(i=0; i<dist_data->tamBl; i++) { for(i=0; i<dist_data->tamBl; i++) {
computeData->subm.vptr[i+1] = computeData->vlen[i]; computeData->subm.vptr[i+1] = computeData->vlen[i];
} }
TransformLengthtoHeader(computeData->subm.vptr, computeData->subm.dim1); // The array is converted from vlen to vptr TransformLengthtoHeader(computeData->subm.vptr, computeData->subm.dim1); // The array is converted from vlen to vptr
malleability_get_data(&value, entry+1, 0, is_synch); malleability_get_data(&value, entry+1, 0, is_synch);
computeData->subm.vpos = ((int *)value); computeData->subm.vpos = ((int *)value);
malleability_get_data(&value, entry+2, 0, is_synch); malleability_get_data(&value, entry+2, 0, is_synch);
computeData->subm.vval = ((double *)value); computeData->subm.vval = ((double *)value);
} }
void update_dist_data(struct Dist_data *dist_data) { void update_dist_data(struct Dist_data *dist_data) {
......
#!/bin/bash
#SBATCH -N 1
#SBATCH -p P1
#SBATCH -t 00:10:00
module load /home/martini/MODULES/modulefiles/mpich-4.0.3-ofi
module load /home/martini/MODULES/modulefiles/intel64Only.module
nodelist=$SLURM_JOB_NODELIST
nodes=$SLURM_JOB_NUM_NODES
cores=20
numP=$1
matrix=$2
numC=$3
msm=$4
mss=$5
mrm=$6
initial_nodelist=$(bash BashScripts/createInitialNodelist.sh $numP $cores $nodelist)
echo "Test"
mpirun -hosts $initial_nodelist -np $numP ./build/a.out $matrix $numC $msm $mss $mrm $mss $nodelist $nodes
echo "End"
#!/bin/bash
#SBATCH -N 1
#SBATCH -p P1
#SBATCH -t 00:10:00
module load /home/martini/MODULES/modulefiles/mpich-4.0.3-ofi
module load /home/martini/MODULES/modulefiles/intel64Only.module
nodelist=$SLURM_JOB_NODELIST
nodes=$SLURM_JOB_NUM_NODES
cores=20
numP=$1
numC=4
msm=1
mss=2
mrm=1
initial_nodelist=$(bash BashScripts/createInitialNodelist.sh $numP $cores $nodelist)
echo "Test"
mpirun -hosts $initial_nodelist -np $numP ./build/a.out bcsstk01.rsa $numC $msm $mss $mrm $mss $nodelist $nodes
#mpirun -np 4 ./ConjugateGradient bcsstk17.rsa
#mpirun -np 8 ./ConjugateGradient bcsstk01.rsa
#mpirun -np 12 ./ConjugateGradient bcsstk01.rsa
echo "AUDIK"
#mpirun -np 4 ./ConjugateGradient ../../audikw_1/audikw_1.rb
#mpirun -np 4 ./ConjugateGradient ../../audikw_1/audikw_1.rb
#mpirun -np 4 ./ConjugateGradient ../../audikw_1/audikw_1.rb
echo "End"
#!/bin/bash
#SBATCH -N 8
#SBATCH -p P1
#SBATCH --exclude=c01,c00,c02
dirM="/home/martini/SparseMatrix/"
#matrix="Queen_4147.rb"
#matrix="audikw_1.rb"
matrix="bcsstk01.rsa"
#procs=(2 10 20 40 80 120 160)
procs=(2)
msm=(0 1)
mss=(1 2)
mrm=(0 1)
mrs=(1 2)
echo $matrix
for proc in "${procs[@]}"
do
echo "------------------------------------------run np=$proc next=0"
node_qty=$(($proc / 20))
if [ $node_qty -eq 0 ]
then
node_qty=1
fi
for sm_type in "${msm[@]}"
do
for ss_type in "${mss[@]}"
do
for rm_type in "${mrm[@]}"
do
sbatch -p P1 -N $node_qty ./generalRun.sh $proc $dirM$matrix 4 $sm_type $ss_type $rm_type $ss_type
done
done
done
done
echo "End"
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