Commit Graph

83 Commits

Author SHA1 Message Date
Mark Olesen
eb6ccdf7b1 CONFIG: adjust adios config paths 2019-04-10 16:08:21 +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
OpenFOAM bot
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
Mark Olesen
b0fafd18fe STYLE: reorganize some legacy and less frequently used components
- older emacs tools into legacy
- old process tools

* Less frequently used scripts into bin/tools/

  - findEmptyMake
  - foamAllHC
  - foamUpdateCaseFileHeader

* Infrastructure file (only used by foamNewApp)

  - wmake/wmakeFilesAndOptions -> wmake/scripts/wmakeFilesAndOptions

* Merge wmakeRoot convenience as 'wmake -pwd'
* Remove obsolete wmakePrintBuild (superseded by wmakeBuildInfo)
* Remove unused mergeHistory file
2019-01-26 11:30:50 +01:00
Mark Olesen
65e94fde66 DEFEATURE: remove wmakeScheduler (issue #1178)
- was for parallel compilation across multiple hosts, but less useful
  with modern CPUs with higher number of cores and/or hyperthreading.

  Fragile use and dependent on a 'lockfile' utility that is not often
  installed.
2019-01-23 12:43:41 +01:00
Mark Olesen
03bd58ee3a CONFIG: update openmpi-1.10 minor 2019-01-21 13:40:06 +01:00
Mark Olesen
1dd7362aed ENH: wmakeRoot for locating the root directory 2019-01-18 10:58:07 +01: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
dd2c7c4894 ENH: add wmakeVersioned with tracking of ThirdParty dependencies
- primarily for handling cmake replacement libraries
2018-12-15 15:49:48 +01:00
Mark Olesen
b8c257d6ad CONFIG: adjustments to environment
- provide default WM_DIR if not already set, to improve robustness if a
  reduced environment is used

- add etc/ to WM_PROJECT_SITE search. This makes the site directory
  structure consistent with the OpenFOAM structure.
  Eg,

      WM_PROJECT_SITE/etc/..
      WM_PROJECT_SITE/bin/..
      WM_PROJECT_SITE/platforms/..

- Don't set/export WM_OSTYPE.  The default is POSIX and is properly
  defaulted throughout, including in CMakeLists-OpenFOAM.txt (also for
  Catalyst)
2018-12-03 09:50:48 +01:00
Mark Olesen
628b2445fc ENH: improve setup for paraview
- removed reliance on ParaView_INCLUDE_DIR variable for conveying the
  major.minor version information when compiling. This can be somewhat
  fragile and also adds variable that is an unnecessary when running
  (only used when compiling).

  Instead use `have_pvplugin_support` function in paraviewFunctions
  wmake script to determine the maj.min from the PV_PLUGIN_PATH
  since we have already defined the output path there with paraview
  maj.min numbering.

  Can now build with paraview from the operating system,
  provided that it has develop headers available.

      ParaView_VERSION=system

  In the etc/config.sh/paraview setup, the maj.min is taken from
  the corresponding `paraview --version` output and used when
  defining the PV_PLUGIN_PATH.

  During the build, the include path taken from `paraview-config`
  for a system installation, from the guess installation root
  of the paraview binary, or ParaView_DIR otherwise.

NB: using a system ParaView for building runTimePostProcessing is unsupported.

- these types of builds appear to have various library resolution issues
  (eg, libexpat not being loaded). Additionally, the build logic does
  not yet cover this type of use case.
2018-11-29 01:48:00 +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
973a940028 COMP: provide Allmake script for wmake tools
- convenient when bootstrapping some systems
2018-11-22 09:35:17 +01:00
Mark Olesen
e35ac89efb CONFIG: include static libraries in FFTW search (#1087) 2018-11-21 13:49:16 +01:00
Mark Olesen
2fc1a1692b CONFIG: adjust handling of PETSc environment (-force option) 2018-11-06 09:01:40 +01:00
Mark Olesen
9129dbd46f Merge remote-tracking branch 'origin/master' into develop 2018-10-11 11:01:16 +02:00
Andrew Heather
4b7c21bc3c BUG: foamNewSource - corrected Make/options for app mode. Closes #1006 2018-10-09 09:47:54 +01:00
Andrew Heather
54457c68b6 Merge remote-tracking branch 'origin/master' into develop 2018-09-21 16:01:16 +01:00
Mark Olesen
32d5030088 BUG: incorrect kahip resolution with absolute paths (closes #1003)
- for installations with central (non-ThirdParty) location for KAHIP
  (eg, spack, EasyBuild)
2018-09-12 08:37:53 +02:00
Mark Olesen
d40103a86f CONFIG: extend wmake detection scripts 2018-07-31 11:25:53 +02:00
Mark Olesen
f5275444cc CONFIG: adjust adios2 config 2018-06-19 13:53:23 +02:00
Mark Olesen
418cc9b268 STYLE: minor adjustments in wmake scripts.
- comments
- avoid egrep for getting processor count.
- wcleanBuild, wcleanPlatform with shorter form '-curr' instead of '-c'
  to avoid any potential user confusion with '-comp'
2018-07-22 18:28:29 +02: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
2768500d57 CONFIG: remove WM_LINK_LANGUAGE env variable (always c++)
- was somewhat redundant in wmake/rules/General/general anyhow
2018-04-24 14:59:47 +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
Mark Olesen
b29a0119de ENH: minor code tidying, machine simplifications for wmkdepend parser 2018-04-13 16:17:39 +02:00
Mark Olesen
de72a04aeb ENH: make it easier to switch between the various make dependencies programs.
- However, the new ragel-based parser is much faster
  than the others, and does not cause 'too many open files' error
  that the flex-based parser does (issue #784).

  The timings (using src/sampling as being somewhat representative)

    $ wclean; wmakeLnInclude -u .; time wmake -s dep

        3.4s  wmkdepend (ragel) [now default]
        5.7s  wmkdep (flex)
        6.1s  cpp -M

- The makeDepend script is for testing purposes only, but could used as
  a hook for other dependency generation systems (eg, ninja).
  It simply wraps 'cpp -M' in a form that is calling compatible with
  wmkdepend.

BUG: wmkdepend parser was missing optional leading space on #include match

STYLE: use -G2 (goto-based) option for wmkdepend state machine

- the machine is compact with few states and lends itself to this
2018-04-12 10:14:03 +02:00
Mark Olesen
e2332d6bd2 COMP: better handling of versioned cmake libraries
- sentinel was not working properly when building user-space routines
2018-01-31 08:35:56 +01:00
Mark Olesen
5947f9a337 ENH: more succinct output from command-line errors.
- unknown options or missing option values now emit a shorter message
  without the entire usage. This makes it easier to identify the errors
  and is better aligned with the behaviour of GNU system tools.

  ====
     $ simpleFoam -case
     Using: OpenFOAM-plus (see www.OpenFOAM.com)
     Build: plus-01234

     Error: option '-case' requires an argument

     See 'simpleFoam -help' for usage
  ====

- provide for reduced (-help) and full (-help-full) usage information.
  In many cases the reduced usage provided sufficient and easier
  to find the information.

- make -srcDoc an alias for -doc-source

- no warnings about option aliases for future dates.
2017-11-24 10:27:11 +01:00
Mark Olesen
ba8fdda5cc ENH: improve wcleanBuild, wcleanPlatform flexibility (issue #627)
- add -compiler=NAME option to remove a build or platforms directory
  corresponding to any specified compiler on the current arch.

- when -compiler or -compiler=NAME is specified, also clean related
  sub-directories as well. This will cleanup mpi-related directory.
2017-10-30 10:31:05 +01:00
Andrew Heather
2e9bead519 MRG: merged develop line back into integration branch 2017-05-18 11:11:12 +01:00
Mark Olesen
8006d64d74 COMP: skip compilation of plugins if include files are missing (fixes #464) 2017-05-05 10:02:34 +02:00
Mark Olesen
7f01a4beda CONFIG: address differences between shells
- suppress error messages that appear with zsh.
  According to unset(1p), 'unset -f' unsets a function.
  If the function was not previously defined, this is a no-op.
  This is similar for zsh, but there it emits a warning if the
  function was not previously defined.

- avoid 'local' in functions sources from etc/bashrc.
  ksh does not support this.

- use 'command' shell builtin instead of 'type'.
  Seems to be more consistent between shell flavours.
2017-04-20 11:02:54 +02:00
Andrew Heather
436ec1cf1f MRG: Integrated Foundation code to commit ba4dbed 2017-03-23 12:11:49 +00:00
Mark Olesen
b970ba0901 ENH: minor improvements to environment
- handle sourcing bashrc with a relative path (issue #383)
- handle sourcing from bash and zsh.
  Still need manual intervention when sourcing dash, sh, or ksh.
- replace grep in etc/cshrc with sed only
- logical instead of physical path for WM_PROJECT_DIR (issue #431).
  Doesn't seem to be possible for csh/tcsh.

  * Continue using physical locations when comparing directories,
    but not for the top-level FOAM_INST_DIR, WM_PROJECT_DIR.

- relocate WM_CC, WM_CXX overrides from etc/config.*/compiler
  to etc/config.*/settings to ensure that they are left untouched
  when etc/config.sh/compiler is sourced while making third-party
  packages (eg, gcc, llvm, CGAL).

- provide fallback FOAM_TUTORIALS setting in RunFunctions

STYLE: remove "~OpenFOAM" fallback as being too rare, non-obvious
2017-03-20 08:57:12 +01:00
Mark Olesen
249f334f83 ENH: respect '-silent' option for cmake builds
- minor cleanup of wmake sources
2017-03-15 13:06:45 +01:00
mark
9e2e111518 STYLE: adjust ordering of 'find' command arguments
- use -name test before -type test to avoid calling stat(2) on every file.
- use -delete instead of -exec rm to avoid forking
2017-02-21 19:19:04 +01:00
Mark Olesen
957635200a ENH: build into build/ directory instead of platforms/ (issue #312)
- makes it slightly easier when packaging various binaries, or when
  building packages for installation via modules etc.
2017-02-10 20:30:15 +01:00
Mark Olesen
3d02c8a530 ENH: improve isolation of shell variables in wmake scripts
- reduces unexpected interactions between various make elements
2017-02-10 16:13:54 +01:00
mark
e82a029453 ENH: add help/usage for dirToString, wmkdep. Add dirToString -strip option.
- The dirToString -strip option is simple, but reduces effort for the caller.
2017-02-10 14:10:00 +01:00
Mark Olesen
46ecad8f7a STYLE: make wmake scripts look more POSIX-like
- also add some comments about the side-effects
2017-02-10 11:38:12 +01:00
Henry Weller
f92862a42c Allwmake: Provides clearer message when OpenFOAM environment is not loaded
Patch contributed by Bruno Santos
Resolves patch request https://bugs.openfoam.org/view.php?id=2424
2017-01-28 17:57:13 +00:00
Mark Olesen
9d63cc5ca8 ENH: add versioning for VTK library to runTimePostProcessing (issue #370)
Eg,
    librunTimePostProcessing.so
    librunTimePostProcessing.so.7 -> librunTimePostProcessing.so.7.1.0
    librunTimePostProcessing.so.7.1.0

- centralize handling of paraview/vtk versioning into wmake/cmakeFunctions
2017-01-23 13:37:42 +01:00
Mark Olesen
608bb5d83b COMP: update lnInclude directories when building (issue #364)
- Could be related to interrupted builds.
  So if there are any parts of the build that rely on an explicit
  'wmakeLnInclude', make sure that the contents are properly updated.

--

ENH: improved feedback from top-level Allwmake

- Report which section (libraries, applications) is being built.

- Provide final summary of date, version, etc, which can be helpful
  for later diagnosis or record keeping.

- The -log=XXX option for Allwmake now accepts a directory name
  and automatically appends an appropriate log name.
  Eg,
      ./Allwmake -log=logs/  ->> logs/log.linux64GccDPInt32Opt

  The default name is built from the value of WM_OPTIONS.

--

BUG: shell not exiting properly in combination with -log option

- the use of 'tee' causes the shell to hang around.
  Added an explicit exit to catch this.

--

- Detecting the '-k' (-non-stop) option at the top-level Allwmake, which
  may improve robustness.

- Explicit continue-on-error for foamyMesh (as optional component)

- unify format of script messages for better readability

COMP: reduce warnings when building Pstream (old-style casts in openmpi)
2016-12-22 11:26:29 +01:00
Mark Olesen
91b7ede14b STYLE: adjust log name for 'Allwmake -log' (issue #333)
- now defaults to 'log.$WM_OPTIONS' (eg, log.linux64GccDPInt32Opt)
  for more clarity and fewer potential name clashes when building
  multiple versions.
2016-12-15 13:20:21 +01:00
Mark Olesen
13c3b1d617 ENH: Allwmake -log=name option to specify log name (issue #333)
- helpful when testing various builds
2016-12-13 20:53:05 +01:00
Mark Olesen
eb00c8021d ENH: provide log option for top-level builds (issue #333) 2016-12-09 14:44:26 +00:00
Henry Weller
5ffdb2d4b3 wmake/scripts/AllwmakeParseArguments: Avoid duplicate command message
when Allwmake is called from wmake -all
2016-11-14 12:37:52 +00:00
Henry Weller
80db302666 Allwmake: Remove 'set -x' which generates a lot of noise
'set -x' should be used for debugging.

Added command printing into wmake and Allwmake as a replacement for
'set -x' to log current target.
2016-11-13 18:08:22 +00:00