Re: [AMBER] Setting compiler flags w/cmake build? Amber20/AmberTools21

From: Ryan Novosielski <novosirj.rutgers.edu>
Date: Sun, 19 Sep 2021 19:39:10 +0000

> On Sep 19, 2021, at 8:18 AM, David A Case <dacase1.gmail.com> wrote:
>
> On Sat, Sep 18, 2021, Ryan Novosielski wrote:
>>
>> Trying to build with the Intel compilers and wanted to use auto vectorization, so I set:
>>
>> -DCMAKE_C_FLAGS="-O3 -xAVX -axCORE-AVX2" -DCMAKE_CXX_FLAGS="-O3 -xAVX -axCORE-AVX2" \
>> -DCMAKE_FORTRAN_FLAGS="-O3 -xAVX -axCORE-AVX2" -DCMAKE_EXE_LINKER_FLAGS="-O3 -xAVX -axCORE-AVX2" \
>>
>
> I think you want to set OPT_CFLAGS, OPT_FFLAGS (and, if needed NO_OPT_CFLAGS
> and NO_OPT_FFLAGS). Look in the amber20_src/cmake/CompilerFlags.cmake file
> for more information.

Thanks, David. What’s not clear to me is where to set those? From reading that file, it looks like I could still set SSE_TYPES and the section of that file around the Intel compiler would make use of it. Same goes for the variables you suggest them, but I’m not clear if I should set those like: OPT_CFLAGS="-O3 -xAVX -axCORE-AVX2” ./run_cmake, or if I set those with -D inside the run_cmake script, or what.

Thanks again!

--
#BlackLivesMatter
____
|| \\UTGERS, |---------------------------*O*---------------------------
||_// the State | Ryan Novosielski - novosirj.rutgers.edu
|| \\ University | Sr. Technologist - 973/972.0922 (2x0922) ~*~ RBHS Campus
|| \\ of NJ | Office of Advanced Research Computing - MSB C630, Newark
     `'


_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Sun Sep 19 2021 - 13:00:02 PDT
Custom Search