Skip to content
Snippets Groups Projects

Added the configuration command line and CFLAGS/CXXFLAGS to the snapshots and greeting message.

Merged Matthieu Schaller requested to merge configure_options_in_code into master

Does what it says on the tin. Just wanted to run it pass you in case you have a better way of doing this.

Thanks ! Branch can be removed.

Merge request reports

Merged by avatar (May 30, 2025 11:10am UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • The start of the output now looks like this:

     Welcome to the cosmological hydrodynamical code
        ______       _________________
       / ___/ |     / /  _/ ___/_  __/
       \__ \| | /| / // // /_   / /   
      ___/ /| |/ |/ // // __/  / /    
     /____/ |__/|__/___/_/    /_/     
     SPH With Inter-dependent Fine-grained Tasking
    
     Version : 0.4.0
     Revision: v0.4.0-509-g2474a3c2-dirty, Branch: master
     Webpage : www.swiftsim.com
    
     Config. options: '--disable-vec'
    
     Compiler: GCC, Version: 5.4.1
     CFLAGS  : '-O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math -funroll-loops -march=haswell -mavx2 -fno-tree-vectorize  -Wall -Wextra -Wno-unused-parameter -Werror'
     CXXFLAGS: ''
    
     HDF5 library version: 1.8.16
     FFTW library version: 3.x (details not available)
    
    [00000.0] main: CPU frequency used for tick conversion: 2693658262 Hz
    [00000.0] main: Running on: matthieu-laptop
  • mentioned in issue #219 (closed)

  • Matthieu Schaller Added 4 commits:

    Added 4 commits:

    • 27174568 - Make hydro scheme and dimensionality configure options
    • 32298b94 - Merge branch 'master' into autotools-update
    • 3652fec1 - Merge branch 'autotools-update' into configure_options_in_code
    • f38e3714 - Selection of the different modules is now done in the configure script.
  • Ok, I have now gone all the way and moved all the module selection to the configure script.

    Some non-standard options are still in const.h. I need to think about how to handle these special cases.

  • Added 1 commit:

    • 22f1f685 - Also moved the Riemann solver choice to the configuration script.
  • Added 1 commit:

  • All looks good to me, except why are we recording CXXFLAGS? These will only be used if we start coding with C++. I'd say remove those.

  • I thought @jwillis was using them to pass some vectorization flags. If not, agreed, we can drop it.

  • I guess we don't have any reason to keep the LDFLAGS ?

  • I use CPPFLAGS sometimes but not CXXFLAGS, I might have used it in the past when we tried to overload the vector operations on the KNL.

  • Ok. I'll drop the CXXFLAGS for now then.

  • Note that this will work only for the main code anyway. Whatever happens in the test directory cannot be recorded using that mechanism. Especially hand-editing the Makefiles.

  • I wouldn't bother with LDFLAGS, the linked against libraries can be discovered from the binary, as should the paths used to locate them (since we use rpath).

  • Added 1 commit:

  • Ok, replaced the CXXFLAGS with CPPFLAGS.

  • Hmm, CPPFLAGS still means we are using C++, so unless we intend to allow that permanently I don't see the reason to keep that either.

  • Peter W. Draper Title changed from Added the configuration command line and CFLGAS/CXXFLAGS to the snapshots and greeting message. to Added the configuration command line and CFLAGS/CXXFLAGS to the snapshots and greeting message.

    Title changed from Added the configuration command line and CFLGAS/CXXFLAGS to the snapshots and greeting message. to Added the configuration command line and CFLAGS/CXXFLAGS to the snapshots and greeting message.

  • My understanding is that CPPFLAGS are for the pre-processor and is language agnostic.

  • I thought that also, I have been using it to define macros

  • But you only need them when working with more than one language, so these share flags between C and C++ for instance. Without C++ they are not very useful.

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading