nairnj / nairn-mpm-fea

nairn-mpm-fea computational mechanics project
86 stars 37 forks source link

ADDED CMAKE Build System - WORKING ON LINUX #14 #15

Closed luchete80 closed 3 months ago

luchete80 commented 3 months ago

Working now with OPENMP ATENTION: Previous versions of xerces3.14 are not working. Version 3.2.0 is working ok (configured with cmake). image

image

nairnj commented 3 months ago

I am not sure I see the reason for these changes and with quick look I think it would break a lot of my work flow. It seems the change is to use cmake. I almost exclusively compile in XCode on a Mac or Visual Studio on PC and all is working fine. I see you can use your own master for changes you want, so if you need to use cmake, that will work. I don't think I am interested in "pulling" it into my master branch.

On rare times I need a Linux compile, the make method that is provided is adequate (it works on Mac too, but not in Windows).

I looked at few of your commits and some would likely break some project options. For example, you added lines include MPMPrefix.hpp in certain common files which would cause problems when compiling finite element code (nairn-fea-mpm has both finite elements and material point method; the FEA is rather basic; MPM is my research area). In my source, the prefix files load a different FEAPrefix.hpp for FEA compile and MPMPrefix.hpp for MPM compile. I expect cmake could fix that, but since all is working now, I am not sure of the benefits. If I decide someday to use cmake, you changes could be useful, but I don't need it now (and I have never used cmake)

You also posted a png and I was not clear of the meaning. It looks like code did not recognize "-np 8". It works fine for me. Did you change the main.cpp file or was that not the reason for the png posting?

luchete80 commented 3 months ago

You also posted a png and I was not clear of the meaning. It looks like code did not recognize "-np 8". It works fine for me. Did you change the main.cpp file or was that not the reason for the png posting?

Hello! Thank you very much for your response. The reason of all these changes is that I use linux at work so I build it on mswin only on my home pc.
Yes, first post is previous to include openmp. I include MPMPrefix and some other files in order to detect some vars as Vector , and several others. Yes, maybe in MSVC these file are included automatically. Maybe I will try to include as defaults and maintain the original code. by the moment I close the PR and try to update it once these changes will ready and code remains as the original.

Thanks again for taking the time to response.