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

How to build mfem in windows 7 64bit + VS2010/VS2012? #8

Closed
GoogleCodeExporter opened this issue Jun 11, 2015 · 12 comments
Closed

How to build mfem in windows 7 64bit + VS2010/VS2012? #8

GoogleCodeExporter opened this issue Jun 11, 2015 · 12 comments

Comments

@GoogleCodeExporter
Copy link

Dear all,
Can I use the MFEM in windows 7 64bit + VS2010/VS2012? How to build it?

Thanks,
Tang Laoya

Original issue reported on code.google.com by tanglaoy...@gmail.com on 22 Dec 2013 at 11:43

@GoogleCodeExporter
Copy link
Author

Hi Tang Laoya,

The most straightforward way to use MFEM under Windows is with Cygwin. If that 
works for you, the build should be the same as on any other UNIX-like system.

We do not have access to VS at work, but my guess is that it shouldn't be too 
difficult to create a project file file for the serial version of MFEM: the 
source files from all directories, except examples/, should be compiled 
independently into a library, which can then be linked with one of the 
examples. If you need the parallel version of MFEM, you will first need to 
install MPI, hypre and METIS, and then specify some C define flags when 
compiling MFEM, see the parallel target in the GNUmakefile.

Hope this helps,
Tzanio

but I imagine that cra

currently have VS project files, but 

You can still use 

Original comment by tzanio on 23 Dec 2013 at 8:40

  • Changed state: Accepted
  • Added labels: Priority-Low, Type-Enhancement, Usability

@GoogleCodeExporter
Copy link
Author

Dear Tzanio,

Thank you very much for your kindly reply. I tried to build the latest source 
by VS project. There are still some problems that the following header files 
which are used in Linux system can't be found in Windows system. Could you 
please provide some replacement?

Thanks,
Tang Laoya

P.S.:
the header files that can't find:
sys/times.h
netdb.h
netinet/in.h

Original comment by tanglaoy...@gmail.com on 25 Dec 2013 at 12:01

@GoogleCodeExporter
Copy link
Author

Hi Tang Laoya,

I am not sure what the right replacements are, but here is where we use these 
headers:

sys/times.h is used for the times() function in general/tic_toc.?pp. This is 
just a function to measure the time during execution, and I'm sure that there 
is a similar Windows function, though I don't know what it is. If you are not 
going to use the MFEM timing routine, you can just comment out the function 
calls that give you errors.

netdb.h is used for the gethostbyname() function in general/socketstream.cpp 
and general/isockstream.cpp. I am not sure if sockets will even work on 
Windows, so this could probably be commented out.

netinet/in.h is also used for socket-related functions in 
general/isockstream.cpp and you can probably safely comment out the 
implementations there.

I realize that this might not be very helpful, but it is the best I can do 
given the machines we have here. Please let us know if you manage to get it 
working.

Cheers,
Tzanio

Original comment by tzanio on 30 Dec 2013 at 11:50

@GoogleCodeExporter
Copy link
Author

Dear Tzanio,

Thank you very much for your kindly reply. Now the problem is solved and the 
code can be compiled in Windows successfully. The modified code 
'socketstream.cpp' is attached.

Thanks,
Tang Laoya

Original comment by tanglaoy...@gmail.com on 1 Jan 2014 at 7:50

Attachments:

@GoogleCodeExporter
Copy link
Author

Hi Tang Laoya,

Thank you for the update, I am glad you got it working.

I was wondering if you will be interested in writing a more detailed outline of 
the steps you followed, that we can maybe add as a Wiki page? This could be 
very useful for other users on Windows.

Cheers,
Tzanio

Original comment by tzanio on 2 Jan 2014 at 9:06

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Dear Tzanio,

Sorry for my late reply. In fact, there are several files changed. I have 
compressed and uploaded all the source files (you can found the changed files 
from changed date). After modified the souce code, the creating and setting of 
VS2012 project include:
1) add all cpp source files into project and create a library (from folder fem, 
general, linalg, mesh);
2) setting include path (additional include directories): 
..\fem;..\general;..\linalg;..\mesh;..\
3) build the project to generate a library;
4) create the program by linking any source file in example folder and the 
library generated in step 3).

and then you can run the program.

However, there are still some problems when running the program:
every time the program finished, the following error information displayed:
Unable to connect to port 19916 on localhost

Latter I will ask for your help on how to use the powerful library in my 
electromagnetic field calculation.

Thanks,
Tang Laoya

Original comment by tanglaoy...@gmail.com on 10 Jan 2014 at 9:53

Attachments:

@GoogleCodeExporter
Copy link
Author

Thanks a lot Tang Laoya!

We will take a look and see if we can incorporate your changes in the next 
official release of the library. I am sure they will be very useful for future 
Windows users of the library.

The message you are getting at the end is more of a "feature" than an error :). 
By default the example send the solution or visualization to our GLVis tool 
(glvis.goolecode.com). You can either disable that, e.g. comment out step 9 in 
https://code.google.com/p/mfem/source/browse/examples/ex1.cpp#119, or better 
yet build GLVis (it requires MFEM and OpenGL) and run it as a server in a 
separate terminal.

Best regards,
Tzanio

Original comment by tzanio on 10 Jan 2014 at 4:45

@GoogleCodeExporter
Copy link
Author

Dear Tzanio,

I noticed you have released another latest version 
http://releases.mfem.googlecode.com/hg/mfem-9e90b6710d.tgz

However, it still can't be compiled in Windows successfully. I attached the 
version based on the latest version that can work in Windows for other Windows 
users.

On the other hand, I noticed that there are some more efficient and accurate 
finite element methods, such as 
high order vector finite element based on hierarchal vector basis functions:
http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=791939

mortar finite element method
http://epubs.siam.org/doi/abs/10.1137/S0036142999357968
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.210.6947

and 
extended finite element method
http://lohrengel.perso.math.cnrs.fr/publications/FullPaper_ECCOMAS2012_Lohrengel
_etal.pdf
http://www.cimne.com/cvdata/cntr2/spc31/dtos/img/mdia/thesis/MasterThesisGiraldo
AriasSantiago.pdf

do you have plan to implement in MFEM, or have already implemented in it?

Thanks,
Tang Laoya

Original comment by tanglaoy...@gmail.com on 7 Dec 2014 at 2:11

Attachments:

@GoogleCodeExporter
Copy link
Author

Dear Tang Laoya,

We are working on the 3.0 release of the MFEM library and we are very likely to 
add your Windows patch to it.

All of the methods you listed could, with some effort, be implemented in MFEM. 
For example, I have used an earlier version of the library to implement a type 
of (algebraic) mortar method for elliptic problems.

That being said, we don't currently have any plans for adding hierarchical 
basis functions or frameworks for defining mortar or XFEM discretizations. 
While these methods are interesting, they are outside of our current research 
focus.

Thanks again for your help,
Tzanio

Original comment by tzanio on 8 Dec 2014 at 9:56

@GoogleCodeExporter
Copy link
Author

Dear Prof. Tzanio,

Thank you very much for your kindly reply. 
Your news is really exciting. What new features are included in 3.0 and when 
could the new version be released?

Thanks,
Tang Laoya


Original comment by tanglaoy...@gmail.com on 8 Dec 2014 at 11:35

@GoogleCodeExporter
Copy link
Author

We haven't finalized the set of new features yet, but expect everything in the 
latest developer release, plus support for discretizations on surfaces, 
non-conforming quad/hex meshes, and more :)

Tzanio

Original comment by tzanio on 10 Dec 2014 at 10:05

@GoogleCodeExporter
Copy link
Author

Dear Prof. Tzanio,

Thank you very much for your kindly reply. The new features of version 3.0 is 
attractive.

Thanks,
Zhanghong Tang

Original comment by tanglaoy...@gmail.com on 11 Dec 2014 at 12:45

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

No branches or pull requests

2 participants