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

x * y * z * 3^3 / ppn can exceed 2^31 on modern machines #10

Open
rolfriesen opened this issue Apr 28, 2019 · 3 comments
Open

x * y * z * 3^3 / ppn can exceed 2^31 on modern machines #10

rolfriesen opened this issue Apr 28, 2019 · 3 comments

Comments

@rolfriesen
Copy link

Running on a 192 GB dual socket machine. Using the MPI + OMP version in miniFE_openmp_opt
export OMP_NUM_THREADS=11
mpirun -n 4 -ppn 4 ./miniFE.x nx=682 ny=682 nz=682
throws an exception because nrows_max in CSRMatrix.hpp turns negative due to int overflow.
packed_cols.reserve(nrows_max); doesn't like negative numbers ;-)

mpirun -n 4 -ppn 4 ./miniFE.x nx=680 ny=680 nz=680 # works

Unfortunately making MINIFE_GLOBAL_ORDINAL a long is not sufficient to address the issue.

@maherou
Copy link
Member

maherou commented May 1, 2019

Hi Rolf,

C++ long is usually 32 bits. C++ long long is guaranteed to be at least 64 bits. Try setting MINIFE_GLOBAL_ORDINAL to long long and see if it helps.

@maherou
Copy link
Member

maherou commented May 1, 2019

Also, if your local problem ends up being > 2.1B in size, you can change MINIFE_LOCAL_ORDINAL to long long also.

@rolfriesen
Copy link
Author

rolfriesen commented May 1, 2019 via email

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

No branches or pull requests

2 participants