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

Assistance Required for generating, configuring, and building the Homo3D Project #8

Open
mahdimirzajani opened this issue Jul 30, 2024 · 6 comments

Comments

@mahdimirzajani
Copy link

I hope this message finds you well.
I am currently working with your open-source project, Homo3D. I appreciate the effort and dedication you have put into creating this valuable tool for solving inverse homogenization problems. However, I have encountered several challenges during the process of generating, configuring, and building the project. I initially used the Ninja builder and Visual Studio compiler, which resulted in successful generation and configuration, but numerous build errors occurred. I Attempted different combinations of compilers and builders (Ninja, Unix Makefiles, Visual Studio, GNU) but several error happened in generating and configuring. When attempting to use Unix Makefiles and other c and c++ compiler, I encountered the error with detecting CUDA compiler ABI info in generation. Despite these efforts, I have been unable to successfully build the project. I would greatly appreciate any guidance or recommendations you can provide to resolve these issues.Thank you for your time and assistance. I look forward to your response.
Best regards,

@lavenklau
Copy link
Owner

Please provide more information, e.g., the platfrom, compiler version, cuda version and error message so that I can reproduce it.

@mahdimirzajani
Copy link
Author

error.txt

Thank you for your prompt response. I appreciate your willingness to assist me with the issues I am facing. I have attached a detailed log file (error.txt) which includes all the errors encountered during the build process. Below is the detailed information you requested:
Platform:
Windows 10
Compiler Version:
Visual Studio 2022 Developer Command Prompt v17.10.3
Microsoft (R) C/C++ Optimizing Compiler Version 19.40.33811 for x64
"The C compiler identification is MSVC 19.40.33811.0
The CXX compiler identification is MSVC 19.40.33811.0"
CMake version:
3.29.3
CUDA :
NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Cuda compilation tools, release 12.4, V12.4.99
Build cuda_12.4.r12.4/compiler.33961263_0
The CUDA compiler identification is NVIDIA 12.4.99
GPU:
NVIDIA GeForce GTX 1050

I hope this information helps in reproducing the issues and identifying the cause. Any guidance or recommendations you can provide to resolve these issues would be greatly appreciated.
Thank you for your time and assistance.
Best regards,

@lavenklau
Copy link
Owner

It seems that cmake finds tbb from your oneAPI package, not from the conda environment. One possible workaround is manually open the generated msvc project and append the path of 'tbb12.lib' to the Additional Library Directories item.

@mahdimirzajani
Copy link
Author

I hope this message finds you well. thank you so much for your response.
I use your solver and I have to thank you for this great job.
We are currently interested in isolating the homogenization process implemented within Homo3D for independent use, without the inverse optimization aspects. Our goal is to utilize the homogenization functionality as a standalone module for calculating effective material properties in a separate context. Having reviewed both the code and associated documentation, we believe that your expertise would be invaluable in guiding us through the process of modularizing the homogenization component. Specifically, we would be grateful for any advice on:
Identifying the key functions or classes within the code that perform the core homogenization calculations.
Understanding any dependencies or data structures unique to the framework that would need adaptation or modification to work independently.
Modifying inputs and outputs to facilitate standalone use of the homogenization functionality.

If you are available to provide any guidance or tips, it would greatly expedite our efforts and help us ensure accuracy in our extraction process. because this is a part of our project. Of course, we are happy to acknowledge your assistance in any resulting publications or contributions.
Additionally, please be assured that we intend to fully credit your work by citing your paper and GitHub repository in any resulting publications or reports that utilize the Homo3D framework. We recognize the importance of acknowledging original contributions, and we look forward to highlighting your work in our research

Thank you very much for your time, and we look forward to the possibility of working with you on this endeavor.

@lavenklau
Copy link
Owner

Could you try this?

Homogenization domain(config); 
Tensor<float> rho; // Or other tensor expression
// set value in density field
/// from openVdb 
rho.fromVdb("yourVdbFile"); 
/// Or from your host data (a 3D array in lexicographical order)
rho.fromHost(hostArray); // "std::vector<float> hostArray;"
domain.update(rho.data(), rho.view().getPitchT());
float C[6][6] ; // elastic matrix
domain.elasticMatrix(C);

This segment is mostly extracted from homogenization/homoExpression.h

For your question:

  • The homogenization process is performed by Homogenization class, it needs an density field as input, which is a instance of Tensor<xxx>.
  • Homogenization can work independently, as your can see from above code. The implementation of homogenization is dependent of tensor/variable expressions (involved in autodiff). All it needs is just a Tensor, this tensor can be manually defined and initialized, or evaluated by some tensor expression from AD module.
  • You may try wrapping above code with some modification to support custom input (e.g, initialize the config structure)

See if it works and please let me know if you have other questions.

@mahdimirzajani
Copy link
Author

I hope this message finds you well. I want to express my appreciation for your response. I have reviewed the code and documentation but would greatly benefit from your insights on a few specific areas. Could you provide a list of the minimum required files and dependencies specifically for the homogenization process? Does the Homogenization class rely on any major components outside the homogenization folder, such as methods in AutoDiff or global configurations? Could you explain about the usage of the files in homogenization folder? Could you provide additional details on how the Tensor object should be structured and initialized for the homogenization process? Specifically, are there any constraints or requirements for the fromHost or fromVdb functions when setting up the density field ? What are the key configuration parameters within config used by the Homogenization class?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants