Hello,
I successfully built clmagma-1.3 on my machine and tests run successfully. However, I realized that the magmaf_ fortran interfaces are not present in the resulting binaries.
I have a C++ legacy code that relies on a standard lapack API and would be cumbersome to modify it: with Magma I could use the magmaf_ interfaces to do the job, how can I compile those interfaces in this case?
Thanks in advance!
Paolo
clmagma: magmaf_ interfaces not present in complied library
-
paoloviviani
- Posts: 14
- Joined: Mon Nov 09, 2015 12:17 pm
Re: clmagma: magmaf_ interfaces not present in complied libr
At the moment, we haven't developed a means to represent the necessary data structures in Fortran. The Fortran files that are in clMAGMA are leftovers from the CUDA MAGMA version. Sorry. We'll keep this in mind for future work.
-mark
-mark
-
paoloviviani
- Posts: 14
- Joined: Mon Nov 09, 2015 12:17 pm
Re: clmagma: magmaf_ interfaces not present in complied libr
Many thanks for the reply!
Would it be possible to write proper interfaces within my code, possibly using those in CUDA Magma as a template? Are they expected to work? (the issue is only related to converting chars like *jobz to enums)
Would it be possible to write proper interfaces within my code, possibly using those in CUDA Magma as a template? Are they expected to work? (the issue is only related to converting chars like *jobz to enums)
Re: clmagma: magmaf_ interfaces not present in complied libr
The wrappers that are in clMAGMA/control/magma_*f77.cpp will not work. They are out dated, from when magma_uplo_t, etc. were chars.
There are wrappers in CUDA MAGMA control/magma_*f77.cpp that show how to convert the char* constants to integer constants. For instance:
Conversion functions are provided:
Currently for clMAGMA, you will also need to pass in queues to most routines. You could allocate & deallocate them in your wrappers, which adds some overhead. Or you could allocate & deallocate them in your application code and pass them to your wrappers.
-mark
There are wrappers in CUDA MAGMA control/magma_*f77.cpp that show how to convert the char* constants to integer constants. For instance:
Code: Select all
#define magmaf_zpotrf FORTRAN_NAME( magmaf_zpotrf, MAGMAF_ZPOTRF )
void magmaf_zpotrf(
const char* uplo, magma_int_t *n,
magmaDoubleComplex *A, magma_int_t *lda,
magma_int_t *info )
{
magma_zpotrf(
magma_uplo_const(*uplo), *n,
A, *lda,
info );
}
Code: Select all
magma_bool_t magma_bool_const ( char lapack_char );
magma_order_t magma_order_const ( char lapack_char );
magma_trans_t magma_trans_const ( char lapack_char );
magma_uplo_t magma_uplo_const ( char lapack_char );
magma_diag_t magma_diag_const ( char lapack_char );
magma_side_t magma_side_const ( char lapack_char );
magma_norm_t magma_norm_const ( char lapack_char );
magma_dist_t magma_dist_const ( char lapack_char );
magma_sym_t magma_sym_const ( char lapack_char );
magma_pack_t magma_pack_const ( char lapack_char );
magma_vec_t magma_vec_const ( char lapack_char );
magma_range_t magma_range_const ( char lapack_char );
magma_vect_t magma_vect_const ( char lapack_char );
magma_direct_t magma_direct_const( char lapack_char );
magma_storev_t magma_storev_const( char lapack_char );
-mark