Skip to content

Commit

Permalink
double-comples as argments for isfinite is not arrowed in GCC5
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuaki1987 committed Aug 22, 2017
1 parent 63d25b8 commit 817aa61
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mVMC/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ int calculateMAll_BF_fcmp_child(
/* calculate Pf M */
M_ZSKPFA(&uplo, &mthd, &n, invM, &lda, &pfaff, iwork, work, &lwork, rwork, &info); //TBC
if(info!=0) return info;
if(!isfinite(pfaff)) return qpidx+1;
if(!(isfinite(creal(pfaff)) && isfinite(cimag(pfaff)))) return qpidx+1;
PfM[qpidx] = pfaff;

/* DInv */
Expand Down
2 changes: 1 addition & 1 deletion src/mVMC/vmccal.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ void VMC_BF_MainCal(MPI_Comm comm) {
/* calculate double occupation D */
db = CalculateDoubleOccupation(eleIdx, eleCfg, eleNum, eleProjCnt);
StopTimer(41);
if (!isfinite(e)) {
if (! (isfinite(creal(e)) && isfinite(cimag(e)))) {
fprintf(stderr, "waring: VMCMainCal rank:%d sample:%d e=%e\n", rank, sample, creal(e));
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/mVMC/vmcmake.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ void VMC_BF_MakeSample(MPI_Comm comm)

CalculateMAll_BF_fcmp(TmpEleIdx, qpStart, qpEnd);
logIpOld = CalculateLogIP_fcmp(PfM, qpStart, qpEnd, comm);
if (!isfinite(logIpOld)) {
if (! (isfinite(creal(logIpOld)) && isfinite(cimag(logIpOld)))) {
if (rank == 0) fprintf(stderr, "waring: VMCMakeSample remakeSample logIpOld=%e\n", creal(logIpOld)); //TBC
makeInitialSampleBF(TmpEleIdx, TmpEleCfg, TmpEleNum, TmpEleProjCnt, TmpEleProjBFCnt,
qpStart, qpEnd, comm);
Expand Down

0 comments on commit 817aa61

Please sign in to comment.