Comments (5)
Stale issue message
from seacas.
I need these functions as well, so I will write the fortran wrappers. Do I understand correctly that they are located in packages/seacas/libraries/exodus_for/src/*.c
Is there a preferred choice for the fortran names?
from seacas.
No preferred choice... At the time they were originally written there was some perhaps unjustified need / desire to keep them around 6 or 8 characters or less which gives some very strange names; especially since they all start with ex
from seacas.
OK, the reason for this is historical. A long time ago, we had regular fortran code with 4-byte ints and 4-byte reals. We decided that an "easy" way to increase the precision/capacity of the codes was to use a compiler directive that would change all of the fortran ints and reals to 8-byte quantities. This is -fdefault-real-8
and -fdefault-integer-8
for gfortran.
This worked very nicely until we needed to link Fortran and C since the C had default 4-byte ints and 4/8-byte reals. So, we came up with the addrwrap.F
concept. If Build64
is defined, then we compile the routines in addrwrap.F
(so exppv
will be resolved in addrwrap.o). The exppv
in addrwrap will convert the integers from 8-bytes to 4-bytes and then call through to the routine exppv4
in exo_jack.c which then calls through to the actual ex_put_partial_var
in the C API.
If Build64
is not defined, then addrwrap.o
contains nothing and the exppv
is resolved from exo_jack.c...
So, the routine in addrwrap "just" needs to convert 8-byte ints to 4-byte ints on the call and 4-byte returned ints to 8-byte ints on the return (typically ierr).
This was all working fine and then we decided to support 8-byte integers for some values in the C API... These are indicated by the void_int*
in the exo_jack.c and C API. They are actually easier to handle since they don't need to be converted 8byte-4byte-8byte...
There is a similar discussion at https://github.com/sandialabs/seacas/wiki/Exodus-Fortran-Strangeness.
Hopefully this helps... Basically, I always write the exo_jack
version first and then the addrwap
version handles the integers 4-8-4 conversions. There are macros F2C
which take care of adding the 4
and the _
to the names in exo_jack
if needed.
from seacas.
This should be closed via #321
from seacas.
Related Issues (20)
- -Wreserved-identifier warnings in public API names HOT 7
- Build error in "Linking CXX executable struc_to_unstruc" HOT 1
- exodus 2023.10.24 and msys2/mingw HOT 3
- Need Curl under Windows 10's WSL HOT 2
- Nem_spread should have option to set single-file-read from command line
- Grepos subsetting corrupts sideset variable data
- How to instantiate a transform? HOT 7
- Publish packaged exodus python bindings to PyPI HOT 2
- testwt-assembly.c: Error c2057 when building with MSVC and NetCDF binaries are found HOT 3
- Improve epu variable inclusion/exclusion handling.
- Verify that properties passed to IOSS are used.
- Add option to EPU to delete the file-per-rank files after joining successfully
- io_modify geometry modification does not work with CGNS structured HOT 1
- installation issue: not creating lib and include folder with ./install-tpl.sh HOT 11
- Aprepro Robustness
- Python bindings include absolute path to build directory. HOT 1
- ex_close fails if file is mode is EX_READ or EX_CLOBBER in parallel HOT 7
- EPU: Add capability to select "last 3 steps" HOT 1
- [MSVC][c++20][c++latest] Ioss_DatabaseIO.C failed with error 7525: call to immediate function is not a constant expression HOT 4
- [URGENT] Exonull does not compile with SEACAS_HAVE_MPI ON on Windows HOT 9
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 seacas.