diff --git a/DESCRIPTION b/DESCRIPTION index 7cd9676c9..7a47f6dc5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: qtl -Version: 1.49-2 -Date: 2021-08-05 +Version: 1.49-3 +Date: 2021-09-25 Title: Tools for Analyzing QTL Experiments Author: Karl W Broman and Hao Wu, with ideas from Gary Churchill and Saunak Sen and contributions from diff --git a/NEWS.md b/NEWS.md index 63f9e8c01..616c3ab60 100644 --- a/NEWS.md +++ b/NEWS.md @@ -27,6 +27,9 @@ copyright (c) 2001-2021, Karl W Broman - Revised qtlversion() to handle a case like "1.50". +- Added `#define USE_FC_LEN_T` in C code that calls Fortran, because + of a change in R 3.6.5 that's going to be required in R 4.2.0. + ## Version 1.48, 2021-03-24 diff --git a/src/effectscan.c b/src/effectscan.c index c949e9dde..206612c25 100644 --- a/src/effectscan.c +++ b/src/effectscan.c @@ -2,9 +2,9 @@ * * effectscan.c * - * copyright (c) 2007-8, Karl W Broman + * copyright (c) 2007-2021, Karl W Broman * - * last modified Jan, 2008 + * last modified Sep, 2021 * first written Sep, 2007 * * This program is free software; you can redistribute it and/or @@ -28,9 +28,11 @@ * **********************************************************************/ +#define USE_FC_LEN_T #include #include #include +#include #include #include #include @@ -38,6 +40,9 @@ #include #include "effectscan.h" #include "util.h" +#ifndef FCONE +# define FCONE +#endif /* R_effectscan: wrapper for effectscan */ @@ -126,7 +131,7 @@ void effectscan(int nind, int ngen, int ndraws, int npos, if(!flag[i]) { /* linear regression */ F77_CALL(dgels)("N", &nind, &ngen, &nphe, x, &nind, resid, &nind, - dwork, &lwork, &info); + dwork, &lwork, &info FCONE); /* coefficient estimates */ for(j=0; j #include #include +#include #include #include #include @@ -37,6 +39,9 @@ #include #include "lapackutil.h" #define TOL 1e-12 +#ifndef FCONE +# define FCONE +#endif /* DGELSS function */ @@ -48,7 +53,7 @@ void mydgelss (int *n_ind, int *ncolx0, int *nphe, double *x0, double *x0_bk, /* use dgels first */ F77_CALL(dgels)("N", n_ind, ncolx0, nphe, x0, n_ind, tmppheno, n_ind, - work, lwork, info); + work, lwork, info FCONE); /* if there's problem like singular, use dgelss */ /* note that x0 will contain the result for QR decomposition. @@ -81,21 +86,15 @@ void mydgemm(int *nphe, int *n_ind, double *alpha, double *tmppheno, double *beta, double *rss_det) { F77_CALL(dgemm)("T", "N", nphe, nphe, n_ind, alpha, tmppheno, n_ind, - tmppheno, n_ind, beta, rss_det, nphe); + tmppheno, n_ind, beta, rss_det, nphe FCONE FCONE); } /* DPOTRF */ void mydpotrf(int *nphe, double *rss_det, int *info) { - F77_CALL(dpotrf)("U", nphe, rss_det, nphe, info); + F77_CALL(dpotrf)("U", nphe, rss_det, nphe, info FCONE); } -/*DPOTRS */ -void mydpotrs(char *uplo, int *n, int *nrhs, double *A, - int *lda, double *B, int *ldb, int *info) -{ - F77_CALL(dpotrs)(uplo, n, nrhs, A, lda, B, ldb, info); -} /* end of lapackutil.c */ diff --git a/src/lapackutil.h b/src/lapackutil.h index 00f10650d..561a3c611 100644 --- a/src/lapackutil.h +++ b/src/lapackutil.h @@ -23,7 +23,7 @@ * * These are some wrapper functions for several LAPACK routines. * - * Contains: mydgelss, mydgemm, mydpotrf, mydpotrs + * Contains: mydgelss, mydgemm, mydpotrf * **********************************************************************/ @@ -39,8 +39,4 @@ void mydgemm(int *nphe, int *n_ind, double *alpha, double *tmppheno, double *bet /* DPOTRF */ void mydpotrf(int *nphe1, double *rss_det, int *info); -/* DPOTRS */ -void mydpotrs(char *uplo, int *n, int *nrhs, double *A, - int *lda, double *B, int *ldb, int *info); - /* end of lapackutil.h */ diff --git a/src/util.c b/src/util.c index f7fc9fd7a..4afd7fae3 100644 --- a/src/util.c +++ b/src/util.c @@ -41,7 +41,6 @@ **********************************************************************/ #include -/* #include */ #include "util.h" #define THRESH 200.0 @@ -702,17 +701,6 @@ void locate_xo(int n_ind, int n_mar, int type, int **Geno, } /* end loop over individuals */ } -/* multiply two matrices - I'm using dgemm from lapack here */ -/* - void matmult2(double *result, double *a, int nrowa, - int ncola, double *b, int ncolb) - - { - double alpha=1.0, beta=1.0; - F77_CALL(dgemm)("N", "N", &nrowa, &ncolb, &ncola, &alpha, a, &nrowa, - b, &ncola, &beta, result, &nrowa); - } -*/ void matmult(double *result, double *a, int nrowa, int ncola, double *b, int ncolb)