Author Topic: Unable to run quoFEM  (Read 4329 times)

allenyoga_lee

  • Newbie
  • *
  • Posts: 4
    • View Profile
Unable to run quoFEM
« on: August 12, 2023, 01:57:07 AM »
To whom that may concern,

I'm trying to use the quoFEM (Bayesian) to run model calibration. However, it seems to be constantly running even when the 'local results' directory has reached the preset sample size. Therefore, I'm not getting any result from the it. I've attached all the files I used for quoFEM (including the Jason file).  I'm not sure if my codes have issues since the app wasn't giving me any errors. It would be really helpful if someone could have a look at it and let me know how to resolve the problem.

Thank you very much  ;D

Best regards,
Allen

AakashBS

  • Global Moderator
  • Newbie
  • *****
  • Posts: 38
    • View Profile
Re: Unable to run quoFEM
« Reply #1 on: August 12, 2023, 04:03:35 AM »
Hello Allen,

Short answer:
From the attached JSON file, I see that you are using the TMCMC algorithm for Bayesian calibration. Please wait until the analysis is finished. If it was successful, you will see the results of the Bayesian calibration displayed in the RES panel of quoFEM. If the analysis fails, you will receive an error message in the message area in quoFEM. Until either of these two events occurs, the analysis is still progressing, even though it appears that nothing is happening when you see that the preset sample size number of work directory are created. The same directories are being reused while the analysis is running.

Longer answer:
It is typically not easy to sample the posterior probability distribution of the parameters of complex models such as the finite element model that you are using. To complete this hard task, the Transitional Markov chain Monte Carlo (TMCMC) algorithm constructs and samples a sequence of intermediate distributions, starting with the prior probability distribution. Sampling each of the intermediate densities requires propagating a Markov chain for a few steps (each step requires the model to be run). So, to generate the requested number (say 'Ns') of sample values from the posterior, the analysis will require (#intermediate_stages*#Markov_chain_steps_per_stage)*Ns model evaluations. So, once Ns model evaluations are complete (i.e., the preset sample size number of workdirs are created in the local results directory), this process repeats itself (#intermediate_stages*#Markov_chain_steps_per_stage) times. You will need to wait until this process completes to see the results of the analysis in quoFEM.

How long do you need to wait?
The number of intermediate distributions required to transition from the prior to the posterior depends on how different the prior is from the posterior. Since this is not known when the sampling is started, it is not possible to predict how many intermediate stages are necessary for a given problem. Typically, this number is in the range of 5-30 (the number may be much larger for your problem, it is not possible to know this beforehand). The number of Markov chain steps per stage is about 10. So, you will have to wait ~100 times the amount of time it takes to complete Ns model evaluations once. If this time is too large to run the analysis locally on your machine, and once you are sure that your model is setup correctly in quoFEM, you can use the 'RUN at DesignSafe' option in quoFEM. DesignSafe provides you access to a large number of processors, which allows you to run a much larger number of model evaluations concurrently. This brings down the time needed to run Ns model evaluations (however, the number of intermediate stages and the number of Markov chain steps does not change), and makes it feasible for you to perform Bayesian calibration of complex models which would not be possible without large computational resources.

How can you monitor the progress of the analysis while it is running?
A file called 'logFileTMCMC.txt' records the progress of the analysis in the 'tmp.SimCenter' directory within the local results directory. You can find the current stage number towards the end of the file. You will also find the value of a variable called 'beta' recorded in each stage. Intermediate stages are required until beta reaches a value of 1. Beta starts at 0 and initially grows very slowly, but the increase in beta typically accelerates, so do not be worried if you see that the value of beta is very small in the initial stages.
At the end of every stage, a new CSV file called 'resultsStage_.csv' containing the set of sample values from the intermediate density at that stage is written. This also is an indication that the analysis is progressing.

Hope this helps, and that you are able to effectively calibrate your model using quoFEM.

Best regards,
Aakash

allenyoga_lee

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Unable to run quoFEM
« Reply #2 on: August 14, 2023, 07:52:53 PM »
Hi Aakash,

Thank you so much for the prompt response.

I've successfully retrieved the data from quoFEM. However, I encountered another issue when I tried to run two different models simultaneously using "RUN at DesignSafe". Once I tried to retrieve the data from the status "FINISHED", it gave me this error code:

ERROR: No dakotaTab.out file - TMCMC failed .. possibly no QoI

I'm pretty sure I had correctly assigned the QoI to the model. By the way, I've set the remote jobs directory of two calibration models as different folders. Does that mean I shouldn't run two models at the same time?

Thanks again for helping.

allenyoga_lee

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Unable to run quoFEM
« Reply #3 on: August 14, 2023, 10:31:59 PM »
Hi,

It seems not to be the problem with the remote jobs directory. The following attachments are the input files for the error calibration. I feel like it might be something wrong with the code, but I'm not sure what went wrong.

Is it possible for you to have a look at it? Thank you.

Allen

AakashBS

  • Global Moderator
  • Newbie
  • *****
  • Posts: 38
    • View Profile
Re: Unable to run quoFEM
« Reply #4 on: August 15, 2023, 04:00:56 AM »
Hi Allen,

Could you check if you had included the data file in the folder where your model files are? It was not in the list of files that you had last shared, and the analysis will not run without the data file. I was able to start the analysis locally as well as remotely after including the calibration data file from your first post in the directory with the model script. Please let me know if that resolved the issue.

Best,
Aakash

allenyoga_lee

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Unable to run quoFEM
« Reply #5 on: August 15, 2023, 04:56:27 PM »
Hi Aakash,

Yes, I've included the calibration data file. In the 'get from designsafe' it shows FINISHED, but when I retrieve the data it's still giving me the 'ERROR: No dakotaTab.out file - TMCMC failed .. possibly no QoI' error line.

I'm wondering if it's due to the irrelevant extra files I have in the model code folder. Would that mess up the system? I'll give it another try by including only the necessary files in the folder.

Thanks.

Allen
« Last Edit: August 15, 2023, 05:02:00 PM by allenyoga_lee »