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

Disable OpenMP by default (enable it only if USEOPENMP=1) #900

Merged
merged 4 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export GPUSUFFIX

#=== Configure ccache for C++ and CUDA/HIP builds

# Enable ccache if USECCACHE=1
# Enable ccache only if USECCACHE=1
ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1)
override CXX:=ccache $(CXX)
endif
Expand Down Expand Up @@ -373,22 +373,9 @@ endif

#=== Configure defaults for OMPFLAGS

###OMPFLAGS= # FOR DEBUGGING ONLY (disable OMP)

# To build without OpenMP, you must set externally OMPFLAGS to an empty string (#758)
ifeq ($(origin OMPFLAGS),undefined)
###$(info OMPFLAGS was not set externally: will override it to a default value)
override override_OMPFLAGS=true
else ifeq ($(OMPFLAGS),)
$(info OMPFLAGS was set externally to an empty string: will build without OpenMP)
override override_OMPFLAGS=false
else
###$(info OMPFLAGS was set externally to a non-empty string: will override it to a default value)
override override_OMPFLAGS=true
endif

# Set the default OMPFLAGS choice
ifeq ($(override_OMPFLAGS),true)
# Disable OpenMP by default: enable OpenMP only if USEOPENMP=1 (#758)
ifeq ($(USEOPENMP),1)
###$(info USEOPENMP==1: will build with OpenMP if possible)
ifneq ($(findstring hipcc,$(GPUCC)),)
override OMPFLAGS = # disable OpenMP MT when using hipcc #802
else ifneq ($(shell $(CXX) --version | egrep '^Intel'),)
Expand All @@ -405,6 +392,9 @@ ifeq ($(override_OMPFLAGS),true)
override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms
###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575)
endif
else
###$(info USEOPENMP!=1: will build without OpenMP)
override OMPFLAGS =
endif

#-------------------------------------------------------------------------------
Expand Down
24 changes: 7 additions & 17 deletions epochX/cudacpp/ee_mumu.mad/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export GPUSUFFIX

#=== Configure ccache for C++ and CUDA/HIP builds

# Enable ccache if USECCACHE=1
# Enable ccache only if USECCACHE=1
ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1)
override CXX:=ccache $(CXX)
endif
Expand Down Expand Up @@ -373,22 +373,9 @@ endif

#=== Configure defaults for OMPFLAGS

###OMPFLAGS= # FOR DEBUGGING ONLY (disable OMP)

# To build without OpenMP, you must set externally OMPFLAGS to an empty string (#758)
ifeq ($(origin OMPFLAGS),undefined)
###$(info OMPFLAGS was not set externally: will override it to a default value)
override override_OMPFLAGS=true
else ifeq ($(OMPFLAGS),)
$(info OMPFLAGS was set externally to an empty string: will build without OpenMP)
override override_OMPFLAGS=false
else
###$(info OMPFLAGS was set externally to a non-empty string: will override it to a default value)
override override_OMPFLAGS=true
endif

# Set the default OMPFLAGS choice
ifeq ($(override_OMPFLAGS),true)
# Disable OpenMP by default: enable OpenMP only if USEOPENMP=1 (#758)
ifeq ($(USEOPENMP),1)
###$(info USEOPENMP==1: will build with OpenMP if possible)
ifneq ($(findstring hipcc,$(GPUCC)),)
override OMPFLAGS = # disable OpenMP MT when using hipcc #802
else ifneq ($(shell $(CXX) --version | egrep '^Intel'),)
Expand All @@ -405,6 +392,9 @@ ifeq ($(override_OMPFLAGS),true)
override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms
###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575)
endif
else
###$(info USEOPENMP!=1: will build without OpenMP)
override OMPFLAGS =
endif

#-------------------------------------------------------------------------------
Expand Down
24 changes: 7 additions & 17 deletions epochX/cudacpp/ee_mumu.sa/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export GPUSUFFIX

#=== Configure ccache for C++ and CUDA/HIP builds

# Enable ccache if USECCACHE=1
# Enable ccache only if USECCACHE=1
ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1)
override CXX:=ccache $(CXX)
endif
Expand Down Expand Up @@ -373,22 +373,9 @@ endif

#=== Configure defaults for OMPFLAGS

###OMPFLAGS= # FOR DEBUGGING ONLY (disable OMP)

# To build without OpenMP, you must set externally OMPFLAGS to an empty string (#758)
ifeq ($(origin OMPFLAGS),undefined)
###$(info OMPFLAGS was not set externally: will override it to a default value)
override override_OMPFLAGS=true
else ifeq ($(OMPFLAGS),)
$(info OMPFLAGS was set externally to an empty string: will build without OpenMP)
override override_OMPFLAGS=false
else
###$(info OMPFLAGS was set externally to a non-empty string: will override it to a default value)
override override_OMPFLAGS=true
endif

# Set the default OMPFLAGS choice
ifeq ($(override_OMPFLAGS),true)
# Disable OpenMP by default: enable OpenMP only if USEOPENMP=1 (#758)
ifeq ($(USEOPENMP),1)
###$(info USEOPENMP==1: will build with OpenMP if possible)
ifneq ($(findstring hipcc,$(GPUCC)),)
override OMPFLAGS = # disable OpenMP MT when using hipcc #802
else ifneq ($(shell $(CXX) --version | egrep '^Intel'),)
Expand All @@ -405,6 +392,9 @@ ifeq ($(override_OMPFLAGS),true)
override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms
###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575)
endif
else
###$(info USEOPENMP!=1: will build without OpenMP)
override OMPFLAGS =
endif

#-------------------------------------------------------------------------------
Expand Down
24 changes: 7 additions & 17 deletions epochX/cudacpp/gg_tt.mad/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export GPUSUFFIX

#=== Configure ccache for C++ and CUDA/HIP builds

# Enable ccache if USECCACHE=1
# Enable ccache only if USECCACHE=1
ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1)
override CXX:=ccache $(CXX)
endif
Expand Down Expand Up @@ -373,22 +373,9 @@ endif

#=== Configure defaults for OMPFLAGS

###OMPFLAGS= # FOR DEBUGGING ONLY (disable OMP)

# To build without OpenMP, you must set externally OMPFLAGS to an empty string (#758)
ifeq ($(origin OMPFLAGS),undefined)
###$(info OMPFLAGS was not set externally: will override it to a default value)
override override_OMPFLAGS=true
else ifeq ($(OMPFLAGS),)
$(info OMPFLAGS was set externally to an empty string: will build without OpenMP)
override override_OMPFLAGS=false
else
###$(info OMPFLAGS was set externally to a non-empty string: will override it to a default value)
override override_OMPFLAGS=true
endif

# Set the default OMPFLAGS choice
ifeq ($(override_OMPFLAGS),true)
# Disable OpenMP by default: enable OpenMP only if USEOPENMP=1 (#758)
ifeq ($(USEOPENMP),1)
###$(info USEOPENMP==1: will build with OpenMP if possible)
ifneq ($(findstring hipcc,$(GPUCC)),)
override OMPFLAGS = # disable OpenMP MT when using hipcc #802
else ifneq ($(shell $(CXX) --version | egrep '^Intel'),)
Expand All @@ -405,6 +392,9 @@ ifeq ($(override_OMPFLAGS),true)
override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms
###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575)
endif
else
###$(info USEOPENMP!=1: will build without OpenMP)
override OMPFLAGS =
endif

#-------------------------------------------------------------------------------
Expand Down
24 changes: 7 additions & 17 deletions epochX/cudacpp/gg_tt.sa/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export GPUSUFFIX

#=== Configure ccache for C++ and CUDA/HIP builds

# Enable ccache if USECCACHE=1
# Enable ccache only if USECCACHE=1
ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1)
override CXX:=ccache $(CXX)
endif
Expand Down Expand Up @@ -373,22 +373,9 @@ endif

#=== Configure defaults for OMPFLAGS

###OMPFLAGS= # FOR DEBUGGING ONLY (disable OMP)

# To build without OpenMP, you must set externally OMPFLAGS to an empty string (#758)
ifeq ($(origin OMPFLAGS),undefined)
###$(info OMPFLAGS was not set externally: will override it to a default value)
override override_OMPFLAGS=true
else ifeq ($(OMPFLAGS),)
$(info OMPFLAGS was set externally to an empty string: will build without OpenMP)
override override_OMPFLAGS=false
else
###$(info OMPFLAGS was set externally to a non-empty string: will override it to a default value)
override override_OMPFLAGS=true
endif

# Set the default OMPFLAGS choice
ifeq ($(override_OMPFLAGS),true)
# Disable OpenMP by default: enable OpenMP only if USEOPENMP=1 (#758)
ifeq ($(USEOPENMP),1)
###$(info USEOPENMP==1: will build with OpenMP if possible)
ifneq ($(findstring hipcc,$(GPUCC)),)
override OMPFLAGS = # disable OpenMP MT when using hipcc #802
else ifneq ($(shell $(CXX) --version | egrep '^Intel'),)
Expand All @@ -405,6 +392,9 @@ ifeq ($(override_OMPFLAGS),true)
override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms
###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575)
endif
else
###$(info USEOPENMP!=1: will build without OpenMP)
override OMPFLAGS =
endif

#-------------------------------------------------------------------------------
Expand Down
24 changes: 7 additions & 17 deletions epochX/cudacpp/gg_tt01g.mad/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export GPUSUFFIX

#=== Configure ccache for C++ and CUDA/HIP builds

# Enable ccache if USECCACHE=1
# Enable ccache only if USECCACHE=1
ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1)
override CXX:=ccache $(CXX)
endif
Expand Down Expand Up @@ -373,22 +373,9 @@ endif

#=== Configure defaults for OMPFLAGS

###OMPFLAGS= # FOR DEBUGGING ONLY (disable OMP)

# To build without OpenMP, you must set externally OMPFLAGS to an empty string (#758)
ifeq ($(origin OMPFLAGS),undefined)
###$(info OMPFLAGS was not set externally: will override it to a default value)
override override_OMPFLAGS=true
else ifeq ($(OMPFLAGS),)
$(info OMPFLAGS was set externally to an empty string: will build without OpenMP)
override override_OMPFLAGS=false
else
###$(info OMPFLAGS was set externally to a non-empty string: will override it to a default value)
override override_OMPFLAGS=true
endif

# Set the default OMPFLAGS choice
ifeq ($(override_OMPFLAGS),true)
# Disable OpenMP by default: enable OpenMP only if USEOPENMP=1 (#758)
ifeq ($(USEOPENMP),1)
###$(info USEOPENMP==1: will build with OpenMP if possible)
ifneq ($(findstring hipcc,$(GPUCC)),)
override OMPFLAGS = # disable OpenMP MT when using hipcc #802
else ifneq ($(shell $(CXX) --version | egrep '^Intel'),)
Expand All @@ -405,6 +392,9 @@ ifeq ($(override_OMPFLAGS),true)
override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms
###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575)
endif
else
###$(info USEOPENMP!=1: will build without OpenMP)
override OMPFLAGS =
endif

#-------------------------------------------------------------------------------
Expand Down
24 changes: 7 additions & 17 deletions epochX/cudacpp/gg_ttg.mad/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export GPUSUFFIX

#=== Configure ccache for C++ and CUDA/HIP builds

# Enable ccache if USECCACHE=1
# Enable ccache only if USECCACHE=1
ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1)
override CXX:=ccache $(CXX)
endif
Expand Down Expand Up @@ -373,22 +373,9 @@ endif

#=== Configure defaults for OMPFLAGS

###OMPFLAGS= # FOR DEBUGGING ONLY (disable OMP)

# To build without OpenMP, you must set externally OMPFLAGS to an empty string (#758)
ifeq ($(origin OMPFLAGS),undefined)
###$(info OMPFLAGS was not set externally: will override it to a default value)
override override_OMPFLAGS=true
else ifeq ($(OMPFLAGS),)
$(info OMPFLAGS was set externally to an empty string: will build without OpenMP)
override override_OMPFLAGS=false
else
###$(info OMPFLAGS was set externally to a non-empty string: will override it to a default value)
override override_OMPFLAGS=true
endif

# Set the default OMPFLAGS choice
ifeq ($(override_OMPFLAGS),true)
# Disable OpenMP by default: enable OpenMP only if USEOPENMP=1 (#758)
ifeq ($(USEOPENMP),1)
###$(info USEOPENMP==1: will build with OpenMP if possible)
ifneq ($(findstring hipcc,$(GPUCC)),)
override OMPFLAGS = # disable OpenMP MT when using hipcc #802
else ifneq ($(shell $(CXX) --version | egrep '^Intel'),)
Expand All @@ -405,6 +392,9 @@ ifeq ($(override_OMPFLAGS),true)
override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms
###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575)
endif
else
###$(info USEOPENMP!=1: will build without OpenMP)
override OMPFLAGS =
endif

#-------------------------------------------------------------------------------
Expand Down
24 changes: 7 additions & 17 deletions epochX/cudacpp/gg_ttg.sa/SubProcesses/cudacpp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export GPUSUFFIX

#=== Configure ccache for C++ and CUDA/HIP builds

# Enable ccache if USECCACHE=1
# Enable ccache only if USECCACHE=1
ifeq ($(USECCACHE)$(shell echo $(CXX) | grep ccache),1)
override CXX:=ccache $(CXX)
endif
Expand Down Expand Up @@ -373,22 +373,9 @@ endif

#=== Configure defaults for OMPFLAGS

###OMPFLAGS= # FOR DEBUGGING ONLY (disable OMP)

# To build without OpenMP, you must set externally OMPFLAGS to an empty string (#758)
ifeq ($(origin OMPFLAGS),undefined)
###$(info OMPFLAGS was not set externally: will override it to a default value)
override override_OMPFLAGS=true
else ifeq ($(OMPFLAGS),)
$(info OMPFLAGS was set externally to an empty string: will build without OpenMP)
override override_OMPFLAGS=false
else
###$(info OMPFLAGS was set externally to a non-empty string: will override it to a default value)
override override_OMPFLAGS=true
endif

# Set the default OMPFLAGS choice
ifeq ($(override_OMPFLAGS),true)
# Disable OpenMP by default: enable OpenMP only if USEOPENMP=1 (#758)
ifeq ($(USEOPENMP),1)
###$(info USEOPENMP==1: will build with OpenMP if possible)
ifneq ($(findstring hipcc,$(GPUCC)),)
override OMPFLAGS = # disable OpenMP MT when using hipcc #802
else ifneq ($(shell $(CXX) --version | egrep '^Intel'),)
Expand All @@ -405,6 +392,9 @@ ifeq ($(override_OMPFLAGS),true)
override OMPFLAGS = -fopenmp # enable OpenMP MT by default on all other platforms
###override OMPFLAGS = # disable OpenMP MT on all other platforms (default before #575)
endif
else
###$(info USEOPENMP!=1: will build without OpenMP)
override OMPFLAGS =
endif

#-------------------------------------------------------------------------------
Expand Down
Loading
Loading