Q. What to do when AutoPIPE crashes while importing an NTL file?


Applies To
Product(s):AutoPIPE
Version(s):ALL;
Area:
Date Logged
& Current Version
May 2020
12.03.00.17

Problem:

What to do when AutoPIPE crashes while importing an NTL file?

Solution:

Recall that NTL is a very rigid formatted file that AutoPIPE reads. Rigid format, means that all the components are written into Command Card formats that has a specific structure. any information missing or not in the correct line / column will cause AutoPIPE to ignore the data and write in default information. To get a better idea of these command cards, see the following AutoPIPE help section:

Help > Contents> Contents Tab> Bentley AutoPIPE> Batch Input Reference> Command Card Reference> select any command card.

When opening / importing any file into AutoPIPE all information is cashed into a sub-folder within AutoPIPE's temp directory. After saving / closing AutoPIPE, the original model file location is then updated and the temporary sub-folder deleted. However, IF AutoPIPE crashes or closed abruptly (ex. power failure), then the temporary folder is not deleted. Hence why AutoPIPE's temp folder may have a number of sub-folders listed. 

If AutoPIPE has crashed while opening an NTL file, then obviously there is an issue in the NTL file, what is it and where? Let us find out.

Start by closing AutoPIPE, open AutoPIPE temp folder, delete all the existing files / sub-folders, and try to import the PCF file / NTL file again.  After importing the file again, one or more of the following will be written to AutoPIPE's temp sub-folder: LOG, CHK, MSG, NTL. All of which can be opened by a word editing application (ex. NotePad++,ultra Edit, MS WORD, etc..

1. Open the LOG file in an editor. The LOG file is generated by AutoPIPE's PCF translator and provides detailed information on exactly what was written to the NTL file. Scan this file for errors.

2. Open the MSG file with an editor. This file provide details about processing difficult items, number of warnings, number of errors, etc.. Again, try to locate any errors and where they may have occurred. 

3. Open the CHK file with an editor. This file is generated by AutoPIPE as a model consistency check report. This is important to find specific errors / warnings that the user should know about / fix before running an analysis.

After reviewing the above files (LOG, MSG, CHK), now open the NTL file in an editor. Something in the previous files should have provide details or clues to what could be a problem while opening the NTL file in AutoPIPE. Try to locate those suspicious items and fix them. Again, because the NTL file is so rigid on syntax, highly suggest referring to the  Command Cards for correct format / information required (Note, the author has been working on these thing since 2007 and refers to the Command Cards quite frequently, because some things may have changed between versions and who coould possible remember all the syntax of ll the cards). 

After making a few changes, save the NTL file and try to open it using AutoPIPE. Continue to try and fix the NTL file while periodically trying to import the file.

Is the model able to import after making a few adjustments?

If yes, fantastic you Rock!

If no, then only other option is to use brute force to resolve what is causing the program to crash. See procedure below for Brute Force approach:

1. Close AutoPIPE

2. Clear AutoPIPE's temp folder as mentioned above. 

3. Try to translate PCF file / open NTL file again, so a new sub-folder is created in AutoPIPE's temp folder.

4. Open the NTL file in an editor (ex. original.NTL)

5. Save the NTL file as a new name (ex. 01.NTL)

6. Go to the last line in the model, see total number of lines in the file (ex. 65432)

7. Divide the total lines by 2, and go to that line number in the file (ex. 32716)

8. Go to start of the next command card after that line number calculated above. 

9. Delete all lines from that point to the end of the file (ex. delete lines 32720 to 65432).

10. Save the file, and try to open using AutoPIPE. 

Does the file open now?

No. repeat steps 4 - 10 again, starting with the file with the fewest lines (ex. 01.NTL now has 32720 line) 

Yes, the file opens. Great !!! continue below.

Continue Brute Force technique

Since the file now opens in AutoPIPE, we now know that the problem is in the 2nd half of the file (ex. between lines 32720 and 65432). Let us continue to find out where. 

Once we have established that the problem exists between 2 line numbers when need to  keep zero in on the exact component that is causing AutoPIPE to crash. There can be more than one but this approach fixes one issue at a time. 

Next set of steps:

11. Open the file where AutoPIPE continues to crash (ex. original.NTL)

12. Save file as new file name (ex. 02.NTL)

13. Since we know that the first half of the file is OK, and the problem exist after that, find the number of lines in the bad section of the file (ex. 65432 - 32720 =  32712)

14. Divide number of lines in bad section by 2,  and then add to previous number of lines that were able to be imported. (ex. 32720 + (32712 / 2) =  49076)

15. Again, go to that line number in the file (ex. 49076), then go to start of the next command card after that line number (ex. 49083). 

16. Again, delete all lines from that point to the end of the file (ex. delete lines 49083 to 65432).

17. Save the file, and try to open using AutoPIPE. 

Does the file open now?

Yes, the file opens. Great !!! continue by deleting fewer and fewer lines incrementally from the original file starting from the bottom up until the program fails to open in AutoPIPE. .

No. Fantastic. continue below

Continue Brute Force technique

Now we know that the problem exist after this point (ex. 32720) and before that point (ex. 49083). Therefore the problem is somewhere in between those lines. But where? 

Next step, continue to use the techniques mentioned above to zero in on the exact component causing the problem (instead of dividing by 2 use 3, 4,or more).  This seems like it will take a long time, but in only a few minutes one familiar with the technique can easily find a single problem in a rather large NTL file.

Notes:

1. All changes / fixes should be made to a copy of the original file. Because if there is more than one problem in the NTL file, using this Brute Force technique will quickly find it.   

See Also

Crashed when Importing / Inserting 

Bentley AutoPIPE