Errors in Dos format

General discussion of the Cambridge quantum Monte Carlo code CASINO; how to install and setup; how to use it; what it does; applications.

Errors in Dos format

Postby Nguyen_Oanh » Wed Oct 26, 2016 7:15 am

Dear users!
When I run CASINO program to calculate for C2HF with
I have a problem with DOS format when I optimise the trial wave function
File '/home/oanhnguyen/Desktop/C2HF/input' appears to be in DOS format.
DOS2UNIX cannot be found. Please convert this file by hand, or use the
-f option to runqmc to bypass error checking.

I used optimise for Jastrow and backflow factor or only Jastrow, this error were appeared.
So, How can I fix it ?
Posts: 17
Joined: Mon Sep 12, 2016 10:32 am

Re: Errors in Dos format

Postby Mike Towler » Wed Oct 26, 2016 9:18 am

Hi Nguyen,

This means (probably) that your file 'input' was created on a Windows machine and you're trying to use it on a Unix/Linux machine or a modern Mac. To quote the dos2unix man page:

Code: Select all
The Dos2unix package includes utilities "dos2unix" and "unix2dos" to convert plain text files in DOS or Mac format to Unix format and vice versa. In DOS/Windows text files a line break, also known as newline, is a combination of two characters: a Carriage Return (CR) followed by a Line Feed (LF). In Unix text files a line break is a single character: the Line Feed (LF). In Mac text files, prior to Mac OS X, a line break was single Carriage Return (CR) character. Nowadays Mac OS uses Unix style (LF) line breaks.

The runqmc script is aware that this can happen, and if it finds you're using a DOS input file it will automatically run the standard utility 'dos2unix' to convert it before CASINO tries to read it and crashes.. However, it's telling you that it can't find dos2unix and that's probably because you don't have it installed. Thus - install it.. ('sudo apt-get install dos2unix' or whatever, depending on what Linux distribution you're running.)

Mike Towler
Posts: 234
Joined: Thu May 30, 2013 11:03 pm
Location: Florence

Return to The CASINO program

Who is online

Users browsing this forum: No registered users and 3 guests