Comments (9)
Looking at the unmap code I'm wondering why we don't directly store the _rc
tags in rc
format rather than 1) convert to mesh format, 2) set tag, 3) convert to rc format.
I'm guessing it's due to a check on adding a tag that requires that adding a tag be of a certain size that corresponds to the number of nodes. In that case, why don't we just store the rc
tags in a separate cache (not as tags) and have two loops in write_vtk
and unmap_mesh
one for the normal tags and one for the _rc
tags.
I suspect/hope that the user/application code isn't relying on the _rc
tag fields and is using the high level mesh.get_RevClass
functions.
I will finish getting things functional as is and then submit a pull request to review with these refactors.
from omega_h.
Hi @jacobmerson , we do directly store the _rc
tags in rc
format. The change_tagToMesh
and change_tagTorc
(could also be private) functions are there to support maintaining the rc
tags through mesh modification operations like adaptation, migration. While writing vtk, one needs to add data fields for all the mesh entities even if the information of interest is associated with a single mesh entity, so we change the tags to mesh before writing to vtk. For rc operations associated with file i/o, i see your point that we dont necessarily need to change the arrays that are stored with the tagbase from rc to mesh and just unmapping the array should suffice but I wrote it the way it is to initially try and remain consistent with the other operations requiring tag data sized the size of the mesh. Does that answer your question?
from omega_h.
I think I understand...essentially, the field transfer (and writing procedures) require data in mesh
format and storage format is the rc
format. You store in tags array to make use of the mesh field transfer operations.
I'm hitting a bug where the size of the arrays are not getting reset. I'm going to try a different approach and see if that can get over the hump.
from omega_h.
from omega_h.
The error after merging was a failure here. The data looked correct but the array sizes were getting messed up after the write to file here.
I suspected that it's somehow an issue with the tag swapping for a while and then I thought it was just an unmatched conversion, but doesn't seem to be.
You can find the merge with the broken unit tests and some debug outputs here.
As I mentioned earlier. I'm refactoring a bit such that we store the tags in rc format but not in the tags vector of the mesh. Then everywhere possible we work with the rc arrays rather than using tags. I haven't dug into it yet, but as you say we may need the mesh tags for adaption. If so, there is still the same Torc function, but now it works slightly different under the hood.
from omega_h.
@joshia5 is there a reason that the rc
tag is stored as a Real
? Whenever I have dealt with classification in other codes we always make sure to use integers to avoid any floating point issues with the classifications. (granted the round trip int->double->int isn't likely to cause problems).
from omega_h.
@joshia5 is there a reason that the
rc
tag is stored as aReal
? Whenever I have dealt with classification in other codes we always make sure to use integers to avoid any floating point issues with the classifications. (granted the round trip int->double->int isn't likely to cause problems).
I don't follow. rc
tags are not stored as Real
. Would you be able to add permalink where you find it to be so?
from omega_h.
rc
tags are stored as per the user specified type
from omega_h.
Fixed in 7dbcd10
from omega_h.
Related Issues (20)
- Failure during mesh adaptation HOT 3
- Perlmutter/Frontier Test Failure using CUDA aware MPI HOT 4
- shape_test fails with cpu serial backend build (kokkos disabled)
- Warning message configuring on Summit with CMake 3.23.2, gcc 11.2.0, and Cuda 11.7.1
- Error building with nvidia/22.7, cuda11.7, and kokkos 4.0.01 on Perlmutter
- warp_test fails in mpi on frontier with reducedThrust branch HOT 1
- build error ('undefined hidden symbol') using amdclang compilers and no optimizations on frontier
- warp_test_serial hangs with amdclang compilers on frontier HOT 1
- Error while building with simmodsuite/16.0-210606dev HOT 1
- Error while building with simmodsuite_2023.1-230428dev HOT 2
- what versions of kokkos and cuda does omegah 10.8 require?
- nents(Topo_type ent_type) doesn't work for mono-topology meshes created with build_box HOT 1
- Omega_h::omega_h only available from an install version of omegah, not if host app adds it as subdirectory
- describe: provide more tag info HOT 3
- a unit test failure on A100/Perlmutter with CUDA UVM enabled
- periodic_test fails HOT 4
- replace vendor specific sort calls with kokkos::sort using custom comparator
- cuda aware run of deltawing case fails on perlmutter
- per process output from --osh-time sorted function is mixed together on stdout
- cleanup TEST_EXES in src/CMakeLists.txt
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from omega_h.