Skip to content
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

Restore I/O in x3div #25

Open
wants to merge 5 commits into
base: hack_DC_TGV
Choose a base branch
from
Open

Restore I/O in x3div #25

wants to merge 5 commits into from

Conversation

pbartholomew08
Copy link
Member

No description provided.

This "closes" the xdmf file.

Also the code was starting at timestep 1 (this should be the value
at the END of the first timestep)
@pbartholomew08 pbartholomew08 marked this pull request as ready for review March 7, 2022 13:39
starts(1) = decomp%zst(1)-1
starts(2) = decomp%zst(2)-1
starts(3) = decomp%zst(3)-1
endif
Copy link

Choose a reason for hiding this comment

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

^ Maybe room for a method in decomp class ?

Copy link

Choose a reason for hiding this comment

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

Okay, I guess that's 2ddecomp code and you don't have a lot of control on it?

disp = disp + sizes(1)*sizes(2)*sizes(3)*mytype_bytes
if (data_type == complex_type) then
disp = disp + sizes(1)*sizes(2)*sizes(3)*mytype_bytes
end if
Copy link

Choose a reason for hiding this comment

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

This file looks the same as the previous one, except for the last 5 lines? How are they related? Do you need both?

Copy link
Member Author

Choose a reason for hiding this comment

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

oldskool Fortran - I think we should leave it alone as it works. We can look at refactoring when we have merged onto the upstream decomp2d (no point fixing something we're going to discard)


ndt = 0

ioutput = 5
Copy link

Choose a reason for hiding this comment

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

Took me a bit of scrolling to understand what that variable was about, maybe a name like io_period?

! write(*,*)'==========================================================='
! write(*,*)'Visu module requires ',real(memout*1e-9,4),'GB'
! write(*,*)'==========================================================='
! end if
Copy link

Choose a reason for hiding this comment

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

^ Dead code?

#endif

if (nrank.eq.0) then
OPEN(newunit=ioxdmf,file="./data/"//pathname//"/"//filename//'-'//num//'.xdmf')
Copy link

@tlestang tlestang Mar 7, 2022

Choose a reason for hiding this comment

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

I'd extract writing xml to a thrid party library FoXy ? Or at a minimum into a separate module

starts(3) = decomp%xst(3)-1

call MPI_TYPE_CREATE_SUBARRAY(3, sizes, subsizes, starts, &
MPI_ORDER_FORTRAN, data_type, newtype, ierror)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shall we add checks on the MPI error codes ?

@@ -214,9 +220,11 @@ subroutine finalise_xcompact3d(flag)
call x3d_operator_z_data_finalize()
call var_finalize()

call visu_finalise()
Copy link
Collaborator

Choose a reason for hiding this comment

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

At some point, we will have to decide if we finalize or if we finalise :D

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 propose "fin" - gets around the argument of who spells correctly and sounds classy ;)

@mathrack
Copy link
Collaborator

mathrack commented Mar 9, 2022

I have added some case-specific visualization. Seems to work on my workstation. Not tested with ADIOS2.

@pbartholomew08
Copy link
Member Author

I'm not sure it should support ADIOS2 (well) I used an older version of visu.f90 in interest of being able to use upstream 2decomp&fft

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