General: Changing the default decimal point character
Hello all,
how can I change the character used to represent the decimal point in acuConsole? The problem is, for example, when I run Generate Mesh from acuConsole and create the files in CAD.DIR, the non-manifold model file is created, but all coordinates in there use a comma ',' as decimal point symbol. Starting acuMeshSim afterwards leads to an error:
acuMeshSim: <SIMM_ERR_MSG>:Code: 104 String: Bad data encountered in file unknown
When I manually change all the commas to points in the .smd file, I get a non-matching checksum error (obviously).
Anyone had that problem or know how to solve it? I am running under Linux (english).
Thanks,
Bjoern
Answers
-
Hi Bjoern,
The data present in the CAD.DIR is written by AcuConsole and is in the native CAD kernel's format (i.e. Parasolid, ACIS, etc.) so you should never have a need to modify that. It sounds like that file either isn't being written properly, or there are non-english characters in the filename or file itself that are causing a problem. Can you post the full log file from AcuMeshSim as well as the full .ams file? That may help to identify the problem better.
0 -
Thanks for the reply. I've attached the log-file as well as my .ams and .smd file (where the commas are. I also had to add a txt extension to fool the uploader). I am running the W1_Demo_Pipe_Flow case, following the instructions from the accompanying pdf.
To prove my theory: When I tried the W6_Flow_Over_Rigid_Cylinder I encountered a similar problem. In that case, though, the corrupt file was rigid1.crd and I was able to run the case by manually replacing all , by . in that file.
If the underlying Python program to read/write the files uses the locale module, could it make a difference, that our licence server has a german linux installation (using , as a dec point)? just guessing here.
EDIT: I checked with our admin. The locale on both the licence server and the machine I'm running acuConsole on is 'en_US.UTF-8'
Any help is appreciated.
Thanks,
Bjoern
0 -
This is really odd. I am guessing it is picking up something from your locale settings as you mentioned. All of the file I/O is handled by python wrapped C functions, so I am not sure how the locale settings would be making their way into those functions. Please post the output of the following command (executed on the local machine that you are running acuConsole on):
$> localeThat may give us some more hints.
0 -
I've been fiddling with these settings, but even using 'export LC_ALL='en_US.UTF-8' does not change anything. Nevertheless, here is the output from locale:
$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE='en_US.UTF-8'
LC_NUMERIC='en_US.UTF-8'
LC_TIME='en_US.UTF-8'
LC_COLLATE='en_US.UTF-8'
LC_MONETARY='en_US.UTF-8'
LC_MESSAGES='en_US.UTF-8'
LC_PAPER='en_US.UTF-8'
LC_NAME='en_US.UTF-8'
LC_ADDRESS='en_US.UTF-8'
LC_TELEPHONE='en_US.UTF-8'
LC_MEASUREMENT='en_US.UTF-8'
LC_IDENTIFICATION='en_US.UTF-8'
LC_ALL=en_US.UTF-80 -
OK. These settings should be sufficient to force the decimals to be written. Can you try another test? Unpack the attached zip file, then execute 'acuPrep' from within the channel directory. Once it completes, have a look at ACUSIM.DIR/channel.0.slv. See if this contains commas or periods for the decimals.
0 -
This seems to run perfectly. All floats are with periods in ACUSIM.DIR/channel.0.slv . But as I said: I've been able to run cases before, it's just the meshing that doesn't seem to work (acuMeshSim)
0 -
Ok. Thanks for doing the test. This narrows the problem down. acuPrep's file I/O functions are direct C calls whereas acuConsole's I/O relies on a python wrapper to the C functions.
Are you seeing this on any other systems or just this one machine?
0 -
I am currently running tests on a completely different system (different linux distro, different licence server, different network). So far I am running into the same problems.
I found a solution, yet not the cause of the problem: If I change the locale settings by
export LC_ALL=en_US.UTF-8first thing after logging into the machine, it works. As soon as I do anything Acusolve related, it breaks. Even when changing the locale afterwards. Maybe there is a problem in acusim.sh?
If I can help in any way by running more tests, please let me know. I am just starting to use the software and I would like to see it working /emoticons/default_wink.png' alt=';)' srcset='/emoticons/wink@2x.png 2x' width='20' height='20'>
0 -
Can you tell me the exact steps that produce a successful result (i.e. log-in, open terminal, launch AcuConsole using the full path, etc.)? Then let me know what steps cause the failure (log-in, open terminal, source acusim.sh, launch AcuConsole, etc.)? Do you have any references to locale settings in your .login or .bashrc files? Also, are you sourcing the acusim.sh file in your .login or .bashrc files?
Lastly, what Linux distro and desktop environment are you running?
0 -
Here is what DOES NOT work:
- log in to new terminal
- locales:
LANG=en_US.UTF-8LANGUAGE=en_USLC_CTYPE='en_US.UTF-8'LC_NUMERIC=de_DE.UTF-8LC_TIME=de_DE.UTF-8LC_COLLATE='en_US.UTF-8'LC_MONETARY=de_DE.UTF-8LC_MESSAGES='en_US.UTF-8'LC_PAPER=de_DE.UTF-8LC_NAME=de_DE.UTF-8LC_ADDRESS=de_DE.UTF-8LC_TELEPHONE=de_DE.UTF-8LC_MEASUREMENT=de_DE.UTF-8LC_IDENTIFICATION=de_DE.UTF-8LC_ALL=
- go to <INSTALL_DIR>/acusolve/linux64/examples/pipe:
1 - start acuConsole
2 - open pipe.acs
3 - Tools -> Generate Mesh
=> acuMeshSim: <SIMM_ERR_MSG>:Code: 104 String: Bad data encountered in file unknown
Here is what WORKS:
- log in to new terminal
- export LC_NUMERIC=en_US.UTF-8
1 - start acuConsole
2 - open pipe.acs
3 - Tools -> Generate Mesh
I've now added the appropriate line to ~/.profile . Note that I never manually sourced acusim.sh at this point
The systems I tried this on were my desktop machine with Ubuntu 13.10 Kernel 3.11.0-17-generic, and our HPC cluster with SUSE Linux Enterprise Server 11 and Kernel version 3.0.101-0.7.15-default
Thanks for your help!
Bjoern
0 -
Ahhh....ok. I see what is happening. The only solution I can come up with for now is exactly what you are doing (i.e. set LC_NUMERIC=en_US.UTF-8 in your ~/.profile).
I was able to reproduce the behavior by setting my LC_NUMERIC=de_DE.UTF-8. I'll look into this further to see if we can figure out why python is picking up the locale. To the best of my knowledge, it shouldn't be.
Thanks for reporting this and sorry for the hassle!
0