Comments (14)
Excellent! Glad to hear that it compiles without warnings :-)
I've updated the documentation to note that gcc10+ is currently not supported.
from flowsieve.
Oh, it looks like gcc wants const
s to be specified as openmp-shared (whereas intel auto-imposes shared const
s).
Thanks! I've mostly been compiling with intel lately, but will rebuild a gcc version to hunt for other syntax mis-matches.
from flowsieve.
Great. Let me know when you fixed it for gcc
from flowsieve.
Ah, okay, it looks like GCC 9 and onwards changed how const
-declared variables are handle in OpenMP clauses (https://gcc.gnu.org/gcc-9/porting_to.html) in a way the lightly breaks back-compatibility. I'm resolving the (shockingly many) warnings that pop up with GCC (but not intel, weirdly enough), but resolving the OpenMP predetermined errors shouldn't be too bad. It looks like it only hits small variables, so setting them as firstprivate
should do it. I'm testing on GCCv7 right now, but will do a 9+ test afterwards (just need to see which of the servers have a GCCv9+ installation of the modules...).
Will hopefully be done later today.
from flowsieve.
@SalahKouhen tagging you here so you get the updates when this is resolved too
from flowsieve.
I've updated the code base and it now compiles for me without warnings or errors with GCCv8 and GCCv9 ( I didn't have access to a GCCv10 module set that had the libraries that I needed, but v9 is on the same side of the openmp behaviour change so with a little luck v10 should work as well )
from flowsieve.
It goes a bit further now, but errors in a different file
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/add_attr_to_file.o NETCDF_IO/add_attr_to_file.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/add_var_to_file.o NETCDF_IO/add_var_to_file.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/check_file_existence.o NETCDF_IO/check_file_existence.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/initialize_output_file.o NETCDF_IO/initialize_output_file.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/initialize_particle_file.o NETCDF_IO/initialize_particle_file.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/initialize_postprocess_file.o NETCDF_IO/initialize_postprocess_file.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/initialize_projected_particle_file.o NETCDF_IO/initialize_projected_particle_file.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/initialize_regions_file.o NETCDF_IO/initialize_regions_file.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/initialize_subset_file.o NETCDF_IO/initialize_subset_file.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/load_region_definitions.o NETCDF_IO/load_region_definitions.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/nc_err.o NETCDF_IO/nc_err.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/package_field.o NETCDF_IO/package_field.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/read_attr_from_file.o NETCDF_IO/read_attr_from_file.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/read_mask_from_file.o NETCDF_IO/read_mask_from_file.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/read_var_from_file.o NETCDF_IO/read_var_from_file.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/write_field_to_output.o NETCDF_IO/write_field_to_output.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/write_integral_to_post.o NETCDF_IO/write_integral_to_post.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/write_regions_to_post.o NETCDF_IO/write_regions_to_post.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o NETCDF_IO/write_time_average_to_post.o NETCDF_IO/write_time_average_to_post.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o Functions/Index.o Functions/Index.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o Functions/Index1to4.o Functions/Index1to4.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o Functions/KE_from_vels.o Functions/KE_from_vels.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o Functions/apply_filter_at_point.o Functions/apply_filter_at_point.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o Functions/apply_filter_at_point_for_quadratics.o Functions/apply_filter_at_point_for_quadratics.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o Functions/compute_Pi.o Functions/compute_Pi.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o Functions/compute_Pi_Helmholtz.o Functions/compute_Pi_Helmholtz.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o Functions/compute_Pi_shift_deriv.o Functions/compute_Pi_shift_deriv.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o Functions/compute_Z.o Functions/compute_Z.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o Functions/compute_areas.o Functions/compute_areas.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
mpic++ -c -DDEBUG=0 -w -std=c++14 -O3 -o Functions/compute_div_transport.o Functions/compute_div_transport.cpp -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl -fopenmp
In file included from Functions/compute_div_transport.cpp:1:
Functions/../constants.hpp:346:26: error: 'string' is not a member of 'std'
346 | const std::map< std::string, std::string > variable_descriptions = {
| ^~~~~~
In file included from Functions/compute_div_transport.cpp:1:
Functions/../constants.hpp:5:1: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
4 | #include <map>
+++ |+#include <string>
5 |
In file included from Functions/compute_div_transport.cpp:1:
Functions/../constants.hpp:346:26: error: 'string' is not a member of 'std'
346 | const std::map< std::string, std::string > variable_descriptions = {
| ^~~~~~
Functions/../constants.hpp:346:26: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
Functions/../constants.hpp:346:39: error: 'string' is not a member of 'std'
346 | const std::map< std::string, std::string > variable_descriptions = {
| ^~~~~~
Functions/../constants.hpp:346:39: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
Functions/../constants.hpp:346:39: error: 'string' is not a member of 'std'
Functions/../constants.hpp:346:39: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
Functions/../constants.hpp:346:46: error: template argument 1 is invalid
346 | const std::map< std::string, std::string > variable_descriptions = {
| ^
Functions/../constants.hpp:346:46: error: template argument 2 is invalid
Functions/../constants.hpp:346:46: error: template argument 3 is invalid
Functions/../constants.hpp:346:46: error: template argument 4 is invalid
Functions/../constants.hpp:346:48: error: scalar object 'constants::variable_descriptions' requires one element in initializer
346 | const std::map< std::string, std::string > variable_descriptions = {
| ^~~~~~~~~~~~~~~~~~~~~
Functions/../constants.hpp:367:26: error: 'string' is not a member of 'std'
367 | const std::map< std::string, std::string > variable_units = {
| ^~~~~~
Functions/../constants.hpp:367:26: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
Functions/../constants.hpp:367:26: error: 'string' is not a member of 'std'
Functions/../constants.hpp:367:26: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
Functions/../constants.hpp:367:39: error: 'string' is not a member of 'std'
367 | const std::map< std::string, std::string > variable_units = {
| ^~~~~~
Functions/../constants.hpp:367:39: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
Functions/../constants.hpp:367:39: error: 'string' is not a member of 'std'
Functions/../constants.hpp:367:39: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
Functions/../constants.hpp:367:46: error: template argument 1 is invalid
367 | const std::map< std::string, std::string > variable_units = {
| ^
Functions/../constants.hpp:367:46: error: template argument 2 is invalid
Functions/../constants.hpp:367:46: error: template argument 3 is invalid
Functions/../constants.hpp:367:46: error: template argument 4 is invalid
Functions/../constants.hpp:367:48: error: scalar object 'constants::variable_units' requires one element in initializer
367 | const std::map< std::string, std::string > variable_units = {
| ^~~~~~~~~~~~~~
Functions/../constants.hpp:389:16: error: 'string' in namespace 'std' does not name a type
389 | const std::string spatial_average_description = "The lat/lon average computed over each defined region (see region dimension).";
| ^~~~~~
Functions/../constants.hpp:389:11: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
389 | const std::string spatial_average_description = "The lat/lon average computed over each defined region (see region dimension).";
| ^~~
Functions/../constants.hpp:397:16: error: 'string' in namespace 'std' does not name a type
397 | const std::string zonal_average_description = "The zonal (longitudinal) average computed at each latitude.";
| ^~~~~~
Functions/../constants.hpp:397:11: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
397 | const std::string zonal_average_description = "The zonal (longitudinal) average computed at each latitude.";
| ^~~
Functions/../constants.hpp:405:16: error: 'string' in namespace 'std' does not name a type
405 | const std::string time_average_description = "Time average over the entire provided dataset.";
| ^~~~~~
Functions/../constants.hpp:405:11: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
405 | const std::string time_average_description = "Time average over the entire provided dataset.";
| ^~~
Functions/../constants.hpp:415:16: error: 'string' in namespace 'std' does not name a type
415 | const std::string OkuboWeiss_average_description = "Variable binned by Okubo-Weiss parameter (i.e. histogram). "
| ^~~~~~
Functions/../constants.hpp:415:11: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
415 | const std::string OkuboWeiss_average_description = "Variable binned by Okubo-Weiss parameter (i.e. histogram). "
| ^~~
make: *** [Makefile:78: Functions/compute_div_transport.o] Error 1
from flowsieve.
But yes, it manages to compile with gcc9 (with the -w
flag, of course)
from flowsieve.
Ah, yep, looks like one of the main changes going to gcc10 was including <string>
(https://gcc.gnu.org/gcc-10/porting_to.html). I'll add that include statement to constants.hpp
, and will read through to see if I can find other files that will need it. I don't have a working gcc10 set-up test on unfortunately.
I'm glad it compiled with gcc9! I'm surprised you needed the -w
flag. I compiled with -wAll -wError
to turn all warnings into errors and didn't have any pop up.
from flowsieve.
Isn't it -Wall
and -Werror
?
from flowsieve.
Yep! Sorry, typo :-) I have -Wall
on by default, but only added -Werror
while I was hunting down the GCC warnings. If you remove -w
, do you still get warnings?
from flowsieve.
An update: I tried to build using conda so I get a full environment based on gcc 9 and there are no warnings, even with -Wall
. Here is the environment.yaml
file
name: flowsieve-build-env
channels:
- conda-forge
dependencies:
- python=3.7
- numpy=1.17
- matplotlib=3.*
- netCDF4=*=mpi*
- scipy=1.*
- pip
- hdf5=*=mpi*
- openmpi
- openmpi-mpicxx
- gcc=9*
- pip:
- cmocean
- pyproj
from flowsieve.
Are there any changes / updates that you'd like to see on this front, or am I okay to close the ticket?
Thanks for all of your feedback!
from flowsieve.
Upto you.
It has not been fixed for gcc 10, so if I were you I would keep it open.
from flowsieve.
Related Issues (20)
- Statement of need in documentation HOT 3
- What variables can be coarse grained by FlowSieve? HOT 5
- Running the tutorial on the sphere HOT 36
- When does filter commute with derivatives? HOT 5
- Scalar Tutorial HOT 4
- Makefile for Jasmin HOT 14
- question about irregular longitude and latitude, and many times HOT 4
- Cannot find -lhdf5 HOT 9
- Specify minimum requirements for installation in documentation HOT 7
- Helmholtz decomposition in a high-resolution current HOT 2
- Add a copy of `constants.hpp` with the specific values in Tutorials HOT 3
- Example of usage with MPI parallelism HOT 6
- Filering on cartesian grid HOT 2
- How to make an appropriate system.mk file HOT 2
- The range to which coarse-grain is performed locally HOT 8
- ''from matpy import FiniteDiff'' failed HOT 2
- Compilation error
- Successfull compile but 'Assertion `input_nc_format == (3)' failed.' on JASMIN HPC
- Errors, compute_KE_spectra_and_slopes.cpp:(.text+0x139a): undefined reference to functions, such as `potential_vel_from_F HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flowsieve.