Hello all,
I am using LAMMPS in windows. I have modified a pairstyle for my system and saved new files (both c++ and header files). For including the change in the executable file, it is mentioned in manual to rebuild the lammps. How to do in windows? Kindly help to figure this out.
Thank you so much Ray.
I am using MinGw for building lammps in windows now. But when I am giving make serial, the compilation goes on and when it reaches compute_centro atom the compilation stops with an error " there are no arguments to posix
-memalign that depend on a template parameter so a declaration of 'posix-memalign should be available [-fpermissive]"
Can anyone explain why this happening and how to fix this?
Thank you all in advance.
Thank you so much Ray.
I am using MinGw for building lammps in windows now. But when I am giving
make serial, the compilation goes on and when it reaches compute_centro
atom the compilation stops with an error " there are no arguments to posix
-memalign that depend on a template parameter so a declaration of
'posix-memalign should be available [-fpermissive]"
Can anyone explain why this happening and how to fix this?
the window programming environment does not natively provide the function
posix_memalign(), thus please edit src/MAKE/Makefile.serial and remove
"-DLAMMPS_MEMALIGN=64" from the line defining the "LMP_INC" variable. then
do "make clean-all; make serial". this should use malloc(), which is
supported.
axel.
Thank you so much Axel.
That problem has been solved. But I am facing one more issue saying "undefined reference to ‘GetProcessMemoryInfo@…981…’ and collect2.exe :error: ld returned 1 exit status.
Kindly clarify this too.
Thanks in advance
Thank you so much Axel.
That problem has been solved. But I am facing one more issue saying
"undefined reference to '[email protected]...' and collect2.exe
:error: ld returned 1 exit status.
Kindly clarify this too.
when compiling on windows, you need to add a couple of nonstandard
libraries.
please change the LIB variable in Makefile.serial to contain: -lwsock32
-lpsapi
axel.
Thank you Axel. I got the lmp_serial executable file now. But when I am trying to use that executable file, I am getting an error “libgcc_s_dw 2_1.dll is missing in your computer”. Do I need to install this separately for my windows system?
Thank you Axel. I got the lmp_serial executable file now. But when I am
trying to use that executable file, I am getting an error "libgcc_s_dw
2_1.dll is missing in your computer". Do I need to install this separately
for my windows system?
yes, that is one option, but that is a bit messy is only beneficial if you
would be compiling many different programs. please try the following
instead:
delete the executable, then add one more flag -static-libgcc to the LIB
variable in Makefile.serial and do "make serial" again. that should create
a new executable, which has the .dll file embedded rather than looking for
it as an external .dll file.
axel.
Again I am getting an error saying “libstdc+±6.dll” is missing. Sorry for the trouble. In total how many libraries we need to install?
Again I am getting an error saying "libstdc++-6.dll" is missing. Sorry for
the trouble. In total how many libraries we need to install?
hard to say. it depends on the options configured in the makefile and
through installed packages with library dependencies. for this .dll library
(and similar ones), you can try adding the '-static' flag in addition to
'-static-libgcc'.
axel.
Thank you so much sir. I could run the lmp_serial.exe without any trouble now.
Thank you once again