Opened 17 years ago
Last modified 17 years ago
#11 closed bug
Compilation of roms-sed on windows under cygwin using g95 — at Version 4
Reported by: | skbhate | Owned by: | skbhate |
---|---|---|---|
Priority: | normal | Milestone: | ROMS-SED Compilation & Testing |
Keywords: | Cc: | jcwarner@…, rsignell@…, skbhate@… |
Description (last modified by )
Roms-sed version: Current version available from the trunk.
Environment/OS: CYGWIN
Fortran compiler: g95 http://www.g95.org
Netcdf-lib: Built with g95 compiler under cygwin
Code compiles fine and creates all the required libs for ROMS... but it breaks at the final step while linking all libs and creating executable 'OceanS'...
/usr/bin/cpp -P -traditional -I/usr/local/include -DCYGWIN -DI686 -DG95 -ISWAN -IROMS/Include -IROMS/Adjoint -IROMS/Nonlinear -IROMS/Representer -IROMS/Tangent -IROMS/SeaIce -IROMS/Drivers -IMaster Master/propagator.F > propagator.f90 ROMS/Bin/cpp_clean propagator.f90 g95 -c -O3 -ffast-math propagator.f90 g95 -c -O3 -ffast-math ocean_control.f90 g95 -c -O3 -ffast-math master.f90 g95 -O3 -ffast-math master.o ocean_control.o ocean_coupler.o propagator.o refdif_couple.o libSWAN.a libADM.a libRPM.a libTLM.a libNLM.a libICE.a libUTIL.a libMODS.a /exe: /link g95: /exe:: No such file or directory g95: /link: No such file or directory make: *** [.] Error 1 rm seaice.f90 sv_perturb.f90 mod_kinds.f90
The possible cause of error seems to be in the rule defined for CYGWIN in Master/Module.mk
(shown below)
11: #ifeq ($(OS)-$(strip $(FORT)),CYGWIN-df) 12: 13: ifeq ($(OS),CYGWIN) 14: $(BIN): $(libraries) $(local_objs) 15: $(LD) $(FFLAGS) $(local_objs) $(libraries) $(LIBS_WIN32) /exe:$(BIN_WIN32) /link $(LDFLAGS) 16: else 17: $(BIN): $(libraries) $(local_objs) 18: $(LD) $(FFLAGS) $(LDFLAGS) $(local_objs) -o $@ $(libraries) $(LIBS) 19: endif
Line 13 (shown above) will always be true for CYGWIN no matter what is the compiler and will look for /exe and /link directories which are (I suppose) only true for compaq visual command-line fortran compiler 'df'. So the recommended fix can be uncomment line 13 and comment line 11 in Master/Module.mk . This will ensure that if statement is true for only 'df' compiler and the else statement would be executed for other compilers like g95 etc.
Compilation was successful after the above recommended changes to the Master/Module.mk.
The issue still remains to be resolved whether the updated rule in Master/Module.mk will work for 'df' compiler or not.
Change History (5)
by , 17 years ago
comment:1 by , 17 years ago
Status: | new → assigned |
---|
comment:2 by , 17 years ago
Description: | modified (diff) |
---|
comment:3 by , 17 years ago
Priority: | critical → normal |
---|
comment:4 by , 17 years ago
Description: | modified (diff) |
---|
Master/Module.mk. Updated rule.