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

Installation guide and first tutorial example comments #1123

Closed
alecontri opened this issue Jul 14, 2024 · 6 comments
Closed

Installation guide and first tutorial example comments #1123

alecontri opened this issue Jul 14, 2024 · 6 comments

Comments

@alecontri
Copy link

Hi,

I am going through the installation (on MacOS Sonoma 14.5, Apple M1) and I have a couple problems. I will use $HOME/t8code_install as in the guide to indicate where I built t8code.

The last steps in the installation guide are as follows:

Add the library folder to LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/t8code_install/lib
Add these to your compile line
-I$HOME/t8code_install/include
-L$HOME/t8code_install/lib
-lt8 -lp4est -lsc -lm -lz

but I don't have any lib folder in t8code_install, instead they are in t8code_install/local. Is this an expected behaviour?
When I do the suggested steps above for t8code_install/local and try to run c++ t8_step0_helloworld.cxx -I$HOME/t8code_install/local/include -L$HOME/t8code_install/local/lib -lt8 -lp4est -lsc -lm -lz, I get the error:
fatal error: 'mpi.h' file not found
#include <mpi.h>
^~~~~~~
1 error generated.
I used the suggested
configure CFLAGS="-O3" CXXFLAGS="-O3" --enable-mpi CC=mpicc CXX=mpicxx for the build.

Also, as a side comment, under the paragraph -Build t8code with CMake-, there is the subparagraph -tldr;- and following that -Installing using CMake-, what is the difference between the two?

Thanks a lot for any help,
Alessandro Contri

@holke
Copy link
Collaborator

holke commented Jul 14, 2024

Hi @alecontri

you are probably getting the error because you are compiling using "gcc" and not "mpicc".

Could you try

mpicxx t8_step0_helloworld.cxx -I$HOME/t8code_install/local/include -L$HOME/t8code_install/local/lib -lt8 -lp4est -lsc -lm -lz

instead?

@holke
Copy link
Collaborator

holke commented Jul 14, 2024

Yes, on some machines the files are installed in PREFIX/local, this should not make any difference, you correctly adapted the paths.

You could configure with --prefix=$HOME/t8code_install --exec-prefix=$HOME/t8code_install which should set t8code_install as the folder for lib and include.

@holke
Copy link
Collaborator

holke commented Jul 14, 2024

"Also, as a side comment, under the paragraph -Build t8code with CMake-, there is the subparagraph -tldr;- and following that -Installing using CMake-, what is the difference between the two?"

I need to pass that question on to @jmark or @sandro-elsweijer who wrote a lot of the CMake system.

@alecontri
Copy link
Author

Hi @holke,

the use of gcc instead op mpicc was actually a big oversight, thanks a lot for pointing out. Now the output is:
[Alessandros-MacBook-Pro.local:70949] shmem: mmap: an error occurred while determining whether or not /tmp/ompi.Alessandros-MacBook-Pro.0/jf.0/332529664/sm_segment.Alessandros-MacBook-Pro.0.13d20000.0 could be created.
[libsc] This is libsc 2.8.5.406-2b20
[t8] This is t8 2.0.0.391-a5af3
[t8] CPP
[t8] CPPFLAGS
[t8] CC mpicc
[t8] CFLAGS -O3
[t8] LDFLAGS
[t8] LIBS -lz -lstdc++
[t8] [step0]
[t8] [step0] Hello, this is t8code :)
[t8] [step0]

@holke
Copy link
Collaborator

holke commented Jul 15, 2024

Hi, its great to see that the code is running now.

We recently encountered issues with OpenMPI and shared memory support - especially on M1 - and this looks related to it.
As long as your tests pass (try running make check), you should be good for the time being.

Please refer to #1109 for the shmem issues.

I will close this issue for now, since the installation question is answered.

@holke holke closed this as completed Jul 15, 2024
@alecontri
Copy link
Author

Linking this solved issue to the review for JOSS I am doing: openjournals/joss-reviews#6887

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