Commit Graph

16 Commits

Author SHA1 Message Date
Mark Olesen
bf1ed94e53 ENH: use PrecisionAdaptor to support scotch with label widening
- allows reuse of an int64_t scotch library with label-size 32
  and/or label-size 64.

COMP: prefer scotch/metis/kahip libraries with label-size qualifiers

- as noted in #2200, mpirun may insert mpi libraries higher in the
  library loader which can cause masking of our ThirdParty libraries
  of the same name. With scotch (for example), the operating system
  may have an int32 version installed but we have an int64 version
  compiled under ThirdParty. Runing in serial is fine, but in parallel
  we resolve to the (incorrect) system version due to the adjustments
  in mpirun.

- adjust the ThirdParty make scripts to also create corresponding
  links (eg, 'ln -s libscotch.so libscotch-int64.so') and prefer
  linkage with these qualified libraries.

    Eg,  -L$(SCOTCH_LIB_DIR) -lscotch$(SCOTCH_LIBNAME_SUFFIX)

  this prevent accidental runtime linkage with the system versions.

STYLE: simplify scotch interface code by using local functions
2021-09-07 11:29:11 +02:00
Mark Olesen
5e660c36e9 CONFIG: ptscotch header not found on RedHat/Fedora (fixes #1904)
- no limit to the number of ways of filing ptscotch libraries.
  RedHat/Fedora/CentOS should look for these directories:

      ptscotch include=/usr/include/openmpi-x86_64
      ptscotch library=/usr/lib64/openmpi/lib

  when MPI_ARCH_PATH=/usr/lib64/openmpi
  and mpicc --showme:compile yields -I/usr/include/openmpi-x86_64
2020-11-04 15:22:44 +01:00
Mark Olesen
bea6563210 CONFIG: ptscotch header not found on ArchLinux (fixes #1877)
- on ArchLinux, everything is installed under /usr/include/scotch.

  The detection script uses SCOTCH_ARCH_PATH as an initial guess for
  ptscotch as well. However, on the second pass, it has an absolute
  value ("/usr") instead of a logical one ("scotch-system").
  This resulted in the logic for handling scotch+ptscotch subdirs
  being bypassed.
2020-10-12 10:34:49 +02:00
Mark Olesen
6194548871 ENH: split off modules/list-modules script
STYLE: string quoting when echoing paths in wmake have_* scripts

STYLE: more consistency in foamRunTutorials, foamCleanTutorials options
2020-06-19 12:43:33 +02:00
Mark Olesen
f8ef85b72f ENH: split up internals of wmake/scripts/have_XXX functions
- adds some more flexibility
2020-05-19 07:13:12 +01:00
Mark Olesen
06333efd2d CONFIG: improve detection of scotch system include/libraries
- align wmake have_* scripts to support version query as per current
  develop branch

- use config.sh/ fallbacks when the corresponding *_ARCH_PATH is empty
  (eg, BOOST, CGAL, FFTW).
  This aids when building outside of the regular OpenFOAM environment.
2020-04-15 13:35:45 +02:00
Mark Olesen
fe17c8ad5f CONFIG: improve prefix matching for system libraries (#1607)
- missed detection of system libraries when installed with multiarch
  paths like /usr/lib/x86_64-linux-gnu

CONFIG: improve handling of group/user config files (#928)

- changed bashrc handling of FOAM_CONFIG_NOUSER to use
  FOAM_CONFIG_MODE instead. Propagate into foamEtcFile to make this
  a stickier control.

  This change allows better control, but also enables cluster
  installations to define their own value within the OpenFOAM prefs.sh
  file to prevent users accidentally mis-configuring things if
  necessary.

- remove undocumented handling of an (a)ll mode in foamEtcFile to
  avoid potential pitfalls.

- add support for FOAM_CONFIG_ETC handling.
  This allows injection of an extra search layer when finding
  project etc files

ENH: improvements to foamConfigurePaths (#928)

- handle FOAM_CONFIG_ETC implicitly, or explicitly with the new
  -etc option.

STYLE: more explicit wording in foamConfigurePaths usage (#1602)

- document that an absolute path (eg, -scotch-path) overrides/ignores
  the equivalent ThirdParty setting (eg, -scotch)

- longer options -system-compiler and -third-compiler for -system
  and -third, respectively. Clearer as to their purpose.

- adjust the location sanity check to look for META-INFO directory.
2020-03-16 12:03:58 +01:00
Mark Olesen
ec7e3c88e4 ENH: test for WM_PROJECT_DIR being set/unset in scripts 2019-11-06 09:18:51 +01:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
Mark Olesen
897528da1a ENH: streamline handling of static/dynamic libs in detection scripts 2019-04-29 10:04:44 +02:00
Mark Olesen
cd91a252ac ENH: improve handling of pt-scotch headers/libraries
- provide dedicated detection 'have_ptscotch' function that can be
  used after the 'have_scotch' function.

  It sets the PTSCOTCH_ARCH_PATH, PTSCOTCH_INC_DIR, PTSCOTCH_LIB_DIR
  and helps when the serial and parallel versions are located with
  different logic.
2019-04-05 13:10:53 +02:00
Mark Olesen
fcf4c5fb22 ENH: wmake have_* script changes
- use local 'prefix' variable for easier override and more consistency
2019-01-10 20:14:46 +01:00
Mark Olesen
9065346a05 ENH: additional handling of questionable bad FOAM_EXT_LIBBIN values
- if FOAM_EXT_LIBBIN is unset and some scripts set this to /usr/lib*
  as a fallback (eg, to avoid an undefined value) this will cause a
  system library to be found before appropriate *_ARCH_PATH entry.

  This was noticed during a scotch compilation without third-party:
  resulting in the system library (/usr/lib64/libscotch.so) to be found
  instead of the SCOTCH_ARCH_PATH location
  (/usr/lib64/mpi/gcc/openmpi/lib64/).

  Simply changing the search order doesn't work for use, since we wish
  to retain a preference for any dynamic libraries discovered in a
  real FOAM_EXT_LIBBIN.

  Circumvent these issues by only taking libraries from
  FOAM_EXT_LIBBIN if it also points to a location within ThirdParty.
2018-11-27 12:23:11 +01:00
Mark Olesen
12553a2e43 COMP: include /usr/local in search for system headers/libraries
- this is consistent with compiler defaults, and helps Darwin users
2018-05-30 14:45:12 +02:00
Mark Olesen
76cb38fbc7 CONFIG: adjust make scripts for darwin
- handling of dead links (find -L -delete unsupported)

- remove ignore case flag on 's/../../i' used in have_scotch script.
  It is unneeded and not tolerated by Darwin's sed.

- avoid embedded comments in EXE_INC (Make/options files), which do
  not work well with the OSX LLVM cpp.
  It strips out the comments but also removes the continuation char.

STYLE: adjust notes about paraview library locations
2018-04-24 21:20:06 +02:00
Mark Olesen
b4d38ab468 ENH: improve handling of ThirdParty packages
- generalize some of the library extensions (.so vs .dylib).
  Provide as wmake 'sysFunctions'

- added note about unsupported/incomplete system support

- centralize detection of ThirdParty packages into wmake/ subdirectory
  by providing a series of scripts in the spirit of GNU autoconfig.
  For example,

      have_boost, have_readline, have_scotch, ...

  Each of the `have_<package>` scripts will generally provide the
  following type of functions:

      have_<package>          # detection
      no_<package>            # reset
      echo_<package>          # echoing

  and the following type of variables:

      HAVE_<package>          # unset or 'true'
      <package>_ARCH_PATH     # root for <package>
      <package>_INC_DIR       # include directory for <package>
      <package>_LIB_DIR       # library directory for <package>

  This simplifies the calling scripts:

      if have_metis
      then
          wmake metisDecomp
      fi

  As well as reducing clutter in the corresponding Make/options:

      EXE_INC = \
          -I$(METIS_INC_DIR) \
          -I../decompositionMethods/lnInclude

      LIB_LIBS = \
          -L$(METIS_LIB_DIR) -lmetis

  Any additional modifications (platform-specific or for an external build
  system) can now be made centrally.
2018-04-24 14:51:19 +02:00