Modification of source code

Submitted by benjasa on Sat, 06/20/2020 - 16:47

Hi,

I've been trying to modify the source code and add new class into src dir. I added both .cpp and .h and make clean-all and make auto under src dir. I also checked that lmp_auto file is generated. But my modified file and added files were not compiled and i could not call them in my script. Did i miss something?

Thanks

mschramm | Sun, 06/21/2020 - 06:47

What type of code did you add? (fix, compute, normal model, ???)

What you did should have worked. When you run your liggghts command, does it report the correct compile date?

You can also try
make clean-all
make -jn auto | grep ${YOUR_FILE_NAME_HERE.cpp}

This should report to screen that the makefile found your new file and has compiled it.

benjasa | Sun, 06/21/2020 - 19:01

Thanks for your help. This is a fix style.

I tried what you suggested both on my modified .cpp file and one that i didn't touch, but they both return with a bad substitution and broken pipe error.

benjamin salinas

mschramm | Thu, 06/25/2020 - 12:16

Assume you want to make sure that the file "fix_print.cpp" is being compiled and you are using 4 cores to compile the program.
You would use
make -j4 auto | grep fix_print.cpp

For a fix, you do not need to do anything extra for liggghts to see it as long as it is in the src directory.