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

Problem compiling on Ubuntu 22.04 with gcc #7

Open
SennDegrare opened this issue Jul 15, 2022 · 1 comment
Open

Problem compiling on Ubuntu 22.04 with gcc #7

SennDegrare opened this issue Jul 15, 2022 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@SennDegrare
Copy link

Hi,
I'm not very experienced with coding of this scale, so do forgive any mistakes I make trying to express the issues.
Basically I was trying to compile a Makefile created by the code
$ python3 configure.py -2d -intel -mpi -hdf5 --nghosts=5 --user=user_twostream
$ make all

This caused gfortran to put up a lot of errors, so I looked through some of the previous issues and changed the existing flags from
FC := h5pfc FLAGS := -Ofast -O3 -DSoA -ipo -qopenmp-simd -qopt-report=5 -qopt-streaming-stores auto -diag-disable 10397 -diag-disable 10346 PFLAGS := -DHDF5 -DMPI -DtwoD -DNGHOST=5_2
to
FC := gcc LD := h5pfc FFLAGS := -Ofast -O3 -DSoA #-qopenmp-simdi -qopt-report=5 -qopt-streaming-stores auto PFLAGS := -DHDF5 -DMPI -DtwoD -DNGHOST=5_2
Upon running the command again, I am faced with only 1 issue in the Makefile snippet
$(BUILD_DIR)%.o: %.F90 @mkdir -p $(@D) @$(FC) $(FFLAGS) $(PFLAGS) -cpp $(addprefix -I, $(dir $(INC_FILES))) -module $(BUILD_DIR) -c $< -o $@ @echo [OK]: compiled $<

which is given as gcc: error: unrecognized command-line option ‘-module’; did you mean ‘-Mmodules’? make: *** [Makefile:53: build/src/global_namespace.o] Error 1

Needless to say, changing -module to -Mmodules doesn't help either - it gives a warning that Mmodules is valid for C++ but not Fortran and then I run into the error src/global_namespace.F90:16: Error: Can't open included file 'mpif.h'
I'm not sure what to do after this, so any help would be appreciated.

@haykh
Copy link
Collaborator

haykh commented Aug 13, 2022

hi! sorry for a late response. could you give a bit more info? it looks like you are trying to run with -intel but the compiler it uses is not an intel compiler (which is why it did not recognize the -module. if so, try configuring without the -intel flag. also, are you sure the compiler has mpi?

@haykh haykh self-assigned this Aug 13, 2022
@haykh haykh added the question Further information is requested label Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants