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

Plan to make a serial version of the fortran code #25

Closed
shenmidelin opened this issue May 20, 2019 · 7 comments
Closed

Plan to make a serial version of the fortran code #25

shenmidelin opened this issue May 20, 2019 · 7 comments

Comments

@shenmidelin
Copy link
Contributor

To make the packaging with pip and conda easier, I plan to make a serial version of the fortran code. Add preprocessor macros

# if defined (MPI)
# else
# endif

and make the serial version as the default one for pip and conda packages.
Without MPI, building a working pip wheel or conda package for Linux and OSX should be very easy.
If users need MPI version, they can build from source.

@mpmdean
Copy link
Contributor

mpmdean commented May 20, 2019

Do we have to make a serial version in order to make conda work?

@shenmidelin
Copy link
Contributor Author

It may be possible to create a working and portable conda package with MPI, but I feel that it is still not easy.

@leofang
Copy link

leofang commented May 21, 2019

I work part time (?) with DAMA and I found this thread in my mailing list :D

In NSLS-II's Conda channel, there're pre-built Open MPI and MPICH. If you're writing your own Conda recipe (see, e.g., NSLS-II/lightsource2-recipes/pull/486), you can simply add the dependencies in the run section:

run:
- python
- openmpi
- mpi4py
 # and other stuff

Also consider the build section if the presence of MPI header at compile time is required. But for pip, I think having an MPI marco is probably the way out.

By the way, if you're targeting full support for OS X, have you considered Homebrew? It has much better support for non-Python libraries than Conda, and still is the first choice for package management for OS X users. I don't have experience (yet) in preparing a Homebrew formula though.

@shenmidelin
Copy link
Contributor Author

Thanks a lot for the very helpful information! I will try it.

Yes, I agree with you that Homebrew has much better support than conda. I have already successfully install our code with MPI by Homebrew and Macports, and they both are easy. I think we can easily build a Homebrew formulae or Portfile with MPI for OSX. For pip, I have not found other ways to deal with MPI.

@mpmdean
Copy link
Contributor

mpmdean commented May 21, 2019

@shenmidelin We should let @mrakitin try to make what we would ideally want -- a conda package providing full functionality. If this proves impossible let's go from there, but I would suggest not to compromises unless we need to. @leofang thanks a lot for the tips.

Conda is very desirable for integrating to NSLS-II's infrastructure and helpful for integrating with other software in general.

@shenmidelin
Copy link
Contributor Author

@mpmdean OK, let's hold this off for now.

@shenmidelin
Copy link
Contributor Author

Anaconda is now working perfectly, so we do not need a serial version of the fortran code anymore. Let's close this issue #25.

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

3 participants