GRTLCollaboration / GRChombo

An AMR based open-source code for numerical relativity simulations.
BSD 3-Clause "New" or "Revised" License
80 stars 49 forks source link

Creation of a Python Wrapper for GRChombo #46

Open shreyasbapat opened 5 years ago

shreyasbapat commented 5 years ago

We are creating a Python Wrapper for GRChombo under a ESA SOCIS (https://socis.esa.int) project.(https://socis.esa.int/projects)

C4 | Adaptive Mesh refinement for EinsteinPyMentor: Priyanshu Khandelwal, EinsteinPyStudent: Chinmay Talegaonkar, Indian Institute of Technology Bombay, India
-- | --

The code will be kept here: https://github.com/einsteinpy/amr

And under the clause 1 of the LICENCE of GRChombo,

We have included the copyright notice in our repository: https://github.com/einsteinpy/amr/blob/master/LICENSE

You may reach out to me at shreyas@einsteinpy.org for more info. Thanks

cc @chinmay0301 @masquerade0097

shreyasbapat commented 5 years ago

Thie wrapper is made for "The EinsteinPy Project"

https://github.com/einsteinpy/einsteinpy

KAClough commented 5 years ago

Hi Shreyas! This looks like a very interesting project, we'd be happy to hear more about it. I will send you an email to put you in contact with some of our developers here in case you need more info on the code.

shreyasbapat commented 5 years ago

That would be amazing @KAClough :)

shreyasbapat commented 5 years ago

There is some issue in make that @chinmay0301 is facing! Can you please elaborate the issue here? @masquerade0097

chinmay0301 commented 4 years ago

issue

mirenradia commented 4 years ago

@chinmay0301, are you using either GCC (>=5.0) or the Intel C++ compiler (>=17.0)? These are the only compilers we know that work.

chinmay0301 commented 4 years ago

So I was trying to install Chombo from the folder on GR Chombo's repo on my Macbook (OS Sierra). I am facing an issue with the make all command. Even on specifying the hdf5 path and gfortran compiler I am getting this error. Any suggestions about what to do?

chinmay0301 commented 4 years ago

@chinmay0301, are you using either GCC (>=5.0) or the Intel C++ compiler (>=17.0)? These are the only compilers we know that work.

Oh, I checked its gcc 4.2.1

chinmay0301 commented 4 years ago

image how should I modify these flags in the Make.defs.defaults, or Make.defs.local file?

mirenradia commented 4 years ago

Have you seen the installation guide in the wiki? There is an example Make.defs.local example for MacOSX included in Chombo here which shouldn't be too hard to modify (though you'd probably want to set DIM=3 and remove the USE_PETSC line).

chinmay0301 commented 4 years ago

I will try this out and let you know

Masquerade0097 commented 4 years ago

@chinmay0301 Did the proposed solution work?

Masquerade0097 commented 4 years ago

@mirenradia I tried compiling Chombo on my system (Ubuntu 16.04 LTS) and I'm getting this error log when running sudo make all -j 8. Can you please help me figure out the solution?

This is the Make.def.local file on my machine.

DIM           = 3
#DEBUG         =
#OPT           =
#PRECISION     =
#PROFILE       =
CXX           = /opt/intel/compilers_and_libraries_2018.5.274/linux/bin/intel64/icpc -std=c++14 -qopenmp -mkl=sequential
FC            = /opt/intel/compilers_and_libraries_2018.5.274/linux/bin/intel64/ifort -qopenmp -mkl=sequential
MPI           = TRUE
## Note: don't set the MPICXX variable if you don't have MPI installed
MPICXX        = mpicc -std=c++14 -qopenmp -mkl=sequential -lmpi
#OBJMODEL      =
#XTRACONFIG    =
## Optional features
#USE_64        =
#USE_COMPLEX   =
#USE_EB        =
#USE_CCSE      =
USE_HDF       = TRUE
HDFINCFLAGS   = -I/usr/local/include
HDFLIBFLAGS   = -L/usr/local/lib -lhdf5 -lz
## Note: don't set the HDFMPI* variables if you don't have parallel HDF installed
HDFMPIINCFLAGS= -I/usr/local/parallelhdf5/include
HDFMPILIBFLAGS= -L/usr/local/parallelhdf5/lib -lhdf5 -lz

These is my system configuration -

priyanshu@Masquerade:/opt/intel$ which icpc
/opt/intel/compilers_and_libraries_2018.5.274/linux/bin/intel64/icpc
priyanshu@Masquerade:/opt/intel$ which ifort
/opt/intel/compilers_and_libraries_2018.5.274/linux/bin/intel64/ifort
priyanshu@Masquerade:/opt/intel$ which f77
/usr/bin/f77
priyanshu@Masquerade:/opt/intel$ f77 --version
GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
priyanshu@Masquerade:/opt/intel$ which gfortran
/usr/bin/gfortran
priyanshu@Masquerade:/opt/intel$ which icc
/opt/intel/compilers_and_libraries_2018.5.274/linux/bin/intel64/icc
priyanshu@Masquerade:/opt/intel$ g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

priyanshu@Masquerade:/opt/intel$ gfortran --version
GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

priyanshu@Masquerade:/opt/intel$ which mpicc
/home/priyanshu/softwares/mpich-3.3.1/mpich-install/bin/mpicc
mirenradia commented 4 years ago

This is a common issue (and is point 6 in our Compilation FAQ). By default, Ubuntu 16.04 does not come with C shell (csh). You should be able to install it by running the command sudo apt install csh.

Masquerade0097 commented 4 years ago

@mirenradia Thanks for the suggestion. I installed csh and it resolved most of the errors but still, sudo make all -j 8 is failing with this error log.

mirenradia commented 4 years ago

@Masquerade0097, It looks like you've got problems with your HDF5 libraries. What version are you using and did you build it from source? If so, are you confident that they have been installed correctly?

I'm not sure how much I can help without physical access to your machine but I would recommend using the GNU compiler provided with Ubuntu, g++ (the version in the default repositories should just about be new enough but you can install a newer version by following this guide), and then using an MPI implementation (MPICH is available but there are also alternatives such as OpenMPI) and HDF5 library provided in the Ubuntu package repositories as these will be tested and installed correctly. I'm not sure of the exact packages you would need to install but at a guess, you would probably need to install mpich and libhdf5-mpich-dev using the command sudo apt install mpich libhdf5-mpich-dev.

P.S. You shouldn't need to run make with sudo (unless you are building in a directory you don't have permissions for).

Masquerade0097 commented 4 years ago

@mirenradia

What version are you using and did you build it from source? If so, are you confident that they have been installed correctly?

Yes, I installed it from the source and I think there were some errors in that installation. Now I installed it from Ubuntu repositories and I am able to compile both Chombo and GRChombo successfully.

Thanks for the help :)

mirenradia commented 4 years ago

@mirenradia

What version are you using and did you build it from source? If so, are you confident that they have been installed correctly?

Yes, I installed it from the source and I think there were some errors in that installation. Now I installed it from Ubuntu repositories and I am able to compile both Chombo and GRChombo successfully.

Thanks for the help :)

No problem. Glad it worked out!

mirenradia commented 4 years ago

@shreyasbapat, is this project still alive? If not (or there is no reply within a week), I will close this issue.

shreyasbapat commented 4 years ago

Hi @mirenradia ! Yes. We are actually busy arranging for a high performance computer. I admit it seems like a slow process from our end, but we are working hard to get it in EinsteinPy 0.4.0 perhaps.

shreyasbapat commented 4 years ago

And with all due respect, sorry for the delay :)

mirenradia commented 4 years ago

Ah ok, no worries. I'll leave it open then.