how to update a modified source file

Discussion about building and installing Elmer
Post Reply
stoykov
Posts: 26
Joined: 11 May 2012, 13:18
Antispam: Yes

how to update a modified source file

Post by stoykov »

Hello,

If I need to modify some of the source files from /fem/src, how to update the changes in the libraries? One way is to run the configure file and reinstall the complete Elmer. But there should be a way to compile only the modified file and add it to the library /lib/libelmersolver.so.
Could someone tell me how to do it?

Regards,
Stan
raback
Site Admin
Posts: 4870
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: how to update a modified source file

Post by raback »

Hi Stan

If you just want to compile a routine in src/modules then make a copy of the *.src file and compile it as in

Code: Select all

elmerf90 -o MyRoutine.so MyRoutine.f90 
(In Windows the suffix for the shared object is .dll). Then you can use this as a regular solver defined by the Procedure statement in the .sif file.

For library functionality I don't know of any way to avoid full compilation.

-Peter
stoykov
Posts: 26
Joined: 11 May 2012, 13:18
Antispam: Yes

Re: how to update a modified source file

Post by stoykov »

Thank you Peter,

yes, in the case of solver, I may compile and use it through the sif file.

But if I use the StressSolver and I need to change, for example, the SUBROUTINE Add2ndOrderTime, which is called from StreesSolver through Default2ndOrderTime, then I would need to compile SolverUtilis. But since it works with full compilation, it is ok.

Regards,
Stan
ram12
Posts: 1
Joined: 12 Mar 2013, 06:32
Antispam: Yes

Re: how to update a modified source file

Post by ram12 »

I tried it by making a copy of the *.src file and compile it, it woks to me :)
Post Reply