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
MAM_BICGSTAB
Commits
b2e1362b
Commit
b2e1362b
authored
Jun 04, 2024
by
iker_martin
Browse files
Minor changes
parent
8ddef9c0
Changes
1
Show whitespace changes
Inline
Side-by-side
BiCGStab_Iker/BiCGStab.c
View file @
b2e1362b
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
#include <mpi.h>
#include <mpi.h>
#include <hb_io.h>
#include <hb_io.h>
//#include <vector>
//#include <vector>
//#include <sys/prctl.h>
#include "reloj.h"
#include "reloj.h"
#include "ScalarVectors.h"
#include "ScalarVectors.h"
...
@@ -192,7 +191,6 @@ void BiCGStab_compute (Compute_data *computeData, user_redist_t *user_data) {
...
@@ -192,7 +191,6 @@ void BiCGStab_compute (Compute_data *computeData, user_redist_t *user_data) {
// while ((computeData->iter < maxiter) && (computeData->tol > umbral)) {
// while ((computeData->iter < maxiter) && (computeData->tol > umbral)) {
while
((
computeData
->
iter
<
maxiter
)
&&
(
flag
==
1
))
{
while
((
computeData
->
iter
<
maxiter
)
&&
(
flag
==
1
))
{
#if PRECOND
#if PRECOND
VvecDoubles
(
DONE
,
computeData
->
diags
,
computeData
->
p
,
DZERO
,
computeData
->
p_hat
,
n_dist
);
// p_hat = D^-1 * p
VvecDoubles
(
DONE
,
computeData
->
diags
,
computeData
->
p
,
DZERO
,
computeData
->
p_hat
,
n_dist
);
// p_hat = D^-1 * p
#else
#else
...
@@ -655,6 +653,7 @@ void targets_update(Compute_data *computeData, user_redist_t *user_data) {
...
@@ -655,6 +653,7 @@ void targets_update(Compute_data *computeData, user_redist_t *user_data) {
MAM_Data_get_pointer(&value, entry++, &total_qty, &type, MAM_DATA_REPLICATED, MAM_DATA_CONSTANT);
MAM_Data_get_pointer(&value, entry++, &total_qty, &type, MAM_DATA_REPLICATED, MAM_DATA_CONSTANT);
computeData->t1 = *((double *)value);
computeData->t1 = *((double *)value);
*/
*/
MAM_Data_get_pointer
(
&
value
,
entry
++
,
&
total_qty
,
&
type
,
MAM_DATA_REPLICATED
,
MAM_DATA_VARIABLE
);
MAM_Data_get_pointer
(
&
value
,
entry
++
,
&
total_qty
,
&
type
,
MAM_DATA_REPLICATED
,
MAM_DATA_VARIABLE
);
computeData
->
n
=
*
((
int
*
)
value
);
computeData
->
n
=
*
((
int
*
)
value
);
MAM_Data_get_pointer
(
&
value
,
entry
++
,
&
total_qty
,
&
type
,
MAM_DATA_REPLICATED
,
MAM_DATA_VARIABLE
);
MAM_Data_get_pointer
(
&
value
,
entry
++
,
&
total_qty
,
&
type
,
MAM_DATA_REPLICATED
,
MAM_DATA_VARIABLE
);
...
@@ -662,7 +661,7 @@ void targets_update(Compute_data *computeData, user_redist_t *user_data) {
...
@@ -662,7 +661,7 @@ void targets_update(Compute_data *computeData, user_redist_t *user_data) {
MAM_Data_get_pointer
(
&
value
,
entry
++
,
&
total_qty
,
&
type
,
MAM_DATA_REPLICATED
,
MAM_DATA_VARIABLE
);
MAM_Data_get_pointer
(
&
value
,
entry
++
,
&
total_qty
,
&
type
,
MAM_DATA_REPLICATED
,
MAM_DATA_VARIABLE
);
computeData
->
t1
=
*
((
double
*
)
value
);
computeData
->
t1
=
*
((
double
*
)
value
);
//
entry = 0;
//
entry = 0;
MAM_Data_get_pointer
(
&
value
,
entry
++
,
&
total_qty
,
&
type
,
MAM_DATA_REPLICATED
,
MAM_DATA_VARIABLE
);
MAM_Data_get_pointer
(
&
value
,
entry
++
,
&
total_qty
,
&
type
,
MAM_DATA_REPLICATED
,
MAM_DATA_VARIABLE
);
computeData
->
iter
=
*
((
int
*
)
value
);
computeData
->
iter
=
*
((
int
*
)
value
);
MAM_Data_get_pointer
(
&
value
,
entry
++
,
&
total_qty
,
&
type
,
MAM_DATA_REPLICATED
,
MAM_DATA_VARIABLE
);
MAM_Data_get_pointer
(
&
value
,
entry
++
,
&
total_qty
,
&
type
,
MAM_DATA_REPLICATED
,
MAM_DATA_VARIABLE
);
...
@@ -678,7 +677,6 @@ void targets_update(Compute_data *computeData, user_redist_t *user_data) {
...
@@ -678,7 +677,6 @@ void targets_update(Compute_data *computeData, user_redist_t *user_data) {
/*
/*
MAM_Data_get_pointer(&value, entry++, &total_qty, &type, MAM_DATA_DISTRIBUTED, MAM_DATA_CONSTANT);
MAM_Data_get_pointer(&value, entry++, &total_qty, &type, MAM_DATA_DISTRIBUTED, MAM_DATA_CONSTANT);
computeData->vlen = ((int *)value);
computeData->vlen = ((int *)value);
//computeData->vlen = user_data->recv_vlen;
MAM_Data_get_pointer(&value, entry++, &total_qty, &type, MAM_DATA_DISTRIBUTED, MAM_DATA_CONSTANT);
MAM_Data_get_pointer(&value, entry++, &total_qty, &type, MAM_DATA_DISTRIBUTED, MAM_DATA_CONSTANT);
computeData->r0 = ((double *)value);
computeData->r0 = ((double *)value);
MAM_Data_get_pointer(&value, entry++, &total_qty, &type, MAM_DATA_DISTRIBUTED, MAM_DATA_CONSTANT);
MAM_Data_get_pointer(&value, entry++, &total_qty, &type, MAM_DATA_DISTRIBUTED, MAM_DATA_CONSTANT);
...
@@ -692,6 +690,7 @@ void targets_update(Compute_data *computeData, user_redist_t *user_data) {
...
@@ -692,6 +690,7 @@ void targets_update(Compute_data *computeData, user_redist_t *user_data) {
computeData->x_exact = ((double *)value);
computeData->x_exact = ((double *)value);
#endif
#endif
*/
*/
computeData
->
vlen
=
user_data
->
recv_vlen
;
computeData
->
vlen
=
user_data
->
recv_vlen
;
MAM_Data_get_pointer
(
&
value
,
entry
++
,
&
total_qty
,
&
type
,
MAM_DATA_DISTRIBUTED
,
MAM_DATA_VARIABLE
);
MAM_Data_get_pointer
(
&
value
,
entry
++
,
&
total_qty
,
&
type
,
MAM_DATA_DISTRIBUTED
,
MAM_DATA_VARIABLE
);
computeData
->
r0
=
((
double
*
)
value
);
computeData
->
r0
=
((
double
*
)
value
);
...
@@ -706,7 +705,8 @@ void targets_update(Compute_data *computeData, user_redist_t *user_data) {
...
@@ -706,7 +705,8 @@ void targets_update(Compute_data *computeData, user_redist_t *user_data) {
computeData
->
x_exact
=
((
double
*
)
value
);
computeData
->
x_exact
=
((
double
*
)
value
);
#endif
#endif
// entry = 0;
//entry = 0;
MAM_Data_get_pointer
(
&
value
,
entry
++
,
&
total_qty
,
&
type
,
MAM_DATA_DISTRIBUTED
,
MAM_DATA_VARIABLE
);
MAM_Data_get_pointer
(
&
value
,
entry
++
,
&
total_qty
,
&
type
,
MAM_DATA_DISTRIBUTED
,
MAM_DATA_VARIABLE
);
computeData
->
p
=
((
double
*
)
value
);
computeData
->
p
=
((
double
*
)
value
);
MAM_Data_get_pointer
(
&
value
,
entry
++
,
&
total_qty
,
&
type
,
MAM_DATA_DISTRIBUTED
,
MAM_DATA_VARIABLE
);
MAM_Data_get_pointer
(
&
value
,
entry
++
,
&
total_qty
,
&
type
,
MAM_DATA_DISTRIBUTED
,
MAM_DATA_VARIABLE
);
...
...
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