Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Iker Martín Álvarez
Proteo
Commits
73d49917
Commit
73d49917
authored
Nov 15, 2022
by
iker_martin
Browse files
WIP. Testing new iteration save forms. Minor bugs fixed.
parent
8e2bebe5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Codes/IOcodes/results.c
View file @
73d49917
...
...
@@ -118,13 +118,15 @@ int compare(const void *_a, const void *_b) {
*/
void
compute_results_iter
(
results_data
*
results
,
int
myId
,
int
numP
,
int
root
,
MPI_Comm
comm
)
{
//TODO Probar a quedarse la MEDIA en vez de MAX?
if
(
myId
==
root
)
{
/*MPI_Reduce(MPI_IN_PLACE, results->iters_time, results->iter_index, MPI_DOUBLE, MPI_SUM, root, comm);
MPI_Reduce
(
MPI_IN_PLACE
,
results
->
iters_time
,
results
->
iter_index
,
MPI_DOUBLE
,
MPI_MAX
,
root
,
comm
);
/*
for(size_t i=0; i<results->iter_index; i++) {
results->iters_time[i] = results->iters_time[i] / numP;
}*/
}
else
{
//
MPI_Reduce(results->iters_time, NULL, results->iter_index, MPI_DOUBLE, MPI_
SUM
, root, comm);
MPI_Reduce
(
results
->
iters_time
,
NULL
,
results
->
iter_index
,
MPI_DOUBLE
,
MPI_
MAX
,
root
,
comm
);
}
/*
double *aux_all_iters, *aux_id_iters, median;
if(myId == root) {
aux_all_iters = malloc(numP *results->iter_index * sizeof(double));
...
...
@@ -145,6 +147,7 @@ void compute_results_iter(results_data *results, int myId, int numP, int root, M
free(aux_all_iters);
free(aux_id_iters);
}
*/
}
...
...
Codes/Main/Main.c
View file @
73d49917
...
...
@@ -155,6 +155,7 @@ int main(int argc, char *argv[]) {
//
print_final_results
();
// Pasado este punto ya no pueden escribir los procesos
MPI_Barrier
(
comm
);
if
(
comm
!=
MPI_COMM_WORLD
&&
comm
!=
MPI_COMM_NULL
)
{
MPI_Comm_free
(
&
comm
);
}
...
...
@@ -355,6 +356,7 @@ int print_local_results() {
fflush
(
stdout
);
close
(
1
);
dup
(
ptr_out
);
close
(
ptr_out
);
}
return
0
;
}
...
...
Codes/runBase.sh
View file @
73d49917
...
...
@@ -21,9 +21,7 @@ read -r ini fin <<<$(echo $aux)
diff
=
$((
fin
-
ini
))
numP
=
$(
head
-
$fin
$configFile
|
tail
-
$diff
|
cut
-d
';'
-f1
|
grep
Procs |
cut
-d
'='
-f2
)
#mpirun -np 4 /home/martini/Instalaciones/valgrind-mpich-3.4.1-noucx/bin/valgrind --leak-check=full --show-leak-kinds=all --log-file=nc.vg.%p $dir$codeDir/a.out $configFile $outIndex $nodelist $nodes
mpirun
-np
$numP
$dir$codeDir
/build/a.out
$configFile
$outIndex
$nodelist
$nodes
rm
hostfile.o
$SLURM_JOB_ID
echo
"END RUN"
sed
-i
's/application called MPI_Abort(MPI_COMM_WORLD, -100) - process/shrink cleaning/g'
slurm-
$SLURM_JOB_ID
.out
Exec/singleRun.sh
View file @
73d49917
...
...
@@ -44,7 +44,7 @@ numP=$(head -$fin $configFile | tail -$diff | cut -d ';' -f1 | grep Procs | cut
for
((
i
=
0
;
i<qty
;
i++
))
do
echo
"Iter
$i
-- numP=
$numP
"
mpirun
$dir$codeDir
/a.out
$configFile
$outFileIndex
$nodelist
$nodes
mpirun
-np
$numP
$dir$codeDir
/a.out
$configFile
$outFileIndex
$nodelist
$nodes
done
echo
"END TEST"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment