Skip to content

[WIP] Output More Versions #2755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Jan 19, 2022

Add more build information and dependency information to our output on startup. This increases reproducibility by tracking more software dependencies and build options.

Example output when built with CMake:

MPI initialized with 1 MPI processes
MPI initialized with thread support level 3
OMP initialized with 8 OMP threads
AMReX (22.01-16-g7314e78fecda) initialized
WarpX (22.01-27-g73858579e907-dirty)
Build options:
  Build type: Release
  OS:         Linux-5.4.0-56-generic
  arch:       x86_64
  CXX:        GNU (9.3.0)
  accelerate: OpenMP (4.5)
Third party:
  CMake:      3.22.1
  MPI:        
    standard: 3.1
    flavor:   OpenMPI (4.1.2)
  PICSAR:     7b5449f92a4b
  openPMD:    0.14.3 (standard: 1.1.0; files: json,bp,sst,ssc,h5)

@ax3l ax3l added the component: core Core WarpX functionality label Jan 19, 2022
@ax3l
Copy link
Member Author

ax3l commented Jan 19, 2022

@cyrush is there an "include + macro / runtime API query" way to query the version of Ascent/Conduit? :)

@c-wetterer-nelson s there an "include + macro / runtime API query" way to query the version of SENSEI? :)

@mgates3 is there an "include + macro / runtime API query" way to query the version of BLAS++/LAPACK++? :)

@ax3l ax3l force-pushed the topic-moreVersions branch 8 times, most recently from 4b26e8e to 52fe92d Compare January 19, 2022 16:05
Add more build information and dependency information to our
output on startup. This increases reproducibility by tracking
more software dependendencies and build options.
@ax3l ax3l force-pushed the topic-moreVersions branch from 52fe92d to 12c5233 Compare January 19, 2022 16:06
@@ -110,9 +111,7 @@ WarpX::InitData ()
{
WARPX_PROFILE("WarpX::InitData()");
Print() << "WarpX (" << WarpX::Version() << ")\n";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you are changing this, can the version information be printed earlier? A number of things happen before WarpX::InitData is called and if something goes wrong there, the version info won't be output. A user I'm working with has a case where a problem is happening in ParseGeometryInput for example and there is no version info to help debug it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can move our info definitely up. Only the AMReX info will first be printed here, I think.

@cyrush
Copy link
Contributor

cyrush commented Jan 19, 2022

@ax3l yes, here is an example of how to get the ascent version:

conduit::Node n_about_ascent;
ascent::about(n_about_ascent);
amrex::Print() << n_about_ascent["version"].as_string();

@ax3l ax3l changed the title Output More Versions [WIP] Output More Versions Jan 20, 2022
@@ -316,6 +316,19 @@ if(WIN32)
target_compile_definitions(ablastr PUBLIC _USE_MATH_DEFINES)
endif()

# additional defines for version outputs
# CMake
target_compile_definitions(ablastr PUBLIC CMAKE_VERSION=${CMAKE_VERSION})
Copy link
Member Author

@ax3l ax3l Feb 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also use

set_property(SOURCE source.cpp PROPERTY COMPILE_DEFINITIONS 
VAR1=${MY_VAR1} VAR2=${MY_VAR2})

for ablastr/version/VersionFormat.cpp

#endif

#if defined(AMREX_USE_OMP)
std::map< int, std::string > mapOpenMP = {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
std::map< int, std::string > mapOpenMP = {
std::map< int, std::string > const mapOpenMP = {

@mgates3
Copy link
Contributor

mgates3 commented Jun 16, 2022

Found this buried in my inbox. @ax3l Yes, BLAS++ and LAPACK++ have C++ macros BLASPP_VERSION and LAPACKPP_VERSION, and also runtime functions blaspp_version() and lapackpp_version().

// Version 2022.05.00
#define LAPACKPP_VERSION 20220500
int lapackpp_version();

// Version 2022.05.00
#define BLASPP_VERSION 20220500
int blaspp_version();

Incidentally, we released those versions last month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: core Core WarpX functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants