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

Little changes on the pamm compilation #27

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,23 @@ or for development purposes via
python setup.py develop
```

#### In case of errors

If `python setup.py compile` fails (for example if blas and lapack are not installed on your system) you can copy the precompiled static executable `pamm_ubuntu` or `pamm_mac` into the pamm bin directory.

```
mkdir -p ./gmplabtools/pamm/precompiledPamm/bin
cp ./gmplabtools/pamm/precompiledPamm/pamm_ubuntu ./gmplabtools/pamm/precompiledPamm/bin/pamm
```
or
```
mkdir -p ./gmplabtools/pamm/precompiledPamm/bin
cp ./gmplabtools/pamm/precompiledPamm/pamm_mac ./gmplabtools/pamm/precompiledPamm/bin/pamm
```


And then install gmplabtools with `python setup.py install`.

### Docker

In order to build docker images following command should be used
Expand Down
Empty file removed gmplabtools/pamm/bin/.gitkeep
Empty file.
File renamed without changes.
Binary file added gmplabtools/pamm/precompiledPamm/pamm_ubuntu
Binary file not shown.
18 changes: 13 additions & 5 deletions gmplabtools/pamm/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,31 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

FF=gfortran
FFLAGS=-O3 -g -Wall -Wno-maybe-uninitialized -cpp
DEVELOPFLAGS= -g -Wall -Wno-maybe-uninitialized
FFLAGS=-O3 -cpp #$(DEVELOPFLAGS)
LDFLAGS=-llapack -lblas
MODULES=libpamm.f90 xyz.f90 random.f90
OBJECTS=$(MODULES:.f90=.o)
TOOLS=pamm

.PHONY: all clean $(TOOLS)
.PHONY: all clean cleanall $(TOOLS)
all: $(TOOLS)

$(TOOLS:%=%.o): $(OBJECTS)

$(TOOLS): % : ../bin/%

$(TOOLS:%=../bin/%): ../bin/%: %.o $(OBJECTS)
$(FF) $(FFLAGS) -o $@ $^ $(LDFLAGS)
@echo compiling executable $@
@mkdir -p ../bin
@$(FF) $(FFLAGS) -o $@ $^ $(LDFLAGS)

%.o: %.f90
$(FF) $(FFLAGS) -c $<
@echo compiling object $@
@$(FF) $(FFLAGS) -c $<

clean:
rm *.o *.mod
@rm -vf *.o *.mod

cleanall: clean
@rm -vf ../bin/pamm
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def finalize_options(self):

def run(self):
# clean folder
_ = subprocess.run("cd ./gmplabtools/pamm/src && make clean", shell=True)
_ = subprocess.run("cd ./gmplabtools/pamm/src && make cleanall", shell=True)

cmd_to_run = "cd ./gmplabtools/pamm/src && make"
completed_process = subprocess.run(cmd_to_run, universal_newlines=True, shell=True)
Expand Down