|
[Sponsors] |
August 2, 2016, 08:07 |
safe_malloc build error in user_spray_udf
|
#1 |
New Member
Join Date: Aug 2015
Location: Alexandria, Egypt
Posts: 10
Rep Power: 11 |
Hi all
In user_spray_udf there are a couple of lines for memory allocation that keeps making build error. those lines are: /// islam memory allocation check for a bug vapor_mass_0=(double *)safe_malloc(num_parcel_species*sizeof(double)); vapor_mass=(double *)safe_malloc(num_parcel_species*sizeof(double)); local_species=(double *)safe_malloc(num_total_species*sizeof(double)); temp_boil=(PRECISION *)safe_malloc(num_parcel_species*sizeof(double)); The build error is: Undefined symbols for architecture x86_64: "safe_malloc(unsigned long)", referenced from: user_spray_evap_cell(parcel_cell_definition*, double*, double*) in main.cpp.o My solution was to swap "safe_malloc" with "malloc" and it worked. is there another solution like adding a function in header files ?? Thanks in advance |
|
August 2, 2016, 12:10 |
|
#2 |
New Member
Saurav
Join Date: Dec 2015
Location: Convergent Science, Madison, USA
Posts: 27
Rep Power: 11 |
Hi Kabil,
Make sure that you had taken care of the following : 1) All the header files are there in the UDF directory. Especially in your case, it looks like safe_prototypes.h might be missing. 2) user_dynamic_routines.c is there in the UDF directory. 3) The makefile for UDF refer to the respective object files for the C-routines you are compiling. I am guessing one of the above is not taken care of, which leads to build error message. If that is not the case, please send your files to support@convergecfd.com to have a closer look at this. Thanks |
|
Tags |
converge cfd, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Building from Source on Windows using Cygwin64 | ericthefatguy | SU2 | 2 | May 12, 2015 19:23 |
SU2 3.0 build failure | waku2005 | SU2 Installation | 4 | January 24, 2014 13:40 |
Hardware build review/advise for student desktop | AerE | Hardware | 10 | July 5, 2013 07:03 |
System Build Advice for FEA | cycleback | Hardware | 1 | February 8, 2013 21:53 |
64bitrhel5 OF installation instructions | mirko | OpenFOAM Installation | 2 | August 12, 2008 19:07 |