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
c437c212
Commit
c437c212
authored
Nov 08, 2021
by
iker_martin
Browse files
Fix de inicio de la aplicacion.
parent
436bcd12
Changes
4
Hide whitespace changes
Inline
Side-by-side
Codes/auxiliar_codes/Recordnodelist.c
View file @
c437c212
...
...
@@ -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,7 +149,8 @@ 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
)
{
write_hostfile_node
(
ptr
,
qty
[
i
],
host
);
if
(
qty
[
i
]
!=
0
)
write_hostfile_node
(
ptr
,
qty
[
i
],
host
);
i
++
;
free
(
host
);
}
...
...
Codes/auxiliar_codes/Recordnodelist.o
View file @
c437c212
No preview for this file type
Codes/recordMachinefile.sh
View file @
c437c212
...
...
@@ -15,5 +15,3 @@ elif [ $dist == "cpu" ]; then
fi
$dir
/Recordnodelist.o
$numP
$dist
echo
$numP
Codes/runBase.sh
View file @
c437c212
...
...
@@ -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
...
...
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