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

Added documentation for the compiler-wrapper script hpxcxx.in in creating_hpx_projects.rst #4414

Merged
merged 4 commits into from Jul 6, 2020

Conversation

MukundVaradarajan
Copy link
Contributor

No description provided.

@MukundVaradarajan
Copy link
Contributor Author

MukundVaradarajan commented Feb 28, 2020

@msimberg @hkaiser please check the documentation and correct me wherever I've gone wrong, thanks :)

Copy link
Member

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add some examples (for a component and/or executable) demonstrating the tool, please?

@MukundVaradarajan
Copy link
Contributor Author

MukundVaradarajan commented Mar 5, 2020

Could you add some examples (for a component and/or executable) demonstrating the tool, please?

Let me clarify one thing. The only way to invoke it is to run python3 hpxcxx.in flags files, isn't it? Please correct me if I am wrong. I also have little or no idea about components and executables. Is it possible to get some clarity on this? ( @stevenrbrandt )

@hkaiser
Copy link
Member

hkaiser commented Mar 7, 2020

@MukundVaradarajan could you please rebase your PR on top of current master to overcome the spell-check problems that are reported by the CircleCI builder?

docs/sphinx/manual/creating_hpx_projects.rst Outdated Show resolved Hide resolved
docs/sphinx/manual/creating_hpx_projects.rst Outdated Show resolved Hide resolved
Co-Authored-By: Mikael Simberg <mikael.simberg@iki.fi>
@MukundVaradarajan
Copy link
Contributor Author

Could you add some examples (for a component and/or executable) demonstrating the tool, please?

Let me clarify one thing. The only way to invoke it is to run python3 hpxcxx.in flags files, isn't it? Please correct me if I am wrong. I also have little or no idea about components and executables. Is it possible to get some clarity on this? ( @stevenrbrandt )

If someone can please point me to some tutorials or stuff like that, it would be awesome. Really sorry for the trouble I'm causing :( @msimberg @hkaiser any updates on this?

@MukundVaradarajan
Copy link
Contributor Author

MukundVaradarajan commented Mar 12, 2020

@hkaiser I am also not able to build hpx due to the following CMake error

`CMake Error at src/cmake_install.cmake:53 (file):
file INSTALL cannot find
"/home/mukund/open-source/hpx/my_build/lib/libhpx.so.1.4.0".
Call Stack (most recent call first):
cmake_install.cmake:138 (include)

Makefile:61: recipe for target 'install' failed
make: *** [install] Error 1`

Should I pull again from current master?

@msimberg
Copy link
Contributor

@MukundVaradarajan that should not happen under normal circumstances (and master is not broken, at least not like that). Could you post the full output, please?

@MukundVaradarajan
Copy link
Contributor Author

MukundVaradarajan commented Mar 14, 2020

@MukundVaradarajan that should not happen under normal circumstances (and master is not broken, at least not like that). Could you post the full output, please?

I had a install.sh script which had contents from https://stellar-group.github.io/hpx-docs/latest/html/quickstart.html#building-hpx where my install path was /home/<my-name>/open-source/hpx/my_build nothing else changed while I ran. My local version is basically a clone of my fork of this repo.
https://drive.google.com/file/d/19STD_0bEOTz0_b9OU4vAcLoU9zmi1ZoT/view?usp=sharing
This was my ouptut

@msimberg I've updated the output file to include the statements from stderr too. Sorry it was missing the last time. It is the same error for every run.

@aurianer
Copy link
Contributor

@MukundVaradarajan could you also put you're cmake command ?

@MukundVaradarajan
Copy link
Contributor Author

@MukundVaradarajan could you also put you're cmake command ?

mkdir my_build && cd my_build cmake -DCMAKE_INSTALL_PREFIX=/home/mukund/open-source/hpx/my_build .. make install
These were the contents of install.sh that I used

@msimberg
Copy link
Contributor

@MukundVaradarajan that's strange. I don't see the error you posted in #4414 (comment) in https://drive.google.com/open?id=1-4c_c3P_WjXEcTJHZE0SKPY1boshpk95. Are they different runs? Do you get the same errors every time?

@MukundVaradarajan
Copy link
Contributor Author

@msimberg @hkaiser while this problem might be specific to me, I would like to update the docs with the examples, this whole issue was because I was experimenting. Could you kindly help me get it done in some way? I currently have no idea on how to build things. Really sorry for the trouble I'm causing. I feel this is taking too long for a simple issue.

@msimberg
Copy link
Contributor

@MukundVaradarajan this definitely not causing any trouble! The reason I'd like to resolve your install issues is that then you could see the script in action yourself. But I think it might be easiest to try to solve it live on IRC (you can also join through matrix). Let me know if you need help finding or joining the channel.

As a minimal executable example you could do the following:

@MukundVaradarajan
Copy link
Contributor Author

@MukundVaradarajan this definitely not causing any trouble! The reason I'd like to resolve your install issues is that then you could see the script in action yourself. But I think it might be easiest to try to solve it live on IRC (you can also join through matrix). Let me know if you need help finding or joining the channel.

As a minimal executable example you could do the following:

* Include the source of https://github.com/STEllAR-GROUP/hpx/blob/master/examples/quickstart/hello_world_1.cpp using `.. literalinclude` like here: https://github.com/STEllAR-GROUP/hpx/blob/master/docs/sphinx/quickstart.rst#hello-world. This will be our "example executable".

* I _think_ (once you've installed HPX) that you can then compile it with `hpxcxx --exe=hello_world main.cpp` (where `main.cpp` is the name of the source file)

I was about to ask about solving my issue somewhere easily accessible and more live-oriented. Can you kindly direct me towards joining the channel? I would love to get my issues solved. Thanks so much for the help!

@msimberg
Copy link
Contributor

@MukundVaradarajan this definitely not causing any trouble! The reason I'd like to resolve your install issues is that then you could see the script in action yourself. But I think it might be easiest to try to solve it live on IRC (you can also join through matrix). Let me know if you need help finding or joining the channel.
As a minimal executable example you could do the following:

* Include the source of https://github.com/STEllAR-GROUP/hpx/blob/master/examples/quickstart/hello_world_1.cpp using `.. literalinclude` like here: https://github.com/STEllAR-GROUP/hpx/blob/master/docs/sphinx/quickstart.rst#hello-world. This will be our "example executable".

* I _think_ (once you've installed HPX) that you can then compile it with `hpxcxx --exe=hello_world main.cpp` (where `main.cpp` is the name of the source file)

I was about to ask about solving my issue somewhere easily accessible and more live-oriented. Can you kindly direct me towards joining the channel? I would love to get my issues solved. Thanks so much for the help!

This is probably the fastest way to get on IRC: https://webchat.freenode.net/. The channel name is #ste||ar. Alternatively you can join through a dedicated IRC client. If you have a matrix.org account you can also join the IRC channel that way (the channel over there is called #hpx:matrix.org). I may not be very responsive during the weekend, but others may be around. Please don't get discouraged if noone replies immediately :)

@msimberg
Copy link
Contributor

Hi @MukundVaradarajan. How did it go with your build errors in the end?

@MukundVaradarajan
Copy link
Contributor Author

Hi @MukundVaradarajan. How did it go with your build errors in the end?
Hi, @msimberg I am still facing errors, just with a different file, this time. is it ok if I resolve this through IRC?

@msimberg
Copy link
Contributor

Hi @MukundVaradarajan. How did it go with your build errors in the end?
Hi, @msimberg I am still facing errors, just with a different file, this time. is it ok if I resolve this through IRC?

IRC is always ok!

@aurianer
Copy link
Contributor

I've wrote on IRC but I didn't see you left the room, here is some tips:
"MukundVaradaraja: I managed to reproduce the error, I couldn't cp the hpxrun.py file into the /usr/local dir because the owner of the directory is root (output of ls -l /usr/local), please consider specifying another -DCMAKE_INSTALL_PREFIX=<path> to a location you know you are the owner of the directory (to see your username : whoami)"

@hkaiser
Copy link
Member

hkaiser commented Mar 31, 2020

@MukundVaradaraja what is the status of this? Do you plan to finish this up?

@MukundVaradarajan
Copy link
Contributor Author

@MukundVaradaraja what is the status of this? Do you plan to finish this up?

Hi, @hkaiser I have been really busy this week and I am unable to properly work on this, I am really sorry. But if there is some way that I can just include examples without building, I would be happy to finish this because the build issue is pretty frustrating and I would like to handle it separately. Is it possible to get relevant help from here?

@MukundVaradarajan
Copy link
Contributor Author

I've wrote on IRC but I didn't see you left the room, here is some tips:
"MukundVaradaraja: I managed to reproduce the error, I couldn't cp the hpxrun.py file into the /usr/local dir because the owner of the directory is root (output of ls -l /usr/local), please consider specifying another -DCMAKE_INSTALL_PREFIX=<path> to a location you know you are the owner of the directory (to see your username : whoami)"

Thanks so much for the help, @aurianer .
I think the build went well, but is there a way to know for sure that the build went smoothly?

@msimberg
Copy link
Contributor

msimberg commented Apr 2, 2020

Thanks so much for the help, @aurianer .
I think the build went well, but is there a way to know for sure that the build went smoothly?

Building and running the tests is the surest way. We have some tests which fail occasionally but you should definitely see 99% pass. There are a lot of tests though and you don't really need to run those. If you just want a basic sanity check you can run e.g. hello_world_1 and hello_world_distributed (both in the bin directory). You should be able to compile hello_world_1 with hpxcxx as well. The source file is in examples/quickstart.

@MukundVaradarajan
Copy link
Contributor Author

Thanks so much for the help, @aurianer .
I think the build went well, but is there a way to know for sure that the build went smoothly?

Building and running the tests is the surest way. We have some tests which fail occasionally but you should definitely see 99% pass. There are a lot of tests though and you don't really need to run those. If you just want a basic sanity check you can run e.g. hello_world_1 and hello_world_distributed (both in the bin directory). You should be able to compile hello_world_1 with hpxcxx as well. The source file is in examples/quickstart.

@msimberg
Build and tests went successfully, thanks a lot everyone! I have to come back to my initial question. I am unaware of what an application/component is in the context of hpx. Can I get some help on this? Some kind of tutorial or helpful links would also do :)

@msimberg
Copy link
Contributor

msimberg commented Apr 3, 2020

@msimberg
Build and tests went successfully, thanks a lot everyone! I have to come back to my initial question. I am unaware of what an application/component is in the context of hpx. Can I get some help on this? Some kind of tutorial or helpful links would also do :)

Applications are just what it says :) i.e. an executable (that is using HPX of course, but it's still an executable in the sense of any other executable). Components are a slightly overloaded term in HPX. On one hand it's a distributed object (https://stellar-group.github.io/hpx-docs/branches/master/html/terminology.html, https://stellar-group.github.io/hpx-docs/branches/master/html/manual/writing_distributed_hpx_applications.html#writing-components). On the other hand it's also the name we use for a shared library which contains HPX components. But in the context of compiling an application or component with hpxcxx they are just synonyms for executable and library that link to HPX.

@msimberg
Copy link
Contributor

msimberg commented Jun 3, 2020

@MukundVaradarajan do you think you'd have time to do the last small changes on this one? I'd say it's ready to merged and it'd be nice to have it in the next release. If you don't mind I can also do the last changes on this.

@MukundVaradarajan
Copy link
Contributor Author

@MukundVaradarajan do you think you'd have time to do the last small changes on this one? I'd say it's ready to merged and it'd be nice to have it in the next release. If you don't mind I can also do the last changes on this.

I apologize for not responding soon. I got caught up in various personal issues.

I don't think I'll be able to add examples since I don't have experience in shared libraries and hpx components and I'm still caught up in various other issues. It would be great if @msimberg could apply the final changes to this. I apologize again for the delay in reply and inability to complete this.

@msimberg msimberg merged commit cae3194 into STEllAR-GROUP:master Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants