-
Notifications
You must be signed in to change notification settings - Fork 8
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
Create devcontainer.json #34
Conversation
Dockerfile
Outdated
RUN yum -y update && \ | ||
yum install -y cmake gcc-c++ git make && \ | ||
sed -i 's/shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters, firstSequenceLength, min_overlap)/shared(currently_defined_clusters, try_cluster, sequence_lengths, current_sequence, current_clusters)/g' src/read_reducer.cpp && \ | ||
sed -i 's/shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates, step_penalty, min_overlap, resolutionOption, firstSequenceLength, theSequence, left_to_do)/shared(my_distance_estimate,nodeParents,workingNodes,distanceEstimates)/g' src/ShortestPathTN93.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you like to just commit the change to the codebase instead of sed? A patch file is another alternative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
Okay, the OpenMP edits have been included in the following commit: I just tested that, starting from the development Docker image, I'm able to successfully compile and run cmake .
make
./tn93 -h However, I think this edit might break compilation in the Ubuntu environment. @stevenweaver Can you check? EDIT: Actually, it seems like the "CMake on multiple platforms" check worked, so I think this is ready to merge! EDIT 2: Never mind; it seems to break in the Ubuntu one. Is there a backwards-compatible syntax for this OpenMP syntax? |
@niemasd -- allow me some time to get to root of this issue. There seems to be a discrepancy between distributions that extends beyond which compiler version we are using. |
@stevenweaver Sounds great; thanks for looking into it! |
Hi Niema, This is due to an incompatibility with We can do the following to use
Then proceed with CMake as normal. Best, |
Thanks for looking into that! Should we use
|
Well, what I'm worried about with the |
Ah, I didn't realize that! I'll switch over to |
Dear @niemasd and @stevenweaver, I have some code in HyPhy to deal with different OPENMP versions. Take a look at https://github.com/veg/hyphy/blob/c1f1ca1ce0123bc7e20fac39810a7aa8ba26377b/src/core/matrix.cpp#L3987 Best, |
I reverted the OpenMP edits I had made to the
I would personally lean towards 2, but I am happy with what you two think is best |
I'll go ahead and move forward with option 2 (use @stevenweaver's GCC version update), and will create/update PRs accordingly. |
@stevenweaver The proposed fixes to use GCC 10 didn't seem to work. Specifically, I updated the
But I still get the following compilation error:
I'll investigate; any thoughts? |
@niemasd -- Do you still have the output of CMake? Is it picking up GCC-10? I used the Dockerfile provided with Visual Studio to confirm that it worked, but it was in an interactive terminal. I'll try running the updated Dockerfile as well. |
Here's the complete output; I don't seem to see the GCC version:
At the command line, it seems like GCC-10 is indeed the version in the environment (but not sure if CMake just isn't using it)?
|
Yeah, there must be cached CMake files somewhere, which is really weird if a fresh container is being generated from a Dockerfile. |
Ah yup, I was able to show the whole compilation commands as follows:
Checking that
I'll look into seeing how to make sure CMake uses the
|
I think I figured it out: the EDIT: I also changed it to the following command as per some comments from Googling: source /opt/rh/gcc-toolset-10/enable |
@stevenweaver Confirmed that it worked! I've created a new PR with the fix: #36 |
With this devcontainer file, VS Code (and GitHub Codespaces) will be able to create the development environment automatically.