Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
PaStiX
Commits
cec2cabb
Commit
cec2cabb
authored
Aug 07, 2017
by
Mathieu Faverge
Browse files
Keep replacing PASTIX_FOPEN by functions
parent
b4c37629
Changes
13
Hide whitespace changes
Inline
Side-by-side
sopalin/coeftab_z.h
View file @
cec2cabb
...
...
@@ -70,7 +70,8 @@ void coeftab_zgetschur ( const SolverMatrix *solvmtx,
void
coeftab_zdumpcblk
(
const
SolverCblk
*
cblk
,
pastix_uplo_t
uplo
,
FILE
*
stream
);
void
coeftab_zdump
(
const
SolverMatrix
*
solvmtx
,
void
coeftab_zdump
(
pastix_data_t
*
pastix_data
,
const
SolverMatrix
*
solvmtx
,
const
char
*
filename
);
int
coeftab_zdiff
(
const
SolverMatrix
*
solvA
,
SolverMatrix
*
solvB
);
...
...
sopalin/coeftab_zdump.c
View file @
cec2cabb
...
...
@@ -153,7 +153,7 @@ coeftab_zdumpcblk( const SolverCblk *cblk,
/**
*******************************************************************************
*
* @brief Dump the so
v
ler matrix coefficients into a file in human readable
* @brief Dump the sol
v
er matrix coefficients into a file in human readable
* format.
*
* All non-zeroes coefficients are dumped in the format:
...
...
@@ -162,6 +162,10 @@ coeftab_zdumpcblk( const SolverCblk *cblk,
*
*******************************************************************************
*
* @param[inout] pastix_data
* The pastix_data instance to access the unique directory id in which
* output the files.
*
* @param[in] solvmtx
* The solver matrix to print.
*
...
...
@@ -170,14 +174,18 @@ coeftab_zdumpcblk( const SolverCblk *cblk,
*
*******************************************************************************/
void
coeftab_zdump
(
const
SolverMatrix
*
solvmtx
,
const
char
*
filename
)
coeftab_zdump
(
pastix_data_t
*
pastix_data
,
const
SolverMatrix
*
solvmtx
,
const
char
*
filename
)
{
SolverCblk
*
cblk
=
solvmtx
->
cblktab
;
pastix_int_t
itercblk
;
FILE
*
stream
;
FILE
*
stream
=
NULL
;
PASTIX_FOPEN
(
stream
,
filename
,
"w"
);
stream
=
pastix_fopenw
(
pastix_data
,
filename
,
"w"
);
if
(
stream
==
NULL
){
return
;
}
/*
* TODO: there is a problem right here for now, because there are no
...
...
sopalin/parsec/parsec_zgetrf.c
View file @
cec2cabb
...
...
@@ -396,10 +396,6 @@ parsec_zgetrf( pastix_data_t *pastix_data,
sopalin_data
);
}
#if defined(PASTIX_DEBUG_FACTO)
coeftab_zdump
(
sopalin_data
->
solvmtx
,
"getrf.txt"
);
#endif
return
;
}
...
...
sopalin/parsec/parsec_zpotrf.c
View file @
cec2cabb
...
...
@@ -401,10 +401,6 @@ parsec_zpotrf( pastix_data_t *pastix_data,
sopalin_data
);
}
#if defined(PASTIX_DEBUG_FACTO)
coeftab_zdump
(
sopalin_data
->
solvmtx
,
"potrf.txt"
);
#endif
return
;
}
...
...
sopalin/pastix_task_sopalin.c
View file @
cec2cabb
...
...
@@ -376,14 +376,15 @@ pastix_subtask_sopalin( pastix_data_t *pastix_data )
solverBackupRestore
(
pastix_data
->
solvmatr
,
sbackup
);
solverBackupExit
(
sbackup
);
#if defined(PASTIX_
SYMBOL
_DUMP_S
YMBMTX
)
#if defined(PASTIX_
NUMFACT
_DUMP_S
OLVER
)
{
FILE
*
stream
;
PASTIX_FOPEN
(
stream
,
"symbol.eps"
,
"w"
);
solverDraw
(
pastix_data
->
solvmatr
,
stream
,
iparm
[
IPARM_VERBOSE
]);
fclose
(
stream
);
FILE
*
stream
=
NULL
;
stream
=
pastix_fopenw
(
pastix_data
,
"solver.eps"
,
"w"
);
if
(
stream
)
{
solverDraw
(
pastix_data
->
solvmatr
,
stream
,
iparm
[
IPARM_VERBOSE
]
);
fclose
(
stream
);
}
}
#endif
...
...
sopalin/sequential_zgetrf.c
View file @
cec2cabb
...
...
@@ -53,10 +53,6 @@ sequential_zgetrf( pastix_data_t *pastix_data,
cpucblk_zgetrfsp1d
(
datacode
,
cblk
,
threshold
,
work
);
}
#if defined(PASTIX_DEBUG_FACTO)
coeftab_zdump
(
datacode
,
"getrf_L.txt"
);
#endif
memFree_null
(
work
);
}
...
...
@@ -92,14 +88,6 @@ thread_pzgetrf( isched_thread_t *ctx, void *args )
cpucblk_zgetrfsp1d
(
datacode
,
cblk
,
sopalin_data
->
diagthreshold
,
work
);
}
#if defined(PASTIX_DEBUG_FACTO) && 0
isched_barrier_wait
(
&
(
ctx
->
global_ctx
->
barrier
)
);
if
(
rank
==
0
)
{
coeftab_zdump
(
datacode
,
"getrf_L.txt"
);
}
isched_barrier_wait
(
&
(
ctx
->
global_ctx
->
barrier
)
);
#endif
memFree_null
(
work
);
}
...
...
@@ -136,4 +124,8 @@ sopalin_zgetrf( pastix_data_t *pastix_data,
zgetrf
=
thread_zgetrf
;
}
zgetrf
(
pastix_data
,
sopalin_data
);
#if defined(PASTIX_DEBUG_FACTO)
coeftab_zdump
(
pastix_data
,
sopalin_data
->
solvmtx
,
"getrf.txt"
);
#endif
}
sopalin/sequential_zhetrf.c
View file @
cec2cabb
...
...
@@ -63,10 +63,6 @@ sequential_zhetrf( pastix_data_t *pastix_data,
work1
-
(
N
*
N
),
work2
);
}
#if defined(PASTIX_DEBUG_FACTO)
coeftab_zdump
(
datacode
,
"hetrf_L.txt"
);
#endif
memFree_null
(
work1
);
memFree_null
(
work2
);
}
...
...
@@ -114,14 +110,6 @@ thread_pzhetrf( isched_thread_t *ctx, void *args )
work1
-
(
N
*
N
),
work2
);
}
#if defined(PASTIX_DEBUG_FACTO) && 0
isched_barrier_wait
(
&
(
ctx
->
global_ctx
->
barrier
)
);
if
(
rank
==
0
)
{
coeftab_zdump
(
datacode
,
"hetrf_L.txt"
);
}
isched_barrier_wait
(
&
(
ctx
->
global_ctx
->
barrier
)
);
#endif
memFree_null
(
work1
);
memFree_null
(
work2
);
}
...
...
@@ -174,4 +162,8 @@ sopalin_zhetrf( pastix_data_t *pastix_data,
zhetrf
=
thread_zhetrf
;
}
zhetrf
(
pastix_data
,
sopalin_data
);
#if defined(PASTIX_DEBUG_FACTO)
coeftab_zdump
(
pastix_data
,
sopalin_data
->
solvmtx
,
"hetrf.txt"
);
#endif
}
sopalin/sequential_zpotrf.c
View file @
cec2cabb
...
...
@@ -53,10 +53,6 @@ sequential_zpotrf( pastix_data_t *pastix_data,
cpucblk_zpotrfsp1d
(
datacode
,
cblk
,
threshold
,
work
);
}
#if defined(PASTIX_DEBUG_FACTO)
coeftab_zdump
(
datacode
,
"potrf_L.txt"
);
#endif
memFree_null
(
work
);
}
...
...
@@ -92,14 +88,6 @@ thread_pzpotrf( isched_thread_t *ctx, void *args )
cpucblk_zpotrfsp1d
(
datacode
,
cblk
,
sopalin_data
->
diagthreshold
,
work
);
}
#if defined(PASTIX_DEBUG_FACTO) && 0
isched_barrier_wait
(
&
(
ctx
->
global_ctx
->
barrier
)
);
if
(
rank
==
0
)
{
coeftab_zdump
(
datacode
,
"potrf_L.txt"
);
}
isched_barrier_wait
(
&
(
ctx
->
global_ctx
->
barrier
)
);
#endif
memFree_null
(
work
);
}
...
...
@@ -136,4 +124,8 @@ sopalin_zpotrf( pastix_data_t *pastix_data,
zpotrf
=
thread_zpotrf
;
}
zpotrf
(
pastix_data
,
sopalin_data
);
#if defined(PASTIX_DEBUG_FACTO)
coeftab_zdump
(
pastix_data
,
sopalin_data
->
solvmtx
,
"potrf.txt"
);
#endif
}
sopalin/sequential_zsytrf.c
View file @
cec2cabb
...
...
@@ -63,10 +63,6 @@ sequential_zsytrf( pastix_data_t *pastix_data,
work1
-
(
N
*
N
),
work2
);
}
#if defined(PASTIX_DEBUG_FACTO)
coeftab_zdump
(
datacode
,
"sytrf_L.txt"
);
#endif
memFree_null
(
work1
);
memFree_null
(
work2
);
}
...
...
@@ -114,14 +110,6 @@ thread_pzsytrf( isched_thread_t *ctx, void *args )
work1
-
(
N
*
N
),
work2
);
}
#if defined(PASTIX_DEBUG_FACTO) && 0
isched_barrier_wait
(
&
(
ctx
->
global_ctx
->
barrier
)
);
if
(
rank
==
0
)
{
coeftab_zdump
(
datacode
,
"sytrf_L.txt"
);
}
isched_barrier_wait
(
&
(
ctx
->
global_ctx
->
barrier
)
);
#endif
memFree_null
(
work1
);
memFree_null
(
work2
);
}
...
...
@@ -174,4 +162,8 @@ sopalin_zsytrf( pastix_data_t *pastix_data,
zsytrf
=
thread_zsytrf
;
}
zsytrf
(
pastix_data
,
sopalin_data
);
#if defined(PASTIX_DEBUG_FACTO)
coeftab_zdump
(
pastix_data
,
sopalin_data
->
solvmtx
,
"sytrf.txt"
);
#endif
}
sopalin/sopalin_data.h
View file @
cec2cabb
...
...
@@ -23,11 +23,6 @@ struct sopalin_data_s {
};
typedef
struct
sopalin_data_s
sopalin_data_t
;
void
coeftab_zdump
(
const
SolverMatrix
*
solvmtx
,
const
char
*
filename
);
void
coeftab_cdump
(
const
SolverMatrix
*
solvmtx
,
const
char
*
filename
);
void
coeftab_ddump
(
const
SolverMatrix
*
solvmtx
,
const
char
*
filename
);
void
coeftab_sdump
(
const
SolverMatrix
*
solvmtx
,
const
char
*
filename
);
void
sopalin_ztrsm
(
pastix_data_t
*
pastix_data
,
int
side
,
int
uplo
,
int
trans
,
int
diag
,
sopalin_data_t
*
sopalin_data
,
int
nrhs
,
pastix_complex64_t
*
b
,
int
ldb
);
void
sopalin_ctrsm
(
pastix_data_t
*
pastix_data
,
int
side
,
int
uplo
,
int
trans
,
int
diag
,
sopalin_data_t
*
sopalin_data
,
int
nrhs
,
pastix_complex32_t
*
b
,
int
ldb
);
void
sopalin_dtrsm
(
pastix_data_t
*
pastix_data
,
int
side
,
int
uplo
,
int
trans
,
int
diag
,
sopalin_data_t
*
sopalin_data
,
int
nrhs
,
double
*
b
,
int
ldb
);
...
...
sopalin/starpu/starpu_zgetrf.c
View file @
cec2cabb
...
...
@@ -326,10 +326,6 @@ starpu_zgetrf( pastix_data_t *pastix_data,
starpu_mpi_barrier
(
MPI_COMM_WORLD
);
#endif
#if defined(PASTIX_DEBUG_FACTO)
coeftab_zdump
(
sopalin_data
->
solvmtx
,
"getrf.txt"
);
#endif
return
;
}
...
...
sopalin/starpu/starpu_zpotrf.c
View file @
cec2cabb
...
...
@@ -285,10 +285,6 @@ starpu_zpotrf( pastix_data_t *pastix_data,
starpu_mpi_barrier
(
MPI_COMM_WORLD
);
#endif
#if defined(PASTIX_DEBUG_FACTO)
coeftab_zdump
(
sopalin_data
->
solvmtx
,
"potrf.txt"
);
#endif
return
;
}
...
...
symbol/pastix_subtask_symbfact.c
View file @
cec2cabb
...
...
@@ -172,10 +172,12 @@ pastix_subtask_symbfact( pastix_data_t *pastix_data )
/*Symbol matrix loaded from file */
if
(
iparm
[
IPARM_IO_STRATEGY
]
&
PastixIOLoad
)
{
FILE
*
stream
;
PASTIX_FOPEN
(
stream
,
"symbname"
,
"r"
);
symbolLoad
(
pastix_data
->
symbmtx
,
stream
);
fclose
(
stream
);
FILE
*
stream
=
NULL
;
stream
=
pastix_fopen
(
"symbname"
,
"r"
);
if
(
stream
)
{
symbolLoad
(
pastix_data
->
symbmtx
,
stream
);
fclose
(
stream
);
}
}
/* Symbol matrix computed through Fax or Kass */
else
...
...
@@ -364,10 +366,12 @@ pastix_subtask_symbfact( pastix_data_t *pastix_data )
if
(
iparm
[
IPARM_IO_STRATEGY
]
&
PastixIOSave
)
{
if
(
procnum
==
0
)
{
FILE
*
stream
;
PASTIX_FOPEN
(
stream
,
"symbgen"
,
"w"
);
symbolSave
(
pastix_data
->
symbmtx
,
stream
);
fclose
(
stream
);
FILE
*
stream
=
NULL
;
stream
=
pastix_fopenw
(
pastix_data
,
"symbgen"
,
"w"
);
if
(
stream
)
{
symbolSave
(
pastix_data
->
symbmtx
,
stream
);
fclose
(
stream
);
}
}
}
...
...
@@ -377,11 +381,14 @@ pastix_subtask_symbfact( pastix_data_t *pastix_data )
#if defined(PASTIX_SYMBOL_DUMP_SYMBMTX)
if
(
procnum
==
0
)
{
FILE
*
stream
;
PASTIX_FOPEN
(
stream
,
"symbol.eps"
,
"w"
);
symbolDraw
(
pastix_data
->
symbmtx
,
stream
);
fclose
(
stream
);
FILE
*
stream
=
NULL
;
stream
=
pastix_fopenw
(
pastix_data
,
"symbol.eps"
,
"w"
);
if
(
stream
)
{
symbolDraw
(
pastix_data
,
pastix_data
->
symbmtx
,
stream
);
fclose
(
stream
);
}
}
#endif
...
...
Write
Preview
Markdown
is supported
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