Updating Elmer on Windows xp

Discussion about building and installing Elmer
hamed
Posts: 110
Joined: 12 Oct 2009, 18:28

Updating Elmer on Windows xp

Post by hamed »

Dear Elmer Group
I’m using Elmer on Windows xp, so I do the respective installation by means of the binary file available for Windows. But I don’t know how to update Elmer when a new version of a module is committed in SVN repository or when I myself modify some modules or subroutines. I’ve studied many of the WebPages and also forum topics related to this subject but I still have problems. I’ll be extremely grateful if you can help me towards this matter.
Regards, Hamed
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Updating Elmer on Windows xp

Post by raback »

Hi

In the wiki pages there is info an how to compile Elmer an Windows. You could probably take use of the compilers that come with the GUI and takes the shorter version. For more info see http://www.elmerfem.org/wiki/index.php/ ... stallation

-Peter
hamed
Posts: 110
Joined: 12 Oct 2009, 18:28

Re: Updating Elmer on Windows xp

Post by hamed »

Dear Elmer
During last week I did the instruction given in http://www.elmerfem.org/wiki/index.php/ ... P_Part_Two step by step many times. In fact, some parts of the instruction was not as clear as a starter like me expects. Anyway, after finishing the steps described by the given instruction all the tests were passed successfully (112 passed out of 112 as the MSYS window reported) but I cannot start ELMERPOST and it doesn't work at all.
I just want to modify 'SolverUtils' in routines SetPeriodicBoundariesPass1 and 2 to set the Scale to -0.5 (or -2.0) that is now either -1.0 (periodic) or 1.0 (anti periodic). I guess there should be an easier way to perform this task instead of doing all the instructions given the above link that is somehow difficult for inexperienced people. I'll be grateful if you can show me an easier way in detail.
Millions of thanks.
Regards, Hamed
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Updating Elmer on Windows xp

Post by raback »

Hi Hamed

Compiling a versatile program that depends on a number of different libraries is often not easy, and I'm no expert in that. However, as you do not really need to compile the ElmerGUI and ElmerPost you could probably use the shorter instruction in:

http://www.elmerfem.org/wiki/index.php/ ... h_gfortran

In fact, mal has plugged in a gfortran compiler (gfortran-elmer) to the windows distro so the compatibity with the solver is guaranteed. This should be pretty straight forward.

-Peter
hamed
Posts: 110
Joined: 12 Oct 2009, 18:28

Re: Updating Elmer on Windows xp

Post by hamed »

Hi
Using some tricks, it seems that I finally could compile Elmer from source code. I’ve listed different steps of compiling below:

1- Installing MinGW
2- Installing MSYS
3- Installing precompiled Elmer
4- Downloading the latest source by Tortoise SVN
5- Compiling Tcl/Tk by ‘source compile-tcltk.sh’
6- Compiling Glaux by ‘source compile-Glaux.sh’
7- Compiling Elmer by ‘source compile-Elmer.sh’
8- Testing Elmer
9- Overwriting form Build to Elmer6.0

Now I have two questions.

Do I have to repeat all the abovementioned steps from 5 to 9 every time I update the source code by Tortoise SVN?

What should I do if I want to modify something in Elmer (e.g. modify 'SolverUtils' in routines SetPeriodicBoundariesPass1 and 2 to set the Scale to -0.5 that is now -1.0)? I guess I should modify SolverUtils.src in C:\msys\1.0\src\elmerfem\fem\src. Am I right? Then which of the abovementioned steps should be repeated for this purpose?

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

Re: Updating Elmer on Windows xp

Post by raback »

The steps to freshen the ElmerSolver installation after a successfull compilation are typically:

cd $location_of_source_files/fem
svn update ! or edit the src/*.src files manually
make
make install

-Peter
hamed
Posts: 110
Joined: 12 Oct 2009, 18:28

Re: Updating Elmer on Windows xp

Post by hamed »

Dear Peter
I modified SolverUtils.src in C:\msys\1.0\src\elmerfem\fem\src. I.e. I set scale=-0.5 for periodic and scale=0.5 for antiperiodic boundary conditions in SetPeriodicBoundariesPass1 and 2. I also tried scale=-2.0 and 2.0.
Then I created the file Update-Elmer.sh in C:\msys\1.0\src\elmerfem\fem.
Using MSYS window I navigated to this folder, typed 'source Update-Elmer.sh' and entered.
After finish of compiling I solved a test case by ElmerSolver but the results were as if scale=1.0 (or -1.0). Do you have any idea about it?

Update-Elmer.sh :

Code: Select all

make 
make install
Regards, Hamed
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Updating Elmer on Windows xp

Post by raback »

Perhaps you could add some print commands to verify that you really have changed the value, and are running the updated version. It would not be the first time when this would happen...
hamed
Posts: 110
Joined: 12 Oct 2009, 18:28

Re: Updating Elmer on Windows xp

Post by hamed »

Dear Peter
I deleted all the contents of SolverUtils.src (now it's a blank file). Then I repeated the procedure I explained in my previous post.

I checked SolverUtils.f90, SolverUtils.o and SolverUtils.mod in C:\msys\1.0\src\elmerfem\fem\src.

SolverUtils.f90 also changed to a blank file accordingly.
SolverUtils.o missed all of its contents except the first line.
It seems that SolverUtils.mod didn't change at all.
You can see the src folder (and SolverUtils.src ) after compilation in the following picture.
These changes also didn't show any effect when I ran my test case.
Thanks and Regards,
Hamed
Source folder after compiling.JPG
(183.81 KiB) Downloaded 207 times
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Updating Elmer on Windows xp

Post by raback »

Hi Hamed

Well, if you delete the SolverUtils.src I can't see how you could obtain a working executable. Probably the compilation terminates at some point. Pay attention to the output of the compilation script. The .src files are the primary files that are pulled through a pre-processor into .f90 files.

-Peter
Post Reply