Gid calculation error in Linux

I am using GiD in linux. I have used it in windows and there was no problem, but, right now, I am getting an error (please loot at the attached file).
Do you have any idea what might cause the error?


Thanks

The error is self-explained: your file UWquad2D.bat file is wrong for Linux,
and by its end-lines (\r\n) seems that has been created in a Windows OS (on Linux ASCII files the lines ends with \n)

Are you the UWquad2D problemtype developer?
Have you compiled the calculation .exe that probably is started from the .bat for this Linux platform?

If the solver is not compiled for Linux it won’t be possible to calculate in this platform!!

and in Linux/Mac Os X (FreeBSD based) the .bat and the exe file must have set true the ‘execution’ flag, else won’t be executed


Usually instead of .bat file there are provided a file .win.bat (for Windows) and a file .unix.bat (for Linux, MacOSX or Unix platforms)
GiD start the .win.bat or the .unix.bat depending on the current platform.

The contents of the .win.bat and .unix.bat must be different.

.win.bat is like a classical MSDOS/Windows bat file (script with Windows DOS console commands, but a little restricted, only the command explained in the GiD documentation are valid, because is interpreted by GiD, not by cmd.exe of the operating system)

.unix.bat is a classical Unix/Linux console file, and its syntax depend on the shell declared on the first line
available shells depends on the OS. ‘sh’ is recommended because is available by default in most current Linux distributions
other possible shells are ‘bash’, ‘csh’, etc.

Note: have a look to our example: \problemtypes\Examples\cmas2d.gid

I am not one of the developers and I am just using the problemtype. I believe they have not released any Unix version of the problem type.
To be honest, I am not sure if I understand your point correctly. I have compiled and run gid on Linux platform but I am not sure what the *.bat file does here because what it shows in Windows version seems not to do a significant job! Here is the windows *.bat script:

@ECHO OFF
rem set basename = %1
rem set directory = %2
rem set ProblemDirectory = %3

del %1.flavia.res
rem OutputFile: %2%1.tcl
rem ErrorFile: %2%1.err
copy %1.dat %1.tcl
del %1.dat

Do I need to translate it to Linux bash script? Or I need to rewrite another *.bat file based on the unix example you mentioned?

Bests

This bat file is not starting any other program, is only writing its input calculation file
In fact, finding in Internet seems that UWQuad2D is a old problemtype related to OpenSees.

In order to calculate you will need an appropriated version of OpenSees compiled for your Linux (and compatible with the version format of the input file)

The bat file is basically only renaming from .dat to .tcl the calculation file written by GiD (according to the .bas template of the problemtype)

You can to write a similar .unix.bat file, but I think that is not interesting.
You can simply manually rename the .dat to .tcl outside GiD. Probably you won’t be able to calculate it with OpenSees
(must do it in a console outside GiD, the current problemtype is not trying to run it directly from GiD)

Thank you.
I managed to solve the problem by changing .bat file content to something simple. As you said it does not run any other program and it does not need to contain important stuff.


Bests

And that didn’t cause any other errors, Payoubi? That’s a pretty clever solution if it indeed works without issues.

Yeah, I was surprised to see it working but it’s working fine right now.

It it not surprising. As I have explained the .bat is an additional file to automatically start the calculation program with appropriated input.
If you simply delete the file it will also work. GiD will write the .dat input file (based on the .bas template) and won’t do nothing more.