Hi there,

Alex speaking, I'm french, sorry for my english.

First thanks for this distribution and all the settings. I've discovered it on the Freecad forum in the topic below:

https://forum.freecadweb.org/viewtopic.php?f=8&t=10425&hilit=gypsy&start=10

I'm using the 2018-12-28 rc1 version, I have few comments (I'm almost a newbie about Linux stuffs, so please tell me if I'm wrong):

- Freecad 0.18 is runing pretty well, fast displaying with opengl. FEM workbench works fine too, except the Calculix solver which is missing I guess. So I can't try to perform a FEM simulation. I can't find the ccx binary file. Did I missed something? How could I compile the calculix source code on the raspberry in order to get the binary file?

BR, Alex

 

Joel's picture

Bojour, Your English is much better than my French. smiley  You may install that specific FEM solver by following these steps.

  1. Click the menu System -> Administration -> Set OS Normal Mode (needs reboot), so changes to the disk will persist
  2. After reboot, login and press Ctrl+Alt+t to open a terminal
  3. Install libs by typing sudo apt-get update ; sudo apt-get install libarpack2-dev python-scipy libspooles2.2 calculix-ccx and pressing the Enter key
  4. Next, check lib version by typing ccx -v and pressing the Enter key
  5. voilà... comme manger un gâteau

You can usually find a missing program by wildcard searches of Debian stretch repositories.

Example:

sudo dpkg -S '*ccx*'

Note this lib will now be included in rc2 by default, and please let us know if it fixed your example simulation.

Cheers,

J

Hi Joel, thanks a lot for your very detailed reply, perfect.

I've fulfilled your commands in terminal and get calculix binary version 2.11.

Now it works like a charm! Thanks again.

 

Hi again, here is a new post concerning some other comments about Freecad:

 - if you run Freecad as user Pi, the sketcher works until you create the very first constraint, then Freecad crah instantly. If you run Freecad as admin, all is ok, Sketcher works very well.

- if you run Freecad as user PI there is a lot of workbenches loaded and that's cool. But as admin only the standard workbenches are loaded.

Hence as user you have to choose: a lot of workbenches as PI, or a reliable sketcher as root.

Is it possible to get the same workbenches for every user? Or is it possible to solve the issue concerning the sketcher?

 

Last question: what about RAM management on this distribution? I see there is a swap of 1.7G. Is it a swap file on sd card? Or a zram management?

Thanks for your attention,

BR, Alex

Joel's picture

I would have to do some testing with the solver setup, but it is likely the desktop  marco gpu compositor settings specific to user Pi.  As the gpu drivers are experimental, it is unfortunately a trial-and-error process to determine which gl features are stable for every app, and those that must be temporarily disabled.

Also, note there is still a known issue with the gpu kernel driver, and sometimes a program will glitch the first time it is run. After closing the app, a second attempt to reuse the already allocated gpu memory is often more stable.

There are 3 partitions on the sdcard: a FAT /boot area, OS read-only / root area, and a user /home area. The swap file was moved to /home/root/ path, so the OS area can be booted as a read-only drive.  The kernel will try to use 40% of unused ram as cache to defer writes to the card, and while in read-only mode smaller log writes stay in ram.

There is a demo script that builds and mounts a zram + swap priority hierarchy, but we found it was too unstable to enable by default. Zram is still too experimental. ;-)

This Freecad version in rc1 was from the repo daily from December 2018, and may indeed have unstable features that need diagnosed, reported, and patched.

    As long as one is booted into Normal-Mode, than the adduser command will be able to correctly alter the password file to create new users as needed. We have not finalized the desktop layout yet, but eventually do plan to export the Pi user profile/menu defaults as the system defaults. The closed-source GPU driver beta has been slow from the Raspberry Pi foundation, thus the final gl config default can't be finalized anytime soon.

Currently, I have the local Pi busy compiling opencv, but we should have some time over the weekend to do some FEM tests. One of us is currently working on rebuilding a DLP printer, which turned into a bit of a task given the caffe api and python wrappers are not happy. ;-)

Cheers,
J

Thank you for your explainations and comments about the RC1 disto management :-)

I've achieved some tests about FEM, works fine. Below the link with Freecad forum where I've posted few pictures. I don't success to load pictures here because I'm on the RPI and there is a trouble with HTML filtered mode and Midory, I suppose. So I'm writting in plain text mode.

https://forum.freecadweb.org/viewtopic.php?f=8&t=19803&p=292113

BR, Alex

Joel's picture

Try this:

  1. Login as user Pi, and open a terminal again
  2. Purge the old v17 profile modules:  rm -r ~/.FreeCAD/
  3. Purge the old v17 settings:  rm -r ~/.config/FreeCAD/
  4. Launch program from terminal:  /opt/freecad17/bin/FreeCAD

If program is still starving for resources, than increase GPU memory:

  1. Run config editor script: sudo ~/APPS/edit_rw_boot_config.sh
  2. Find gpu area by pressing Ctrl+W than type gpu_mem=128 and press Return
  3. Use the arrow keys to change the gpu setup from 128MB to 256MB:
    Old settings New Settings
    gpu_mem=128 gpu_mem_256=128 gpu_mem_512=128 gpu_mem_1024=128 gpu_mem=256 gpu_mem_256=256 gpu_mem_512=256 gpu_mem_1024=256
  4. Press Ctrl+O to save the new config
  5. Press Ctrl+X to exit the nano text editor terminal program
  6. Reboot the machine: sudo shutdown -r now
  7. Retry running the program from the terminal to see program error output

Tips:

  • The PrintScreen button will take a Desktop image file snapshot.  Please try to show us exactly what you see just before the problem occurs.
  • The included Chromium is a more complete web-browser, and should cover the use-cases where midori shows its age.
  • Active cooling is recommended for heavy apps as the Pi won't throttle/slow when the CPU gets too hot: video

Let me know how it works out, as I may need you to email the specific problem file to replicate the test.

Cheers,

J

Hi, sorry for late reply. I' saw your post on the freecad forum. 
It's a little bit tricky for me to reply by using the RPI because of multitask involves crash and log out of the user session. But it's possible :-)

First thank you for the tips above. I've fullfiled the terminal with your instructions and now the freecad sketcher works very fine, no crash anymore.
Just for information I paste below the program error output before the modifications (to replicate this crash: just create a new document -> open sketcher workbench -> create a sketch -> select Line or circle tool or whatever -> click it on the origine of local coordinate system then drop anywhere -> crash):

pi@neptune:~ $ /opt/freecad17/bin/FreeCAD
FreeCAD 0.18, Libs: 0.18R14555 (Git shallow)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2018
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Fasteners workbench Loaded
Sheet Metal workbench loaded
libGL error: MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
MESA-LOADER: failed to retrieve device information
checking for scipy support
found scipy
--------------ERROR loading reconstruction workbench ---------------------
--------------ERROR loading reconstruction workbench ---------------------
--------------ERROR loading reconstruction workbench ---------------------
--------------ERROR loading reconstruction workbench ---------------------
/usr/local/lib/python2.7/dist-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
Reconstruction_perspective_trafo
Reconstruction_perspective_trafo_sketch
*** Error in `/opt/freecad17/bin/FreeCAD': double free or corruption (out): 0x01f17f50 ***
Aborted
pi@neptune:~ $ 

Also just for info I've mesured the time consumption before and after purging old modules and settings:

 - freecad loading: before 42sec : after 25sec
 
About cooling I know what you mean, thanks for the video. I maybe should fit a more efficient heat sink to decrease the temperature, however for now I don't think it occures troubles.
I would prefer to avoid active cooling in order to prevent noise and dust, but if it is realy necessary for enjoying Freecad I will do it.

BR, Alex