1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-12-22 20:36:01 +01:00

Merge branch 'master' into gpu

This commit is contained in:
Anthony Scemama 2022-04-04 12:11:57 +02:00
commit 7e56b3e2ed
2 changed files with 20 additions and 14 deletions

View File

@ -200,16 +200,22 @@ AS_IF([test "$BLAS_LIBS" == "$LAPACK_LIBS"], [BLAS_LIBS=""])
# Specific options required with some compilers
case $FC in
ifort*)
*ifort*)
FCFLAGS="$FCFLAGS -nofor-main"
;;
#gfortran*)
# # Order is important here
# FCFLAGS="-cpp $FCFLAGS"
# ;;
*nvfortran*)
FCFLAGS="$FCFLAGS -fPIC -Mnomain"
;;
esac
case $CC in
*nvc*)
CFLAGS="$CFLAGS -fPIC"
;;
esac
# Options.
@ -358,7 +364,7 @@ CC..............: ${CC}
CPPFLAGS........: ${CPPFLAGS}
CFLAGS..........: ${CFLAGS}
FC..............: ${FC}
FCLAGS..........: ${FCFLAGS}
FCFLAGS.........: ${FCFLAGS}
LDFLAGS:........: ${LDFLAGS}
LIBS............: ${LIBS}
USE CHAMELEON...: ${with_chameleon}

View File

@ -169,7 +169,7 @@ qmckl_context qmckl_context_check(const qmckl_context context) {
if (context == QMCKL_NULL_CONTEXT)
return QMCKL_NULL_CONTEXT;
const qmckl_context_struct* const ctx = (const qmckl_context_struct* const) context;
const qmckl_context_struct* const ctx = (const qmckl_context_struct*) context;
/* Try to access memory */
if (ctx->tag != VALID_TAG) {
@ -209,7 +209,7 @@ qmckl_context_touch(const qmckl_context context)
NULL);
}
qmckl_context_struct* const ctx = (qmckl_context_struct* const) context;
qmckl_context_struct* const ctx = (qmckl_context_struct*) context;
ctx->date += 1UL;
ctx->point.date += 1UL;
@ -234,7 +234,7 @@ qmckl_context qmckl_context_create();
qmckl_context qmckl_context_create() {
qmckl_context_struct* const ctx =
(qmckl_context_struct* const) malloc (sizeof(qmckl_context_struct));
(qmckl_context_struct*) malloc (sizeof(qmckl_context_struct));
if (ctx == NULL) {
return QMCKL_NULL_CONTEXT;
@ -350,7 +350,7 @@ void qmckl_unlock(qmckl_context context);
void qmckl_lock(qmckl_context context) {
if (context == QMCKL_NULL_CONTEXT)
return ;
qmckl_context_struct* const ctx = (qmckl_context_struct* const) context;
qmckl_context_struct* const ctx = (qmckl_context_struct*) context;
errno = 0;
int rc = pthread_mutex_lock( &(ctx->mutex) );
if (rc != 0) {
@ -362,7 +362,7 @@ void qmckl_lock(qmckl_context context) {
}
void qmckl_unlock(const qmckl_context context) {
qmckl_context_struct* const ctx = (qmckl_context_struct* const) context;
qmckl_context_struct* const ctx = (qmckl_context_struct*) context;
int rc = pthread_mutex_unlock( &(ctx->mutex) );
if (rc != 0) {
fprintf(stderr, "DEBUG qmckl_unlock:%s\n", strerror(rc) );
@ -401,10 +401,10 @@ qmckl_context qmckl_context_copy(const qmckl_context context) {
{
const qmckl_context_struct* const old_ctx =
(qmckl_context_struct* const) checked_context;
(qmckl_context_struct*) checked_context;
qmckl_context_struct* const new_ctx =
(qmckl_context_struct* const) malloc (context, sizeof(qmckl_context_struct));
(qmckl_context_struct*) malloc (context, sizeof(qmckl_context_struct));
if (new_ctx == NULL) {
qmckl_unlock(context);
@ -467,7 +467,7 @@ qmckl_context_destroy (const qmckl_context context)
const qmckl_context checked_context = qmckl_context_check(context);
if (checked_context == QMCKL_NULL_CONTEXT) return QMCKL_INVALID_CONTEXT;
qmckl_context_struct* const ctx = (qmckl_context_struct* const) context;
qmckl_context_struct* const ctx = (qmckl_context_struct*) context;
assert (ctx != NULL); /* Shouldn't be possible because the context is valid */
qmckl_lock(context);