Bug 249351

Summary: [patch] cad/calculix-ccx: Re-enable multithreading with spooles (lost after 2.17 update)
Product: Ports & Packages Reporter: rsmith
Component: Individual Port(s)Assignee: Pedro F. Giffuni <pfg>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (pfg)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch to re-enable USE_MT. none

Description rsmith 2020-09-15 20:22:59 UTC
Created attachment 217982 [details]
Patch to re-enable USE_MT.

With the 2.17 update the fix for using multithreaded spooles (see bug #242995) was lost. The enclosed patch re-enables it.

Note that without this patch ccx *reports* that it is using multiple cores, but if you look at the actual CPU usage, it isn't.

Also, I've slightly changed the pkg-message; Using the environment variable OMP_NUM_THREADS makes CalculiX use threads wherever it can. Otherwise you might have to set *several* environment variables, like CCX_NPROC_STIFFNESS, CCX_NPROC_EQUATION_SOLVER, CCX_NPROC_RESULTS et cetera. See "How to perform CalculiX calculations in parallel" in "CalculiX CrunchiX USER'S MANUAL version 2.17".
Comment 1 Pedro F. Giffuni freebsd_committer 2020-09-15 23:47:42 UTC
For pkg-message, CCX_NPROC_EQUATION_SOLVER is supported as well.

I am actually busy these days with a family emergency, so if any committer wants to grab it and review, I approve.
Comment 2 Pedro F. Giffuni freebsd_committer 2020-09-15 23:49:06 UTC
BTW, there is an unofficial 1.17.1 release (detected by portscout).
Comment 3 rsmith 2020-09-17 22:17:54 UTC
(In reply to Pedro F. Giffuni from comment #2)

Apart from new colormaps, this 2.17.1 contains a fix for a pretty serious bug. In 2.17, when exporting a surface ("send XXX abq sur"), the *SURFACE keyword is missing from the generated XXX.sur file. Since surfaces are necessary for applying distributed loads, this cripples cgx for problems with distributed loads.

I can confirm that 2.17.1 seems to compile fine. I have installed it locally, but want to do some more testing before submitting a new PR for the update.
Comment 4 rsmith 2020-09-17 22:45:21 UTC
(In reply to rsmith from comment #3)

Note that the website only shows a new version (2.17.1) for cgx. ccx is still at 2.17, AFAICT.
Comment 5 Pedro F. Giffuni freebsd_committer 2020-09-22 17:15:39 UTC
Got it.
Comment 6 commit-hook freebsd_committer 2020-09-22 17:31:50 UTC
A commit references this bug:

Author: pfg
Date: Tue Sep 22 17:31:29 UTC 2020
New revision: 549613
URL: https://svnweb.freebsd.org/changeset/ports/549613

Log:
  cad/calculix-ccx: Re-enable multithreading with spooles.

  Clarify further the pkg-messager.

  PR:	249351
  Approved by:	thierry (mentor, implicit)

Changes:
  head/cad/calculix-ccx/Makefile
  head/cad/calculix-ccx/files/patch-Makefile
  head/cad/calculix-ccx/pkg-message
Comment 7 Pedro F. Giffuni freebsd_committer 2020-09-22 17:32:56 UTC
Committed, thanks!