Skip to content

Conversation

@dutta-alankar
Copy link
Contributor

@dutta-alankar dutta-alankar commented Sep 9, 2024

On running cmake with cmake $IDEFIX_DIR -DIdefix_HDF5=ON -DCMAKE_CXX_FLAGS="-DXDMF_DOUBLE", the following compilation error is generated:

idefix/src/output/xdmf.cpp:168:18: error: incompatible pointer types assigning to 'double *' from 'float *'
  this->vect3D = new float[nx1loc*nx2loc*nx3loc];
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

This is because it works well for the default option float but when the dumping datatype is changed to double, the code complains as the right hand side of this expression is still float which must be changed to double. Therefore, to make this dump datatype agnostic, one needs to change float on the right hand side of this expression to DUMP_DATATYPE macro.

Copy link
Collaborator

@neutrinoceros neutrinoceros left a comment

Choose a reason for hiding this comment

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

LGTM

@glesur glesur changed the base branch from master to develop September 10, 2024 08:35
@glesur glesur merged commit 3629695 into idefix-code:develop Sep 16, 2024
@glesur glesur mentioned this pull request Oct 23, 2024
glesur added a commit that referenced this pull request Oct 24, 2024
## [2.1.02] 2024-10-24
### Changed

- Fix a bug that could lead to corrupted VTK file when using single precision arithmetic (#255)
- Fix a bug that could lead to incorrect central mass gravitational potential upon restart (#287)
- Changed the way magnetic field is reconstructed when using grid coarsening to reduce roundoff errors on div(B). This can have an impact on the results of models using grid coarsening+MHD (#284)
- Ensure that XDMF outputs are precision agnostic (#261)
- Bump up Kokkos version to 4.4.01 (#289)
- Check that writes are successfull in serial, otherwise throw an error (#260)
- Ensure that shock flattening flags can be modified by user (#260)
- Throw an error when user enables Fargo without enough DIMENSIONS (#250)
- Fix linting errors following upgrade to cpplint 2.0 (#278, #279, #281)
- Update idfx_io to numpy 2.0 (#283)

### Added

- Allow the user to define the grid and boundary conditions only on active dimensions (#274)
- Configuration for Nvidia H100 on Jean Zay in the documentation
---------

Co-authored-by: Nicolas Aunai <nicolas.aunai@lpp.polytechnique.fr>
Co-authored-by: vdbma <93188557+vdbma@users.noreply.github.com>
Co-authored-by: Marc Van den Bossche <marc.vanden-bossche@univ-grenoble-alpes.fr>
Co-authored-by: Alankar Dutta <dutta.alankar@gmail.com>
Co-authored-by: Alankar Dutta <alankard@MB-167.local>
Co-authored-by: ThomasJannaudCAM <159052976+ThomasJannaudCAM@users.noreply.github.com>
Co-authored-by: Clément Robert <cr52@protonmail.com>
Co-authored-by: marc <vandenbossche.marc@hotmail.com>
Co-authored-by: Antonin Borderies <89980449+Anto6453@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants