Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

work on update secular multiple #557

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
39 changes: 27 additions & 12 deletions src/amuse/community/secularmultiple/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,46 @@ MPICC ?= mpicc
CC = $(MPICC)
CXX = $(MPICXX)


CXXFLAGS += -g -DTOOLBOX -O3 $(MUSE_INCLUDE_DIR)
LDFLAGS+ = -lm $(MUSE_LD_FLAGS)

OBJS = interface.o src/types.o src/evolve.o src/structure.o src/ODE_system.o src/root_finding.o src/newtonian.o src/postnewtonian.o src/tides.o src/external.o src/cvode/cvode.o src/cvode/cvode_dense.o src/cvode/cvode_direct.o src/cvode/cvode_io.o src/cvode/nvector_serial.o src/cvode/sundials_dense.o src/cvode/sundials_direct.o src/cvode/sundials_math.o src/cvode/sundials_nvector.o
SRCDIR=src

all: worker_code
OBJS = $(SRCDIR)/interface.o $(SRCDIR)/src/types.o $(SRCDIR)/src/evolve.o \
$(SRCDIR)/src/structure.o $(SRCDIR)/src/ODE_system.o \
$(SRCDIR)/src/root_finding.o $(SRCDIR)/src/newtonian.o \
$(SRCDIR)/src/postnewtonian.o $(SRCDIR)/src/tides.o \
$(SRCDIR)/src/external.o $(SRCDIR)/src/VRR.o $(SRCDIR)/src/cvode/cvode.o \
$(SRCDIR)/src/cvode/cvode_dense.o $(SRCDIR)/src/cvode/cvode_direct.o \
$(SRCDIR)/src/cvode/cvode_io.o $(SRCDIR)/src/cvode/nvector_serial.o \
$(SRCDIR)/src/cvode/sundials_dense.o $(SRCDIR)/src/cvode/sundials_direct.o \
$(SRCDIR)/src/cvode/sundials_math.o $(SRCDIR)/src/cvode/sundials_nvector.o

cleanall: clean
$(RM) worker_code *
all: secularmultiple_worker

clean:
rm -f *.so *.o *.pyc worker_code.cc src/*.o*
rm -f *.so *.o *.pyc worker_code.cc $(SRCDIR)/*.o* $(SRCDIR)/src/*.o*

distclean:
rm -f *.so *.o *.pyc worker_code.cc src/*.o* src/cvode/*.o*

worker_code.cc: interface.py
distclean: clean
rm -rf src
worker_code.cc: worker_code.h interface.py
$(CODE_GENERATOR) --type=c interface.py SecularMultipleInterface -o $@

worker_code: worker_code.cc $(OBJS)
$(MPICXX) $(CXXFLAGS) $@.cc $(OBJS) -o $@
worker_code.h: interface.py
$(CODE_GENERATOR) --type=h interface.py SecularMultipleInterface -o $@

secularmultiple_worker: worker_code.cc $(OBJS)
$(MPICXX) $(CXXFLAGS) worker_code.cc $(OBJS) -o $@

.cc.o: $<
$(CXX) $(CXXFLAGS) -c -o $@ $<

.c.o: $<
$(CC) $(CXXFLAGS) -c -o $@ $<

src/interface.cpp:
make -C . download

download:
git clone -b master https://github.com/hamers/secularmultiple.git src
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should download a specific version rather than just the latest (even though it's no longer updated here).