Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Dec 2019 22:04:33 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 242995] [patch] cad/calculix-ccx: Enable multithreading with spooles
Message-ID:  <bug-242995-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D242995

            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@FreeBSD.org
          Reporter: rsmith@xs4all.nl
          Assignee: pfg@FreeBSD.org
             Flags: maintainer-feedback?(pfg@FreeBSD.org)

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

Up to now, ccx uses only one core when factoring the systems of equations u=
sing
the spooles solver.=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20

For spooles to use multiple threads, -DUSE_MT=3D1 needs to be added to CFLA=
GS
when building calculix-ccx.

The included patch adds -DUSE_MT=3D1 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=20
OMP_NUM_THREADS set to 4, since this CPU has 4 physical cores and I have=20
disabled hyperthreading.)

Record of the tests as per the porters handbook:

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

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

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

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

    # make deinstall
    =3D=3D=3D>  Deinstalling for CalculiX-ccx
    =3D=3D=3D>   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 t=
he
current port and 2.15.
Tests performed on FreeBSD 12.1-STABLE r354569 GENERIC amd64.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-242995-7788>