Please wait...
×

Error

Posted Tue, 31 May 2011 12:55:46 GMT by fubzot
I am trying to run PEST 12.1.0 on a FEFLOW 6.0 model.

I get the following error when initiating PEST:
[quote]
Error condition prevents continued PEST execution:-
Cannot open model output file
[/quote]

[b]Source of error[/b]
FEFLOW writes ASCII .fem files using UNIX type newlines (LF) and PEST needs Windows type newlines CR/LF.

A .fem file was edited and used for "PEST template file" i.e. using UNIX type newlines.
When PEST atempts to write a new .fem file for the first model run, it fails and returns an empty 0K file.
FEFLOW can't load the .fem file since it "empty" (0K) and exits with an unexpected EOF error.
PEST running independantly asumes the model has completed first run and tries to access the result file "output.dar".
Output.dar is not there since the model-run has not been completed.
Hence, the error

[b]Resolution[/b]
If your "PEST template file" was based on a FEFLOW .fem file, all newlines must be converted from LF -> CRLF
This you have to do when generating the file.

When running PEST it initiates FEFLOW several consecutive times, each time producing a new .fem and .dar/.dac file.
All newlines in these files must be converted from LF -> CRLF prior to PEST accessing the files.
Do this in the batch file you specify under "*model command line" in the "PEST control file"

To do the actual conversion you can write a small routine or include this nifty tool in your PATH:
[url=http://www.stahlforce.com/dev/index.php?tool=remcrlf&back=dev]http://www.stahlforce.com/dev/index.php?tool=remcrlf&back=dev[/url]

For your reference here is my batch file:
[code]
@echo off
start /min /wait "" "sfk" lf-to-crlf -dir femdata -file .fem -norec
start /min /wait "" "C:\Program Files\WASY\FEFLOW 6.0\bin64\feflow60c.exe" -work C:\Users\XXX\Desktop\PEST_Calibration\ -ascii -dar output.dar input.fem
start /min /wait "" "sfk" lf-to-crlf -dir results -file .dar -norec
[/code]

Cheers,
Posted Wed, 08 Jun 2011 10:36:52 GMT by CD
I have exactly the same problem.

Nevertheless I didn´t solve it.

Now it is true that the file.fem has been  created (before as you said it wasn´t) but the file that is created it is not opened by Feflow.

Actually if I try to open the new fem file directly with Feflow I have an error message saying that "Unexpected file data are found. Terminating..." and "control data of fem input are not avalaible".

My question is if I converted the file to be read by PEST, then I would have to convert it again to Feflow?. In this case instead of two conversions (for the .fem and for the results) I would have to do four (doing and undoing the conversion)?

Thanks
Posted Thu, 09 Jun 2011 09:52:55 GMT by fubzot
First to answer your question:
FEFLOW is capable of opening the converted files i.e. the files with Windows newlines (CRLF). So you never need to covert CRLF to LF.

Second, a guess to the cause of your problem:
From what you describe PEST generates the new .fem file without error. However, you might have to check that the values PEST writes to the new .fem file can be read by feflow.
This problem might be caused by an error in your template file e.g. a missing whitespace. However, this is only a guess

[quote author=CD link=topic=1030.msg2527#msg2527 date=1307529412]
I have exactly the same problem.

Nevertheless I didn´t solve it.

Now it is true that the file.fem has been  created (before as you said it wasn´t) but the file that is created it is not opened by Feflow.

Actually if I try to open the new fem file directly with Feflow I have an error message saying that "Unexpected file data are found. Terminating..." and "control data of fem input are not avalaible".

My question is if I converted the file to be read by PEST, then I would have to convert it again to Feflow?. In this case instead of two conversions (for the .fem and for the results) I would have to do four (doing and undoing the conversion)?

Thanks
[/quote]
Posted Thu, 07 Jul 2011 12:32:05 GMT by CD
I continue with the problem.

The template file is ok because when I replace the the text between symbols % ....% by a number, FEFLOW is working well.

The problem is the new fem file that was generated by PEST. Effectively when I compared with a text comparer the file generated by PEST and the original generated by FEFLOW, the diferences are at the end of the lines. So I thought that is my way of converting the file from LF to CRLF.

I converted directly with SFK and I had the message saying that the file has been converted correctly, but FEFLOW continues without running with this file. Also when I tried to compare the converted file and the previous one with the text comparer, there aren´t differences.

There are more ways of converting this files or checking that the conversion was did it properly? I´m surprised that not more people is detecting this problem. Can be related with the last version of PEST? because I don´t see that previously this problem was detected.
Posted Mon, 11 Jul 2011 12:39:00 GMT by fubzot
Hi,

You have to convert lineendings in the .fem file that was generated by PEST before launching feflow.

This is done in the batch file used to run FEFLOW before starting feflow

[b]This is what the first line in the example batch file does:[/b]

[code]@echo off
start /min /wait "" "sfk" lf-to-crlf -dir femdata -file .fem -norec
start /min /wait "" "C:\Program Files\WASY\FEFLOW 6.0\bin64\feflow60c.exe" -work C:\Users\XXX\Desktop\PEST_Calibration\ -ascii -dar output.dar input.fem
start /min /wait "" "sfk" lf-to-crlf -dir results -file .dar -norec[/code]

You must be signed in to post in this forum.