[Bug 242995] [patch] cad/calculix-ccx: Enable multithreading with spooles

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Dec 30 22:04:34 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242995

            Bug ID: 242995
           Summary: [patch] cad/calculix-ccx: Enable multithreading with
                    spooles
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: pfg at FreeBSD.org
          Reporter: rsmith at xs4all.nl
          Assignee: pfg at FreeBSD.org
             Flags: maintainer-feedback?(pfg at FreeBSD.org)

Created attachment 210340
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=210340&action=edit
Patch to enable multithreading in ccx when using spooles.

Up to now, ccx uses only one core when factoring the systems of equations using
the spooles solver.                                                             

For spooles to use multiple threads, -DUSE_MT=1 needs to be added to CFLAGS
when building calculix-ccx.

The included patch adds -DUSE_MT=1 to CFLAGS in the Makefile for ccx.

For a system of 161448 equations, this reduces the runtime from 25.76 s to
22.54 s on a Core i7-7700 CPU. (This is with the environment variable 
OMP_NUM_THREADS set to 4, since this CPU has 4 physical cores and I have 
disabled hyperthreading.)

Record of the tests as per the porters handbook:

    > make stage
    ...
    <build output removed for brevity>
    ...
    ===>  Staging for CalculiX-ccx-2.16
    ===>   CalculiX-ccx-2.16 depends on executable: gfortran9 - found
    ===>   CalculiX-ccx-2.16 depends on executable: gcc9 - found
    ===>   Generating temporary packing list
    <build output removed for brevity>
    ====> Compressing man pages (compress-man)

    > make stage-qa
    ====> Running Q/A tests (stage-qa)

    > make package
    ===>  Building package for CalculiX-ccx-2.16

    # make install
    ===>  Installing for CalculiX-ccx-2.16
    ===>  Checking if CalculiX-ccx is already installed
    ===>   Registering installation for CalculiX-ccx-2.16
    Installing CalculiX-ccx-2.16...

    # make deinstall
    ===>  Deinstalling for CalculiX-ccx
    ===>   Deinstalling CalculiX-ccx-2.16
    Updating database digests format: 100%
    Checking integrity... done (0 conflicting)
    Deinstallation has been requested for the following 1 packages (of 0
packages in the universe):

    Installed packages to be REMOVED:
        CalculiX-ccx-2.16

    Number of packages to be removed: 1

    The operation will free 78 MiB.
    [1/1] Deinstalling CalculiX-ccx-2.16...
    [1/1] Deleting files for CalculiX-ccx-2.16: 100%

The port builds, installs and runs fine.
I've seen no significant difference in the calculated results compared to the
current port and 2.15.
Tests performed on FreeBSD 12.1-STABLE r354569 GENERIC amd64.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list