Opened 10 years ago

Closed 9 years ago

#47426 closed defect (wontfix)

Add OpenCoarrays dependency for gcc5

Reported by: rouson (Damian Rouson) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc: mww@…, ryandesign (Ryan Carsten Schmidt), seanfarley (Sean Farley), cooljeanius (Eric Gallager), petrrr
Port: gcc5

Description

As of GCC 5, compiling with gfortran requires the OpenCoarrays library (www.opencoarrays.org) in order to produce parallel executables from programs that use the coarray features of Fortran 2008. OpenCoarrays produces two versions of its library: one that uses the Message Passing Interface (MPI) and one that uses the GASNet communication library. the MPI library (libcaf_mpi.a) is intended to be the default. Could you please add the OpenCoarrays MPI library as a dependency for GCC 5?

I am part of the OpenCoarrays team and would be glad to assist with this in any way I can.

Damian

Attachments (1)

Portfile (667 bytes) - added by fanfarillo.gcc@… 10 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 in reply to:  description Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Keywords: gcc fortran removed

Replying to damian@…:

Could you please add the OpenCoarrays MPI library as a dependency for GCC 5?

Which port contains this library? Or do we need to first create a port for it?

comment:2 Changed 10 years ago by rouson (Damian Rouson)

A port would have to be created for OpenCoarrays. The source is currently available via public read-only access at https://bitbucket.org/sourceryinstitute/opencoarrays.

Damian

comment:3 Changed 10 years ago by rouson (Damian Rouson)

Is this likely to happen? Also, the OpenCoarrays port would need to have an MPI library designated as a dependency. The preferred MPI is MPICH for which I believe a port already exists.

Last edited 10 years ago by rouson (Damian Rouson) (previous) (diff)

comment:4 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: sean@… added

I will Cc Sean, since he's the author of the mpi portgroup in MacPorts; I have no experience with it.

comment:5 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Changed 10 years ago by fanfarillo.gcc@…

Attachment: Portfile added

comment:6 Changed 10 years ago by fanfarillo.gcc@…

Hi everyone,

I'm a new entry of the Mac and Macports world, please be patient :). I'm trying to make the port for OpenCoarrays (Portfile attached) but I encountered some problems in doing it. Before describing the problems I summarise how it should work.

OpenCoarrays is a communication library based on MPI. A user who wants to use the coarray support provided by GFortran 5.1 has to link his/her program with the OpenCoarrays library called libcaf_mpi. Assuming that the source file is called coarray_test.f90 what I am expecting to see is the following: mpif90 -fcoarray=lib coarray_test.f90 -lcaf_mpi -o test. This syntax works only Linux when the path to libcaf_mpi.a is in the LIBRARY_PATH environment variable.

With the Portfile attached I'm able to download and build correctly but Macports saves the library (libcaf_mpi.a) in / (which generates a warning). How can I save the file in a different location?

How can I set the LIBRARY_PATH environment variable from the Portfile?

Thanks for your support.

Alessandro

comment:7 in reply to:  6 ; Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

I see you submitted an updated version of this portfile in #47806.

Replying to fanfarillo.gcc@…:

With the Portfile attached I'm able to download and build correctly but Macports saves the library (libcaf_mpi.a) in / (which generates a warning). How can I save the file in a different location?

It depends on the build system; every build system is different. If the build system cannot be coerced to put the file where you want it, you can move it in a post-destroot block, or you can override the destroot phase entirely, like you did in the portfile you submitted in #47806.

How can I set the LIBRARY_PATH environment variable from the Portfile?

Sounds like you want to modify the user's environment, outside of what happens in MacPorts? MacPorts cannot do that. The user has to do it on their own. The port can use the notes command to display text to the user advising them what they must do.

comment:8 in reply to:  7 ; Changed 9 years ago by rouson (Damian Rouson)

Replying to ryandesign@…:

I see you submitted an updated version of this portfile in #47806.

Replying to fanfarillo.gcc@…:

With the Portfile attached I'm able to download and build correctly but Macports saves the library (libcaf_mpi.a) in / (which generates a warning). How can I save the file in a different location?

It depends on the build system; every build system is different. If the build system cannot be coerced to put the file where you want it, you can move it in a post-destroot block, or you can override the destroot phase entirely, like you did in the portfile you submitted in #47806.

How can I set the LIBRARY_PATH environment variable from the Portfile?

Sounds like you want to modify the user's environment, outside of what happens in MacPorts? MacPorts cannot do that. The user has to do it on their own. The port can use the notes command to display text to the user advising them what they must do.

I think this finally corrects my previous misinterpretation that Macports could edit my login profile (~/.profile), which contains lines such as the one below. I now realize these lines must have been placed there when Macports itself was installed. Based on what you're saying, Macports cannot edit login profiles. Correct?

Damian

##
# Your previous /Users/rouson/.profile file was backed up as /Users/rouson/.profile.macports-saved_2013-03-12_at_14:43:25
##

# MacPorts Installer addition on 2013-03-12_at_14:43:25: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
Last edited 9 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:9 in reply to:  6 Changed 9 years ago by larryv (Lawrence Velázquez)

Replying to fanfarillo.gcc@…:

This syntax works only Linux when the path to libcaf_mpi.a is in the LIBRARY_PATH environment variable.

You shouldn’t have to set LIBRARY_PATH. Just pass the correct -L flag to the compiler.

comment:10 in reply to:  8 Changed 9 years ago by larryv (Lawrence Velázquez)

Replying to damian@…:

I think this finally corrects my previous misinterpretation that Macports could edit my login profile (~/.profile), which contains lines such as the one below. I now realize these lines must have been placed there when Macports itself was installed. Based on what you're saying, Macports cannot edit login profiles. Correct?

The MacPorts installer can modify a user’s .profile, but MacPorts itself does not.

comment:11 Changed 9 years ago by petrrr

Cc: petr@… added

Cc Me!

comment:12 Changed 9 years ago by rouson (Damian Rouson)

I request that this ticket be closed in light of the discussion on Ticket #47806.

Last edited 9 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:13 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.