geodynamics / sw4lite Goto Github PK
View Code? Open in Web Editor NEWTesting numerical kernels in SW4
License: Other
Testing numerical kernels in SW4
License: Other
When compiling sw4lite with a clang-based compiler for AMD GPUs, I'm getting warnings for device-routines.C, lines 1841 and 1843, e.g.:
src/device-routines.C:1841:26: warning: array index 3 is past the end of the array (which contains 3 elements)
[-Warray-bounds]
(qum[c][4]-2*qum[c][3]+sum(c,ith,jth,k ))
^ ~
src/device-routines.C:1744:3: note: array 'qum' declared here
float_sw4 qu[DIAMETER][3], qum[DIAMETER][3]; ^
Since DIAMETER has the value 5, and in the loop, c is at most 3, the array accesses are not really out of bounds, but I can't tell whether this is an actual mistake, or if something clever is going on. Could you please double-check, and perhaps add a comment if the code is in fact correct?
The relevant lines were added by Anders Petersson in Oct last year:
[rvanoo@snell:~/repos/sw4lite] $ git blame -L 1840,+5 src/device-routines.C
^dfbecf0 (Anders Petersson 2017-10-19 16:07:10 -0700 1840) -rho(i,j,k+1)*dcz(k+1)*
^dfbecf0 (Anders Petersson 2017-10-19 16:07:10 -0700 1841) (qum[c][4]-2*qum[c][3]+sum(c,ith,jth,k ))
^dfbecf0 (Anders Petersson 2017-10-19 16:07:10 -0700 1842) +2*rho(i,j,k)*dcz(k) *
^dfbecf0 (Anders Petersson 2017-10-19 16:07:10 -0700 1843) (qum[c][3]-2*sum(c,ith,jth,k )+qum[c][1])
^dfbecf0 (Anders Petersson 2017-10-19 16:07:10 -0700 1844) -rho(i,j,k-1)*dcz(k-1)*
[Edit] I just noticed that the commit mentioned by 'git blame' above was the initial commit.
Hi,
I am new to this proxy app.
I built it according to the readme and tried to run it with:
mpirun -n 4 ./sw4lite ../tests/pointsource/pointsource.in
It would say:
ERROR: developer option corder, must be zero when fortran routines are use
I modified the content of tests/pointsource/pointsource.in
to make corder=0
and it will give the same output as the readme:
...
Errors at time 0.6 Linf = 0.569416 L2 = 0.0245361 norm of solution = 3.7439
Am I doing this right? What is corder?
Thanks in advance.
Regards,
Chen
Cmake build now (after #16) will complain if mpi/lapack not found. But it would be great if it even automatically downloaded lapack.
Couple of approaches:
When building the latest CUDA version, and running it with the "pointsource.in" example input, as described in README.md, the expected output is
Errors at time 0.6 Linf = 0.569416 L2 = 0.0245361 norm of solution = 3.7439
Instead, I'm getting
Errors at time 0.6 Linf = 3.7439 L2 = 1.01524 norm of solution = 3.7439
(I.e., Linf and L2 are different, norm of solution is identical).
I interpret the statement in README.md "When modifying the code, it is important to verify that these numbers have not changed" to say that all three values should match, and they don't. Does this indicate an error in the code?
While making an initial spackage (spack/spack#5917) I ran into some issues while building the fortran versions in that files would try to be compiled before type_defs.f90 had been used to generate a .mod file. It happened maybe one in every ten times (and I have not been able to reproduce it in just a terminal with make -j), but I disabled the fortran version and only built the ckernels as a result.
I am not an expert on fortran but a quick googling makes it seem like this may be a common issue due to Make not having knowledge of these dependencies.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.