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

Introduce basic parallelism with Coarrays #4

Open
milancurcic opened this issue Jun 22, 2017 · 4 comments
Open

Introduce basic parallelism with Coarrays #4

milancurcic opened this issue Jun 22, 2017 · 4 comments
Assignees

Comments

@milancurcic
Copy link
Member

No description provided.

@dksasaki
Copy link

Hello Milan, did you finish implementing the basic parallelism in wavy?

@milancurcic
Copy link
Member Author

Hi Dalton, thanks for checking in! I haven't touched this repo in few years. It started off as a business project that didn't come through in the end, so I open sourced it. If you think there are ways you could improve or develop it further, I'd be happy to help.

@dksasaki
Copy link

dksasaki commented Nov 20, 2019

I'm glad you open-sourced it - I wouldn't learn as much Fortran as I did if you hadn't opened it! For now, I'm doing this as a personal interest and last month I was reading your Fortran book and I realized it would be interesting to implement the parallelism with coarrays. I bumped into a few annoying problems, like the fact you can't use coarrays with derived types, but in the end, I managed to adapt some methods of your domain module and the parallel module (from the book) to work with a simple 2D case. I haven't generalized the methods and still need to gather the spectrum information into a single domain but before finishing it, I believe would be interesting to get in touch to check whether everything looks okay.

@dksasaki
Copy link

Hey Milan, I am preparing an example of umwm2d with coarrays. In order to test it in the simplest way, I took the source functions out of wavy code and compiled them independently. Now I am trying to implement these changes back to the code, but there is an issue with the compilation.

I am using gfortran with the opencoarrays package and I need to pass a flag to the compiler (-fcoarray=lib). I added this flag to the CMakeLists.txt in the root directory of wavy in (notice that I am not familiar yet in working with cmake configuration files):

original:

# compiler flags for gfortran
if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
  set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -cpp")
  set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -C -fbacktrace")
  set(CMAKE_Fortran_FLAGS_RELEASE "-O3")
endif()

modified:

# compiler flags for gfortran
if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
  set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -cpp -fcoarray=lib")
  set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -C -fbacktrace")
  set(CMAKE_Fortran_FLAGS_RELEASE "-O3")
endif()

When I try to compile the code, the following error appears:

f951: Fatal Error: Reading module ‘json_module’ at line 372 column 12: Expected left parenthesis
Notice this was done with the original src files. Would you have any idea of what is going on? I could disable json, but then we would miss some test cases.

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