Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
126c2a2
docs
ajnonaka May 22, 2024
2afad78
Merge pull request #2 from ajnonaka/documentation
ajnonaka May 22, 2024
bfe6903
docs update
ajnonaka May 22, 2024
84f19dc
docs update
ajnonaka May 22, 2024
d71eb79
docs update
ajnonaka May 22, 2024
7fe43b2
use forward euler to simple build works
ajnonaka May 22, 2024
d80cf56
Update README.md
ajnonaka May 22, 2024
09256d6
Update README.md
ajnonaka May 22, 2024
fe8ecfd
Update README.md
ajnonaka May 22, 2024
3f8dab6
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka May 23, 2024
1df8bdb
whitespace
ajnonaka May 23, 2024
4900bce
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka May 28, 2024
06ba6a5
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka May 30, 2024
d4b3fe6
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka May 30, 2024
15a993c
enable DMI and anis in scaling test
ajnonaka May 31, 2024
ffeaeab
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka May 31, 2024
badfefa
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Jun 11, 2024
ebf537e
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Jun 11, 2024
273173a
Merge branch 'development' of github.com:ajnonaka/MagneX into develop…
ajnonaka Jun 11, 2024
535bee5
skyrmion diagnostic post processing utility
ajnonaka Jun 13, 2024
b5a074d
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Jun 13, 2024
a32bd31
renname file
ajnonaka Jun 13, 2024
86d979c
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Jun 13, 2024
298bb52
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Jun 14, 2024
c5f3349
restart bugfix
ajnonaka Jun 14, 2024
42e65fc
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Jun 14, 2024
25e79c5
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Jun 24, 2024
23f20f6
sundials 7.1.1
ajnonaka Jul 16, 2024
437c39b
inputs file for paper demag plot
ajnonaka Aug 2, 2024
aacc97f
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Aug 9, 2024
2fe1a87
license and copyright
ajnonaka Aug 19, 2024
d933db5
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Aug 20, 2024
527db62
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Aug 22, 2024
be021e7
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Sep 6, 2024
d5f1312
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Sep 19, 2024
1f8ff0f
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Sep 25, 2024
24a4e09
patches to get regression tests running again
ajnonaka Sep 30, 2024
d985e79
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Sep 30, 2024
b4c567a
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Sep 30, 2024
afe92a2
fix sundials settings
ajnonaka Oct 2, 2024
487ff09
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Oct 2, 2024
b4df9c5
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Oct 2, 2024
415b5f9
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Oct 3, 2024
66e3cfc
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Nov 1, 2024
52cf85c
cleanup per Weiqun
ajnonaka Nov 1, 2024
588e642
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Nov 1, 2024
e1356bb
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Nov 4, 2024
66d9ee4
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Nov 12, 2024
97d152a
logic for different physics wasn't right for single-rate case
ajnonaka Mar 11, 2025
7ec1149
add SUNDIALS_HOME
ajnonaka Jul 29, 2025
b95ceba
sundials update
ajnonaka Jul 30, 2025
af00243
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Aug 27, 2025
a689f78
comments in inputs file
ajnonaka Jan 2, 2026
e2cba04
initial commit
tyh0123 Jan 6, 2026
f8ac622
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Feb 12, 2026
3b6fb44
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Feb 13, 2026
1bc1b0c
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Feb 16, 2026
2c773d5
updated ML part of the MagneX by adding: 1. USE_ML flag for during co…
tyh0123 Feb 24, 2026
e1cbb3f
Merge branch 'development' into MagneX_hybrid_ML
ajnonaka Feb 24, 2026
f65c0fc
clean up makefile
ajnonaka Feb 24, 2026
7519d1f
fix trailing whitespace
ajnonaka Feb 24, 2026
417749a
no longer need fftw includes, these are contained in USE_FFT=TRUE
ajnonaka Feb 24, 2026
9832eb8
Merge branch 'development' into MagneX_hybrid_ML
ajnonaka Feb 24, 2026
3a87d3d
non ml compile
ajnonaka Feb 24, 2026
3109b6d
Merge branch 'development' of github.com:AMReX-Microelectronics/Magne…
ajnonaka Feb 24, 2026
7836fba
put in ml_demag protections when not implemented
ajnonaka Feb 24, 2026
c3c9969
minor
ajnonaka Feb 24, 2026
7a9594f
fixed MagneX.H header for compiling issue
tyh0123 Feb 24, 2026
661895b
cleanup include statements
ajnonaka Feb 24, 2026
07c8343
pytorch install instructions
ajnonaka Feb 24, 2026
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
43 changes: 42 additions & 1 deletion Exec/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,51 @@ USE_HIP = FALSE
COMP = gnu
DIM = 3
USE_FFT = TRUE

USE_ML = FALSE
TINY_PROFILE = FALSE
PROFILE = FALSE
USE_SUNDIALS = FALSE
SUNDIALS_HOME ?= ../../sundials/instdir

ifeq ($(USE_ML),TRUE)

CPPFLAGS += -DAMREX_USE_ML

# Define a macro for the C++ preprocessor
DEFINES += -DML_ENABLE -D_GLIBCXX_USE_CXX11_ABI=1

# Pytorch root directory selection
ifeq ($(USE_CUDA),TRUE)
PYTORCH_ROOT := ../../libtorch_cuda
else
PYTORCH_ROOT := ../../libtorch_cpu
endif

TORCH_LIBPATH = $(PYTORCH_ROOT)/lib

# Library definitions
ifeq ($(USE_CUDA),TRUE)
# Note: Modern LibTorch often requires both torch_cuda and torch_cpu
TORCH_LIBS = -ltorch -ltorch_cuda -ltorch_cpu -lc10 -lc10_cuda -lcuda
else
TORCH_LIBS = -ltorch -ltorch_cpu -lc10
endif

# Header search paths
INCLUDE_LOCATIONS += $(PYTORCH_ROOT)/include \
$(PYTORCH_ROOT)/include/torch/csrc/api/include

# Library search paths
LIBRARY_LOCATIONS += $(TORCH_LIBPATH)

# Linker flags (rpath ensures the .so files are found at runtime)
ifeq ($(USE_CUDA),TRUE)
LDFLAGS += -Xlinker "--no-as-needed,-rpath,$(TORCH_LIBPATH)" $(TORCH_LIBS)
else
LDFLAGS += -Wl,--no-as-needed,-rpath=$(TORCH_LIBPATH) $(TORCH_LIBS)
endif
endif

include $(AMREX_HOME)/Tools/GNUMake/Make.defs

include ../Source/Make.package
Expand Down
72 changes: 0 additions & 72 deletions Exec/README

This file was deleted.

36 changes: 36 additions & 0 deletions Exec/README_md.pytorch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# PyTorch (libtorch) Download and Setup

This guide downloads the libtorch CUDA 11.8 C++ distribution and unzips it in the same directory that contains `MagneX`, then renames the extracted folder to `libtorch_cuda`.

## Steps

1. Change to the parent directory of `MagneX`:

```bash
cd <MAGNEX_PARENT_DIR>
```

2. Download the libtorch archive with `wget`:

```bash
wget https://download.pytorch.org/libtorch/cu118/libtorch-cxx11-abi-shared-with-deps-2.7.1%2Bcu118.zip
```

3. Unzip the archive in the same directory:

```bash
unzip libtorch-cxx11-abi-shared-with-deps-2.7.1+cu118.zip
```

4. Rename the extracted folder to `libtorch_cuda`:

```bash
mv libtorch libtorch_cuda
```

## Result

After the steps above, you should have:

- `<MAGNEX_PARENT_DIR>/MagneX`
- `<MAGNEX_PARENT_DIR>/pytorch_cuda`
6 changes: 6 additions & 0 deletions Exec/README_md.sundials
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SUNDIALS Setup

Refer to https://amrex-codes.github.io/amrex/docs_html/TimeIntegration_Chapter.html
for SUNDIALS installation, build, and usage instructions.

Make sure that `SUNDIALS_HOME` in the `GNUmakefile` points to the installation directory.
4 changes: 0 additions & 4 deletions Exec/README_sundials

This file was deleted.

Loading
Loading