Closed fsoepyan closed 5 years ago
show=showList, rpath = self.parent().parent.dat.foqusSettings.rScriptPath,
We did not get the previous error message
Instead, we get this error message:
So this is a problem with additional R packages (abind and possibly others) not having been installed in your version of R. There are instructions in the manual. The solvent fit section will list the packages but will refer you to the acosso surrogate section for how to install those packages into your R.
@fsoepyan, says he will retest with the correct R packaged installed.
After I closed the previous error message, I got another message that says:
SolventFit: post.samples does not exist. Please consult the FOQUS UQ developers for assistance.
Unfortunately, this may be an issue with SolventFit, which is not in our wheelhouse. @ngbrenda : Is there any way you might be able to take a look at this? You are probably the person that has the best chance of figuring out what's happening here.
@fsoepyan : The last message is kind of just a catch-all to say that something failed in solvent fit, and the results file we were expecting was not written out.
@ngbrenda will look into this.
I am using R version 3.3.3
@sotorrio1 was able to run SolventFit using Rosenbrock data that he generated (N=100, Latin hypercube sampling scheme). It took about 10 minutes.
His R version is 3.5.1.
@sotorrio1 will see if the FOQUS psuade client is the source of this problem today with @ngbrenda and @ou3llnl.
@sotorrio1 says it doesn't appear that the psuade client is the problem here. They will meet tomorrow to look into it again.
@ngbrenda will take a look.
@sotorrio1 suspects that this might be an error in SolvenFit R code, specifically in foqus_lib/framework/solvenfit/solvfit_calibfit.R though his R is rusty these days...
@sotorrio1 will check with @ngbrenda this week on this.
Email thread with Sham Bhat from LANL below:
Hi Brenda,
I didn't run the code, but the following is my guess from looking at the code directly. The warning is probably coming from line 1465 in solvfit_calibfit. The matrix priorsmatr takes in 16 values from priors (coming from the defaults in the function getdefaults. But nrow(priorsmpar) is coming from the priors.txt file and has a value of 6. That will give you the warning.
I don't know why the priors.txt file has 6 rows (I think the 0 in row 6 was a binary variable on whether to use the point mass feature for that variable). If the point mass priors are enabled, then it should have 8 rows, otherwise, only the first five should be used. The way that the code is currently written, you could almost hardcode the number of rows as 8 and use NAs for rows 7-8 if the point mass feature was not to be used.
Sham
From: Ng, Brenda ng30@llnl.gov Sent: Wednesday, October 24, 2018 6:27:39 PM To: Bhat, Sham Cc: Sotorrio, Pedro; Keith Beattie Subject: FOQUS bug in SolventFit code
Hi Sham,
We ran: /usr/local/bin/Rscript solvfit_calibfit.R 0 2 2 /Users/ng30/ccsi/FOQUS/scratch/SolventFit_files/solventFitInputs.ordered solventFitOutputs.csv solvfit_calib.rds /Users/ng30/ccsi/FOQUS/scratch/SolventFit_files/expdata.csv /Users/ng30/ccsi/FOQUS/scratch/SolventFit_files/priors.txt NULL 0 0 0 [0,1000,1] 20 2 [0,1000,1] 20 2 0 1 NULL NULL
It completed, but has the following warning: Warning message: In matrix(c(priors$theta$type, priors$theta$a1, priors$theta$a2, : data length [16] is not a sub-multiple or multiple of the number of rows [6]
We did a grep but could not find the source of the error. Please help.
ng30@ng30md2:~/CCSI/FOQUS/scratch$ grep -n 'priors$theta' *.R solvfit_calibfit.R:288: inits$theta[priors$theta$type == 0] = priors$theta$pribds$a1[priors$theta$type == solvfit_calibfit.R:291: inits$samplevec$theta[priors$theta$type == 0] = 0 solvfit_calibfit.R:497: priors$theta, solvfit_calibfit.R:1328: priors$theta$a1 = rep(0, Npar) solvfit_calibfit.R:1330: priors$theta$a2 = rep(1, Npar) solvfit_calibfit.R:1332: priors$theta$type = rep(4, Npar) solvfit_calibfit.R:1334: priors$theta$pribds$a1 = rep(0, Npar) solvfit_calibfit.R:1335: priors$theta$pribds$a2 = rep(1, Npar) solvfit_calibfit.R:1337: priors$theta$pm = rep(0, Npar) solvfit_calibfit.R:1339: priors$theta$prob = rep(0, Npar) solvfit_calibfit.R:1341: priors$theta$def = rep(0.5, Npar) solvfit_calibfit.R:1358: priors$theta$pm = rep(1, Npar) solvfit_calibfit.R:1467: priors$theta$type, solvfit_calibfit.R:1468: priors$theta$a1, solvfit_calibfit.R:1469: priors$theta$a2, solvfit_calibfit.R:1470: priors$theta$pribds$a1, solvfit_calibfit.R:1471: priors$theta$pribds$a2, solvfit_calibfit.R:1472: priors$theta$pm, solvfit_calibfit.R:1473: priors$theta$prob, solvfit_calibfit.R:1474: priors$theta$def solvfit_calibfit.R:1483: priors$theta$type = priorsmatr[1, ] solvfit_calibfit.R:1485: priors$theta$a1 = priorsmatr[2, ] solvfit_calibfit.R:1487: priors$theta$a2 = priorsmatr[3, ] solvfit_calibfit.R:1489: priors$theta$pribds$a1 = sapply(priorsmatr[4, ], max, 0) solvfit_calibfit.R:1491: priors$theta$pribds$a2 = sapply(priorsmatr[5, ], min, 1) solvfit_calibfit.R:1495: priors$theta$pm = priorsmatr[6, ] solvfit_calibfit.R:1497: priors$theta$prob = priorsmatr[7, ] solvfit_calibfit.R:1499: priors$theta$def = priorsmatr[8, ]
Thanks, Brenda
@sotorrio1 will try to get to this, this week.
@fsoepyan would you mind checking if this is still an issue in the new FOQUS version with python 3? I assume it's still the case, just want to make sure :) Thanks!
@fsoepyan thanks Byron. It looks like the same error is happening so we'll try to take a look at it
This too is waiting on #408, on if it should even be fixed.
PR #474
Will close, revisiting we decide to keep the basic data tab