clawpack / clawutil

General utility programs
BSD 3-Clause "New" or "Revised" License
10 stars 31 forks source link

Change to OpenMP flag in Intel compilers #118

Open mandli opened 7 years ago

mandli commented 7 years ago

It looks like Intel has decided to deprecate the previous OpenMP compiler flag -openmp in favor of -qopenmp. We should either allow the user to set the OpenMP flag via an environment variable and/or check the version of ifort and use the correct one.

rjleveque commented 7 years ago

Isn't that something the user always specifies in FFLAGS anyway?

mandli commented 7 years ago

They can but we do provide a OMP_FLAG if they don't want to have to worry about switching out the OpenMP flag. I don't think used explicitly anywhere but we should either remove it or correct it. I almost always set FFLAGS myself in the environment so I don't change the Makefiles but then use the OMP_FLAG if I want threading enabled.

mjberger commented 7 years ago

I’ve never heard of the OMP_FLAG. Maybe we shouldn’t have this, and leave it to the user? Just complicates things?

— Marsha

On Mar 19, 2017, at 2:01 PM, Kyle Mandli notifications@github.com wrote:

They can but we do provide a OMP_FLAG if they don't want to have to worry about switching out the OpenMP flag. I don't think used explicitly anywhere but we should either remove it or correct it. I almost always set FFLAGS myself in the environment so I don't change the Makefiles but then use the OMP_FLAG if I want threading enabled.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

mandli commented 7 years ago

The only thing that makes me pause a bit is that we had briefly talked about having an option to build in debug or optimized mode automatically with some preferred flags. If we do this we would have to effectively have this. Otherwise I am fine taking this out.

rjleveque commented 7 years ago

We have the page http://www.clawpack.org/fortran_compilers.html with lists of recommended flags. I guess I'm in favor of just updating this if necessary and leaving it to the user rather than having too many sets of flags that might or might not over-ride one another, which seems confusing.

mjberger commented 7 years ago

It’s a good page. But I don’t see an OMP_FLAG option there, which is what I was asking why we have?

— Marsha

On Mar 19, 2017, at 3:34 PM, Randall J. LeVeque notifications@github.com wrote:

We have the page http://www.clawpack.org/fortran_compilers.html with lists of recommended flags. I guess I'm in favor of just updating this if necessary and leaving it to the user rather than having too many sets of flags that might or might not over-ride one another, which seems confusing.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

mandli commented 7 years ago

Do we want a debug/optimized option in the Makefiles or do we want to rely on users finding the docs? I am ok with either or. I think I originally added OMP_FLAG so that we could have some automated features like the makefile debug/optimized options which is fairly common in open source libraries. Given that having threads is independent from compiling as debug/optimized (of course usually this would not be an issue) I think I though to provide a second option to override the default threading option.

In any case I am fine removing this and relying on the docs or spending a small bit of effort and having a canned debug/optimized option.