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

Python module in local repository not built during make after editing C++ source files #2565

Closed
oskooi opened this issue Jun 26, 2023 · 1 comment
Labels

Comments

@oskooi
Copy link
Collaborator

oskooi commented Jun 26, 2023

The Meep Python module in my local git repository at ${GIT_REPO}/python/meep.py (where ${GIT_REPO} is something like ${HOME}/install/meep) which depends on the compiled library _meep_la-meep-python.o also in that folder is not built when I run make within ${GIT_REPO} after editing the C++ source files (i.e., src/step_db.cpp). Since my ${PYTHONPATH} environment variable contains the directory ${GIT_REPO}/python, this means that the Python module in ${GIT_REPO}/python/ does not contain my local changes.

To get around this, I have to manually force the build of the files in ${GIT_REPO}/python by doing something like touch ${GIT_REPO}/src/meep.hpp before running make. This should not be necessary.

@oskooi oskooi added the bug label Jun 26, 2023
@oskooi
Copy link
Collaborator Author

oskooi commented Jun 27, 2023

There was no bug after all in the Automake scripts. Rather there was a bug in the way, as part of development work on #2538, I was adding print statements to inspect local variables in the special update equations for r=0 of step_db.cpp.

I was using master_printf within step_db.cpp and not seeing any debugging output. This seemed to suggest a problem in the way the Python module was being built. The actual reason for the lack of output was because the chunk containing the r=0 boundary was not the master process. Replacing master_printf with printf or simply running without parallelization fixed the issue.

@oskooi oskooi closed this as completed Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant