Thank you for the reply. I tried without the UDF and it works. Also, I figured out the problem with my UDF (For Mass_Transfer UDF you first have to run the following commands: solve/set/advanced/linearized-mass-transfer-udf).
But, when I load the source term Macro in the cell zone conditions, fluent given this error and it shuts down.
"Node 0 : Process 43356: Received signal SIGSEGV"
"Node 1 : Process 31152: Received signal SIGSEGV"

I tried my UDF with both interpret and compile options. But, this error is the same. I also tried with setting user-defined-memory locations 0,1 and 2. Below is my UDF