HiCMA
Hierarchical Computations on Manycore Architectures
zgytlr.c
Go to the documentation of this file.
1 /*
2  * @copyright (c) 2017 King Abdullah University of Science and Technology (KAUST).
3  * All rights reserved.
4  */
16 /*
17  * @copyright (c) 2009-2014 The University of Tennessee and The University
18  * of Tennessee Research Foundation.
19  * All rights reserved.
20  * @copyright (c) 2012-2014 Inria. All rights reserved.
21  * @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
22  */
23 /*
24  * file zplrnt.c
25  *
26  * MORSE computational routines
27  * MORSE is a software package provided by Univ. of Tennessee,
28  * Univ. of California Berkeley and Univ. of Colorado Denver
29  *
30  * version 2.5.0
31  * comment This file has been automatically generated
32  * from Plasma 2.5.0 for MORSE 1.0.0
33  * author Mathieu Faverge
34  * author Emmanuel Agullo
35  * author Cedric Castagnede
36  * date 2010-11-15
37  * precisions normal z -> s d c
38  *
39  */
40 #include "morse.h"
41 #include "control/common.h"
42 #include "control/hicma_common.h"
43 
92 #include <stdio.h>
94  MORSE_enum uplo,
95  MORSE_desc_t *AUV,
96  MORSE_desc_t *AD,
97  MORSE_desc_t *Ark,
98  unsigned long long int seed,
99  int maxrank,
100  double tol,
101  int compress_diag,
102  MORSE_desc_t *Dense
103  )
104 {
105  MORSE_context_t *morse;
106  MORSE_sequence_t *sequence = NULL;
107  MORSE_request_t request = MORSE_REQUEST_INITIALIZER;
108  int status;
109 
110  morse = morse_context_self();
111  if (morse == NULL) {
112  morse_fatal_error("MORSE_zgytlr_Tile", "morse not initialized");
113  return MORSE_ERR_NOT_INITIALIZED;
114  }
115  morse_sequence_create(morse, &sequence);
117  uplo,
118  AUV,
119  AD,
120  Ark,
121  seed, maxrank, tol,
122  compress_diag,
123  Dense,
124  sequence, &request );
125  MORSE_Desc_Flush( AD, sequence );
126  MORSE_Desc_Flush( AUV, sequence ); //added due to stall when parsec is used
127  MORSE_Desc_Flush( Ark, sequence ); //added due to stall when parsec is used
128  MORSE_Desc_Flush( Dense, sequence ); //added due to stall when parsec is used
129  morse_sequence_wait(morse, sequence);
130  //RUNTIME_desc_getoncpu(AD);
131 
132  status = sequence->status;
133  morse_sequence_destroy(morse, sequence);
134 
135  return status;
136 }
137 
156  MORSE_enum uplo,
157  MORSE_desc_t *AUV,
158  MORSE_desc_t *AD,
159  MORSE_desc_t *Ark,
160  unsigned long long int seed,
161  int maxrank, double tol,
162  int compress_diag,
163  MORSE_desc_t *Dense,
164  MORSE_sequence_t *sequence,
165  MORSE_request_t *request)
166 {
167  MORSE_desc_t *A = AUV; // FIXME
168 
169  MORSE_context_t *morse;
170 
171  morse = morse_context_self();
172  if (morse == NULL) {
173  morse_fatal_error("MORSE_zgytlr_Tile", "morse not initialized");
174  return MORSE_ERR_NOT_INITIALIZED;
175  }
176  if (sequence == NULL) {
177  morse_fatal_error("MORSE_zgytlr_Tile", "NULL sequence");
178  return MORSE_ERR_UNALLOCATED;
179  }
180  if (request == NULL) {
181  morse_fatal_error("MORSE_zgytlr_Tile", "NULL request");
182  return MORSE_ERR_UNALLOCATED;
183  }
184  /* Check sequence status */
185  if (sequence->status == MORSE_SUCCESS)
186  request->status = MORSE_SUCCESS;
187  else
188  return morse_request_fail(sequence, request, MORSE_ERR_SEQUENCE_FLUSHED);
189 
190  /* Check descriptors for correctness */
191  if (morse_desc_check(A) != MORSE_SUCCESS) {
192  morse_error("MORSE_zgytlr_Tile", "invalid descriptor");
193  return morse_request_fail(sequence, request, MORSE_ERR_ILLEGAL_VALUE);
194  }
195  /* Check input arguments */
196  /*if (A->nb != A->mb) {
197  morse_error("MORSE_zgytlr_Tile", "only square tiles supported");
198  return morse_request_fail(sequence, request, MORSE_ERR_ILLEGAL_VALUE);
199  }*/
200 
201  /* Quick return */
202  if (chameleon_min( A->m, A->n ) == 0)
203  return MORSE_SUCCESS;
204 
206  uplo,
207  AUV,
208  AD,
209  Ark,
210  seed,
211  maxrank, tol,
212  compress_diag,
213  Dense,
214  sequence, request);
215 
216  return MORSE_SUCCESS;
217 }
#define AUV(m, n)
Definition: pzgemm.c:60
#define A(m, n)
Definition: pzgemm.c:56
int HICMA_zgytlr_Tile(MORSE_enum uplo, MORSE_desc_t *AUV, MORSE_desc_t *AD, MORSE_desc_t *Ark, unsigned long long int seed, int maxrank, double tol, int compress_diag, MORSE_desc_t *Dense)
Definition: zgytlr.c:93
int HICMA_zgytlr_Tile_Async(MORSE_enum uplo, MORSE_desc_t *AUV, MORSE_desc_t *AD, MORSE_desc_t *Ark, unsigned long long int seed, int maxrank, double tol, int compress_diag, MORSE_desc_t *Dense, MORSE_sequence_t *sequence, MORSE_request_t *request)
Definition: zgytlr.c:155
int uplo[2]
void hicma_pzgytlr(MORSE_enum uplo, MORSE_desc_t *AUV, MORSE_desc_t *AD, MORSE_desc_t *Ark, unsigned long long int seed, int maxrank, double tol, int compress_diag, MORSE_desc_t *Dense, MORSE_sequence_t *sequence, MORSE_request_t *request)
Definition: pzgytlr.c:50