Skip to content

Commit

Permalink
Remove notes
Browse files Browse the repository at this point in the history
  • Loading branch information
charnley committed Aug 14, 2024
1 parent f5c204b commit 1bbf51f
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions _compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,20 @@ def find_mkl():
def find_env() -> dict[str, str]:
"""Find compiler flags"""

# TODO Find ifort flags, choose from FCC
# TODO Find math lib
# TODO Find os

# ifort -qopenmp

# -lgomp", "-lpthread", "-lm", "-ldl
# ["-L${MKLROOT}/lib/intel64", "-lmkl_rt"]

COMPILER_FLAGS = [
"-O3",
"-fopenmp",
"-m64",
"-march=native",
"-fPIC",
# "-Wno-maybe-uninitialized",
# "-Wno-unused-function",
# "-Wno-cpp",
"-Wno-maybe-uninitialized",
"-Wno-unused-function",
"-Wno-cpp",
]
# LINKER_FLAGS = ["-lgomp"]

extra_flags = ["-lgomp", "-lpthread", "-lm", "-ldl"]
math_flags = ["-L/usr/lib/", "-lblas", "-llapack"]
Expand All @@ -67,11 +62,6 @@ def find_env() -> dict[str, str]:
ldflags = [] + extra_flags + math_flags
fcc = "gfortran"

# return [f"--f90flags='{' '.join(COMPILER_FLAGS)}'", "-lgomp"]
# return ["-fopenmp"]

# return flags

env = {"FFLAGS": " ".join(fflags), "LDFLAGS": " ".join(ldflags), "FCC": fcc}

return env
Expand All @@ -82,8 +72,7 @@ def main():

print(f"Using numpy {np.__version__}")

# Find and set Fortran compiler, compiler flags and linker
# flags
# Find and set Fortran compiler, compiler flags and linker flags
env = find_env()
for key, value in env.items():
print(f"export {key}='{value}'")
Expand Down

0 comments on commit 1bbf51f

Please sign in to comment.