From 97d0e9b680fbbcb183f3bd80e853452c01308ba3 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Tue, 11 Jun 2024 17:17:05 -0400 Subject: [PATCH] Ensure attributor is not run --- examples/sensitivity_PIG.jl | 4 ---- src/DJUICE.jl | 6 ++++++ src/core/control.jl | 2 -- test/testad.jl | 2 -- test/testad2.jl | 3 --- test/testoptimization.jl | 1 - 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/examples/sensitivity_PIG.jl b/examples/sensitivity_PIG.jl index f420144..21b1d75 100755 --- a/examples/sensitivity_PIG.jl +++ b/examples/sensitivity_PIG.jl @@ -1,7 +1,3 @@ -using Enzyme -Enzyme.API.typeWarning!(false) -Enzyme.Compiler.RunAttributor[] = false - using DJUICE using MAT diff --git a/src/DJUICE.jl b/src/DJUICE.jl index bfd82a6..f537d3c 100644 --- a/src/DJUICE.jl +++ b/src/DJUICE.jl @@ -7,6 +7,12 @@ module DJUICE const userdir = "./usr" const coredir = "./core" +using Enzyme + +function __init__() + Enzyme.Compiler.RunAttributor[] = false +end + include("$userdir/classes.jl") export model, WeertmanFriction, SchoofFriction, DNNFriction include("$userdir/exp.jl") diff --git a/src/core/control.jl b/src/core/control.jl index 4a6a4fc..8ee0475 100644 --- a/src/core/control.jl +++ b/src/core/control.jl @@ -1,6 +1,4 @@ using Enzyme -Enzyme.API.typeWarning!(false) -Enzyme.Compiler.RunAttributor[] = false #using Optimization, OptimizationOptimJL diff --git a/test/testad.jl b/test/testad.jl index f8df835..4177ced 100755 --- a/test/testad.jl +++ b/test/testad.jl @@ -1,6 +1,4 @@ using Enzyme -Enzyme.API.typeWarning!(false) -Enzyme.Compiler.RunAttributor[] = false using DJUICE using MAT diff --git a/test/testad2.jl b/test/testad2.jl index 4948167..a91fa97 100755 --- a/test/testad2.jl +++ b/test/testad2.jl @@ -1,8 +1,5 @@ using Enzyme -Enzyme.API.typeWarning!(false) -Enzyme.Compiler.RunAttributor[] = false - using DJUICE using MAT using Test diff --git a/test/testoptimization.jl b/test/testoptimization.jl index fa75c81..38004e8 100755 --- a/test/testoptimization.jl +++ b/test/testoptimization.jl @@ -5,7 +5,6 @@ using MAT using Test using Enzyme -Enzyme.Compiler.RunAttributor[] = false using Optimization, OptimizationOptimJL #Load model from MATLAB file